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.
| Name |
Last commit
|
Last update |
|---|---|---|
| bloat | Loading commit data... | |
| crosstest | Loading commit data... | |
| pydir | Loading commit data... | |
| runtime | Loading commit data... | |
| src | Loading commit data... | |
| tests_lit | Loading commit data... | |
| unittest | Loading commit data... | |
| .dir-locals.el | Loading commit data... | |
| .gitignore | Loading commit data... | |
| ALLOCATION.rst | Loading commit data... | |
| CMakeLists.txt | Loading commit data... | |
| Doxyfile | Loading commit data... | |
| LICENSE.TXT | Loading commit data... | |
| LOWERING.rst | Loading commit data... | |
| Makefile | Loading commit data... | |
| Makefile.standalone | Loading commit data... | |
| OWNERS | Loading commit data... | |
| README.rst | Loading commit data... | |
| codereview.settings | Loading commit data... |