aboutsummaryrefslogtreecommitdiffstats
path: root/lib/hipe/x86/NOTES.RA
diff options
context:
space:
mode:
authorErlang/OTP <[email protected]>2009-11-20 14:54:40 +0000
committerErlang/OTP <[email protected]>2009-11-20 14:54:40 +0000
commit84adefa331c4159d432d22840663c38f155cd4c1 (patch)
treebff9a9c66adda4df2106dfd0e5c053ab182a12bd /lib/hipe/x86/NOTES.RA
downloadotp-84adefa331c4159d432d22840663c38f155cd4c1.tar.gz
otp-84adefa331c4159d432d22840663c38f155cd4c1.tar.bz2
otp-84adefa331c4159d432d22840663c38f155cd4c1.zip
The R13B03 release.OTP_R13B03
Diffstat (limited to 'lib/hipe/x86/NOTES.RA')
-rw-r--r--lib/hipe/x86/NOTES.RA32
1 files changed, 32 insertions, 0 deletions
diff --git a/lib/hipe/x86/NOTES.RA b/lib/hipe/x86/NOTES.RA
new file mode 100644
index 0000000000..ce80411642
--- /dev/null
+++ b/lib/hipe/x86/NOTES.RA
@@ -0,0 +1,32 @@
+$Id$
+
+Register Allocation
+===================
+
+These are the rules that HiPE x86 register allocators must abide by.
+
+- Before RA, every Temp (precoloured or pseudo) is semantically
+ equivalent to Reg. Any operand may be Temp.
+
+- Before RA, only FIXED registers may occur in precoloured Temps.
+ Exception 1 is move: src or dst may be an argument register.
+ Exception 2 is call: the dst (if any) must be %eax.
+
+- After RA, an operand (src or dst) may refer to at most one memory cell.
+ Therefore, a pseudo-Temp MAY NOT occur as base or offset in an
+ explicit memory operand after RA.
+
+- After RA, a binary operation (alu, cmp, move) may refer to at most
+ one memory cell. Therefore, AT MOST ONE of src and dst may be a
+ pseudo-Temp after RA. If one of the operands (src or dst) is an
+ explicit memory operand, then the other operand MUST NOT be a
+ pseudo-Temp after RA.
+
+- After RA, the index in a jmp_switch must be a register.
+
+- After RA, the temp in a lea must be a register.
+
+- After RA, the temp in an imul must be a register.
+
+- After RA, a function's formal parameters must reside on the stack.
+ Therefore, the RA MUST NOT map the formals to actual registers.