Files
mercury/runtime/machdeps/MIPS_REGS
Fergus Henderson ed2601f855 Add a couple of lines of documentation.
runtime/machdeps/*:
	Add a couple of lines of documentation.
1995-09-09 03:51:29 +00:00

42 lines
1.7 KiB
Plaintext

This file contains the relevant part of config/mips/mips.h from the
GNU C source code which describes how each register is used.
#define REGISTER_NAMES \
{"$0", "at", "v0", "v1", "a0", "a1", "a2", "a3", "t0", \
"t1", "t2", "t3", "t4", "t5", "t6", "t7","s0", \
"s1","s2","s3","s4","s5","s6","s7","t8","t9", \
"k0","k1","gp","sp","fp","ra", \
"$f0","$f1","$f2","$f3","$f4","$f5","$f6","$f7","$f8","$f9", \
"$f10","$f11","$f12","$f13","$f14","$f15","$f16","$f17","$f18","$f19", \
"$f20","$f21","$f22","$f23","$f24","$f25","$f26","$f27","$f28","$f29", \
"$f30","$f31" \
}
/* 1 for registers that have pervasive standard uses
and are not available for the register allocator.
On the MIPS, see conventions, page D-2
I have chosen not to take Multiply/Divide HI,LO or PC into
account. */
#define FIXED_REGISTERS {1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1,\
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 \
}
/* 1 for registers not available across function calls.
These must include the FIXED_REGISTERS and also any
registers that can be used without being saved.
The latter must include the registers where values are returned
and the register where structure-value addresses are passed.
Aside from that, you can include as many other registers as you like. */
#define CALL_USED_REGISTERS {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,\
0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 1,\
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,\
1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0\
}