mips_sgi_mach_dep.s 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. #include <sys/regdef.h>
  2. #include <sys/asm.h>
  3. /* This file must be preprocessed. But the SGI assembler always does */
  4. /* that. Furthermore, a generic preprocessor won't do, since some of */
  5. /* the SGI-supplied include files rely on behavior of the MIPS */
  6. /* assembler. Hence we treat and name this file as though it required */
  7. /* no preprocessing. */
  8. # define call_push(x) move $4,x; jal GC_push_one
  9. .option pic2
  10. .text
  11. /* Mark from machine registers that are saved by C compiler */
  12. # define FRAMESZ 32
  13. # define RAOFF FRAMESZ-SZREG
  14. # define GPOFF FRAMESZ-(2*SZREG)
  15. NESTED(GC_push_regs, FRAMESZ, ra)
  16. .mask 0x80000000,-SZREG # inform debugger of saved ra loc
  17. move t0,gp
  18. SETUP_GPX(t8)
  19. PTR_SUBU sp,FRAMESZ
  20. # ifdef SETUP_GP64
  21. SETUP_GP64(GPOFF, GC_push_regs)
  22. # endif
  23. SAVE_GP(GPOFF)
  24. REG_S ra,RAOFF(sp)
  25. # if (_MIPS_SIM == _ABIO32)
  26. call_push($2)
  27. call_push($3)
  28. # endif
  29. call_push($16)
  30. call_push($17)
  31. call_push($18)
  32. call_push($19)
  33. call_push($20)
  34. call_push($21)
  35. call_push($22)
  36. call_push($23)
  37. call_push($30)
  38. REG_L ra,RAOFF(sp)
  39. # ifdef RESTORE_GP64
  40. RESTORE_GP64
  41. # endif
  42. PTR_ADDU sp,FRAMESZ
  43. j ra
  44. .end GC_push_regs