axp_b.s 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. #
  2. # QuickThreads -- Threads-building toolkit.
  3. # Copyright (c) 1993 by David Keppel
  4. #
  5. # Permission to use, copy, modify and distribute this software and
  6. # its documentation for any purpose and without fee is hereby
  7. # granted, provided that the above copyright notice and this notice
  8. # appear in all copies. This software is provided as a
  9. # proof-of-concept and for demonstration purposes; there is no
  10. # representation about the suitability of this software for any
  11. # purpose.
  12. #
  13. .text
  14. .globl b_call_reg
  15. .globl b_call_imm
  16. .globl b_add
  17. .globl b_load
  18. .ent b_null
  19. b_null:
  20. ret $31,($18),1
  21. .end b_null
  22. .ent b_call_reg
  23. b_call_reg:
  24. lda $27,b_null
  25. $L0:
  26. jsr $18,($27)
  27. jsr $18,($27)
  28. jsr $18,($27)
  29. jsr $18,($27)
  30. jsr $18,($27)
  31. jsr $18,($27)
  32. jsr $18,($27)
  33. jsr $18,($27)
  34. jsr $18,($27)
  35. jsr $18,($27)
  36. subq $16,1,$16
  37. bgt $16,$L0
  38. ret $31,($26),1
  39. .end
  40. .ent b_call_imm
  41. b_call_imm:
  42. $L1:
  43. jsr $18,b_null
  44. jsr $18,b_null
  45. jsr $18,b_null
  46. jsr $18,b_null
  47. jsr $18,b_null
  48. jsr $18,b_null
  49. jsr $18,b_null
  50. jsr $18,b_null
  51. jsr $18,b_null
  52. jsr $18,b_null
  53. subq $16,1,$16
  54. bgt $16,$L1
  55. ret $31,($26),1
  56. .end
  57. .ent b_add
  58. b_add:
  59. $L2:
  60. addq $31,$31,$31
  61. addq $31,$31,$31
  62. addq $31,$31,$31
  63. addq $31,$31,$31
  64. addq $31,$31,$31
  65. addq $31,$31,$31
  66. addq $31,$31,$31
  67. addq $31,$31,$31
  68. addq $31,$31,$31
  69. addq $31,$31,$31
  70. subq $16,1,$16
  71. bgt $16,$L2
  72. ret $31,($26),1
  73. .end
  74. .ent b_load
  75. b_load:
  76. $L3:
  77. ldq $31,0($30)
  78. ldq $31,8($30)
  79. ldq $31,16($30)
  80. ldq $31,24($30)
  81. ldq $31,32($30)
  82. ldq $31,0($30)
  83. ldq $31,8($30)
  84. ldq $31,16($30)
  85. ldq $31,24($30)
  86. ldq $31,32($30)
  87. subq $16,1,$16
  88. bgt $16,$L3
  89. ret $31,($26),1
  90. .end