diff options
Diffstat (limited to 'lib/hipe/x86/NOTES.RA')
-rw-r--r-- | lib/hipe/x86/NOTES.RA | 32 |
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. |