diff options
author | Chris Lattner <sabre@nondot.org> | 2010-02-12 01:06:22 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-02-12 01:06:22 +0000 |
commit | c4d3f662fc2e907ea2c76aca8ec1971e43f89c98 (patch) | |
tree | 3ff3b094cace7f979fcdb656ad8159b040628486 /lib | |
parent | 6ae7bbb5ea15ec11fa516fc920719f5d9c1abb00 (diff) | |
download | external_llvm-c4d3f662fc2e907ea2c76aca8ec1971e43f89c98.zip external_llvm-c4d3f662fc2e907ea2c76aca8ec1971e43f89c98.tar.gz external_llvm-c4d3f662fc2e907ea2c76aca8ec1971e43f89c98.tar.bz2 |
fix the encodings of monitor and mwait, which were completely
busted in both encoders. I'm not bothering to fix it in the
old one at this point.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95947 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Target/X86/X86MCCodeEmitter.cpp | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/lib/Target/X86/X86MCCodeEmitter.cpp b/lib/Target/X86/X86MCCodeEmitter.cpp index 5d745d2..898592e 100644 --- a/lib/Target/X86/X86MCCodeEmitter.cpp +++ b/lib/Target/X86/X86MCCodeEmitter.cpp @@ -542,14 +542,9 @@ EncodeInstruction(const MCInst &MI, raw_ostream &OS, // FIXME: This is terrible, they should get proper encoding bits in TSFlags. if (Opcode == X86::LFENCE || Opcode == X86::MFENCE || Opcode == X86::MONITOR || Opcode == X86::MWAIT) { - EmitByte(ModRMByte(3, (TSFlags & X86II::FormMask)-X86II::MRM0r, 0), + EmitByte(ModRMByte(3, (TSFlags & X86II::FormMask)-X86II::MRM0r, + Opcode == X86::MWAIT), CurByte, OS); - - switch (Opcode) { - default: break; - case X86::MONITOR: EmitByte(0xC8, CurByte, OS); break; - case X86::MWAIT: EmitByte(0xC9, CurByte, OS); break; - } } else { EmitRegModRMByte(MI.getOperand(CurOp++), (TSFlags & X86II::FormMask)-X86II::MRM0r, |