File: NOTES.RA

package info (click to toggle)
erlang 1%3A12.b.3-dfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 77,780 kB
  • ctags: 157,528
  • sloc: erlang: 664,178; ansic: 241,119; makefile: 15,725; xml: 8,378; java: 7,780; sh: 6,789; lisp: 5,396; pascal: 3,637; perl: 2,310; asm: 1,438; cpp: 975; tcl: 245; python: 21; sed: 20; awk: 15
file content (32 lines) | stat: -rw-r--r-- 1,176 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
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.