forked from OSchip/llvm-project
[X86] Keep looping over operands looking for byte registers even if we already found a register that requires a REX prefix. Otherwise we don't error if a high byte register is used after SPL/BPL/DIL/SIL.
llvm-svn: 279923
This commit is contained in:
parent
6acca80e17
commit
45793a1f7a
|
@ -1017,11 +1017,10 @@ uint8_t X86MCCodeEmitter::DetermineREXPrefix(const MCInst &MI, uint64_t TSFlags,
|
||||||
unsigned Reg = MO.getReg();
|
unsigned Reg = MO.getReg();
|
||||||
if (Reg == X86::AH || Reg == X86::BH || Reg == X86::CH || Reg == X86::DH)
|
if (Reg == X86::AH || Reg == X86::BH || Reg == X86::CH || Reg == X86::DH)
|
||||||
UsesHighByteReg = true;
|
UsesHighByteReg = true;
|
||||||
if (!X86II::isX86_64NonExtLowByteReg(Reg)) continue;
|
if (X86II::isX86_64NonExtLowByteReg(Reg))
|
||||||
// FIXME: The caller of DetermineREXPrefix slaps this prefix onto anything
|
// FIXME: The caller of DetermineREXPrefix slaps this prefix onto anything
|
||||||
// that returns non-zero.
|
// that returns non-zero.
|
||||||
REX |= 0x40; // REX fixed encoding prefix
|
REX |= 0x40; // REX fixed encoding prefix
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (TSFlags & X86II::FormMask) {
|
switch (TSFlags & X86II::FormMask) {
|
||||||
|
|
Loading…
Reference in New Issue