Fix ProjectN build breaks (dotnet/corert#7115)
[mono-project.git] / libgc / mips_sgi_mach_dep.s
blob56390280a718845293455066595083420c477f8f
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. */
9 # define call_push(x) move $4,x; jal GC_push_one
11 .option pic2
12 .text
13 /* Mark from machine registers that are saved by C compiler */
14 # define FRAMESZ 32
15 # define RAOFF FRAMESZ-SZREG
16 # define GPOFF FRAMESZ-(2*SZREG)
17 NESTED(GC_push_regs, FRAMESZ, ra)
18 .mask 0x80000000,-SZREG # inform debugger of saved ra loc
19 move t0,gp
20 SETUP_GPX(t8)
21 PTR_SUBU sp,FRAMESZ
22 # ifdef SETUP_GP64
23 SETUP_GP64(GPOFF, GC_push_regs)
24 # endif
25 SAVE_GP(GPOFF)
26 REG_S ra,RAOFF(sp)
27 # if (_MIPS_SIM == _MIPS_SIM_ABI32)
28 call_push($2)
29 call_push($3)
30 # endif
31 call_push($16)
32 call_push($17)
33 call_push($18)
34 call_push($19)
35 call_push($20)
36 call_push($21)
37 call_push($22)
38 call_push($23)
39 call_push($30)
40 REG_L ra,RAOFF(sp)
41 # ifdef RESTORE_GP64
42 RESTORE_GP64
43 # endif
44 PTR_ADDU sp,FRAMESZ
45 j ra
46 .end GC_push_regs