Skip to content

Commit

Permalink
Revert "x86: sysret does not need REX prefix. this fixes issue keysto…
Browse files Browse the repository at this point in the history
…ne-engine#94"

This reverts commit f18b6e1.
  • Loading branch information
aquynh committed Jul 26, 2016
1 parent cac140b commit faf9451
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions llvm/lib/Target/X86/MCTargetDesc/X86MCCodeEmitter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1038,16 +1038,15 @@ bool X86MCCodeEmitter::EmitVEXOpcodePrefix(uint64_t TSFlags, unsigned &CurByte,
/// REX prefix which specifies 1) 64-bit instructions, 2) non-default operand
/// size, and 3) use of X86-64 extended registers.
static unsigned DetermineREXPrefix(const MCInst &MI, uint64_t TSFlags,
const MCInstrDesc &Desc)
{
const MCInstrDesc &Desc) {
unsigned REX = 0;
bool UsesHighByteReg = false;

if (MI.getNumOperands() == 0) return REX;

if (TSFlags & X86II::REX_W)
REX |= 1 << 3; // set REX.W

if (MI.getNumOperands() == 0) return REX;

unsigned NumOps = MI.getNumOperands();
// FIXME: MCInst should explicitize the two-addrness.
bool isTwoAddr = NumOps > 1 &&
Expand Down

0 comments on commit faf9451

Please sign in to comment.