diff options
author | Chris Lattner <sabre@nondot.org> | 2010-02-12 23:54:57 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-02-12 23:54:57 +0000 |
commit | eaca5fa8e6a2cb0f84a635da5f1f0f670776d0a5 (patch) | |
tree | fb10c7da60f07ee3e10aba2e82d0d84142241bd6 /lib/Target/X86/X86MCCodeEmitter.cpp | |
parent | ca3eeb33a8d7816721bb8b94456677ddead06b4d (diff) | |
download | external_llvm-eaca5fa8e6a2cb0f84a635da5f1f0f670776d0a5.zip external_llvm-eaca5fa8e6a2cb0f84a635da5f1f0f670776d0a5.tar.gz external_llvm-eaca5fa8e6a2cb0f84a635da5f1f0f670776d0a5.tar.bz2 |
Remove special cases for [LM]FENCE, MONITOR and MWAIT from
encoder and decoder by using new MRM_ forms.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96048 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86/X86MCCodeEmitter.cpp')
-rw-r--r-- | lib/Target/X86/X86MCCodeEmitter.cpp | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/lib/Target/X86/X86MCCodeEmitter.cpp b/lib/Target/X86/X86MCCodeEmitter.cpp index c31447f..c06e50a 100644 --- a/lib/Target/X86/X86MCCodeEmitter.cpp +++ b/lib/Target/X86/X86MCCodeEmitter.cpp @@ -568,19 +568,9 @@ EncodeInstruction(const MCInst &MI, raw_ostream &OS, case X86II::MRM4r: case X86II::MRM5r: case X86II::MRM6r: case X86II::MRM7r: EmitByte(BaseOpcode, CurByte, OS); - - // Special handling of lfence, mfence, monitor, and mwait. - // 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, - Opcode == X86::MWAIT), - CurByte, OS); - } else { - EmitRegModRMByte(MI.getOperand(CurOp++), - (TSFlags & X86II::FormMask)-X86II::MRM0r, - CurByte, OS); - } + EmitRegModRMByte(MI.getOperand(CurOp++), + (TSFlags & X86II::FormMask)-X86II::MRM0r, + CurByte, OS); break; case X86II::MRM0m: case X86II::MRM1m: case X86II::MRM2m: case X86II::MRM3m: |