Movatterモバイル変換


[0]ホーム

URL:


Next:, Previous:, Up:Operand Constraints   [Contents][Index]


16.9.3 Register Class Preferences

The operand constraints have another function: they enable the compilerto decide which kind of hardware register a pseudo register is bestallocated to. The compiler examines the constraints that apply to theinsns that use the pseudo register, looking for the machine-dependentletters such as ‘d’ and ‘a’ that specify classes of registers.The pseudo register is put in whichever class gets the most “votes”.The constraint letters ‘g’ and ‘r’ also vote: they vote infavor of a general register. The machine description says which registersare considered general.

Of course, on some machines all registers are equivalent, and no registerclasses are defined. Then none of this complexity is relevant.


[8]ページ先頭

©2009-2026 Movatter.jp