-
Removes references to ah. · 448c16f0John Porto authored
AH is a thorn in the flesh for our X86-64 backend. The assembler was designed to always encode the low 8-bit registers, so %ah would become %spl. While it is true we **could** force %spl to always be encoded as %ah, that would not work if the instruction has a rex prefix. This CL removes references to %ah from TargetX86Base. There used to be 2 uses of ah in the target lowering: 1) To zero-extend %al before an unsigned div: mov <<src0>>, %al mov 0, %ah div <<src1>> This pattern has been changed to xor %eax, %eax mov <<src0>>, %al div <<src1>> 2) To access the 8-bit remainder for 8-bit division: mov %ah, <<dest>> This pattern has been changed to shr $8, %eax mov %al, <<Dest>> BUG= https://code.google.com/p/nativeclient/issues/detail?id=4077 R=stichnot@chromium.org Review URL: https://codereview.chromium.org/1260163003.448c16f0
×