alpha_mach_dep.S 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. .arch ev6
  2. .text
  3. .align 4
  4. .globl GC_push_regs
  5. .ent GC_push_regs 2
  6. GC_push_regs:
  7. ldgp $gp, 0($27)
  8. lda $sp, -16($sp)
  9. stq $26, 0($sp)
  10. .mask 0x04000000, 0
  11. .frame $sp, 16, $26, 0
  12. /* $0 integer result */
  13. /* $1-$8 temp regs - not preserved cross calls */
  14. /* $9-$15 call saved regs */
  15. /* $16-$21 argument regs - not preserved cross calls */
  16. /* $22-$28 temp regs - not preserved cross calls */
  17. /* $29 global pointer - not preserved cross calls */
  18. /* $30 stack pointer */
  19. # define call_push(x) \
  20. mov x, $16; \
  21. jsr $26, GC_push_one; \
  22. ldgp $gp, 0($26)
  23. call_push($9)
  24. call_push($10)
  25. call_push($11)
  26. call_push($12)
  27. call_push($13)
  28. call_push($14)
  29. call_push($15)
  30. /* $f0-$f1 floating point results */
  31. /* $f2-$f9 call saved regs */
  32. /* $f10-$f30 temp regs - not preserved cross calls */
  33. /* Use the most efficient transfer method for this hardware. */
  34. /* Bit 1 detects the FIX extension, which includes ftoit. */
  35. amask 2, $0
  36. bne $0, $use_stack
  37. #undef call_push
  38. #define call_push(x) \
  39. ftoit x, $16; \
  40. jsr $26, GC_push_one; \
  41. ldgp $gp, 0($26)
  42. call_push($f2)
  43. call_push($f3)
  44. call_push($f4)
  45. call_push($f5)
  46. call_push($f6)
  47. call_push($f7)
  48. call_push($f8)
  49. call_push($f9)
  50. ldq $26, 0($sp)
  51. lda $sp, 16($sp)
  52. ret $31, ($26), 1
  53. .align 4
  54. $use_stack:
  55. #undef call_push
  56. #define call_push(x) \
  57. stt x, 8($sp); \
  58. ldq $16, 8($sp); \
  59. jsr $26, GC_push_one; \
  60. ldgp $gp, 0($26)
  61. call_push($f2)
  62. call_push($f3)
  63. call_push($f4)
  64. call_push($f5)
  65. call_push($f6)
  66. call_push($f7)
  67. call_push($f8)
  68. call_push($f9)
  69. ldq $26, 0($sp)
  70. lda $sp, 16($sp)
  71. ret $31, ($26), 1
  72. .end GC_push_regs