[llvm-commits] CVS: llvm/lib/Target/X86/X86CodeEmitter.cpp
Evan Cheng
evan.cheng at apple.com
Tue Feb 14 13:53:02 PST 2006
Changes in directory llvm/lib/Target/X86:
X86CodeEmitter.cpp updated: 1.88 -> 1.89
---
Log message:
Don't special case XS, XD prefixes.
---
Diffs of the changes: (+9 -14)
X86CodeEmitter.cpp | 23 +++++++++--------------
1 files changed, 9 insertions(+), 14 deletions(-)
Index: llvm/lib/Target/X86/X86CodeEmitter.cpp
diff -u llvm/lib/Target/X86/X86CodeEmitter.cpp:1.88 llvm/lib/Target/X86/X86CodeEmitter.cpp:1.89
--- llvm/lib/Target/X86/X86CodeEmitter.cpp:1.88 Tue Feb 14 15:45:24 2006
+++ llvm/lib/Target/X86/X86CodeEmitter.cpp Tue Feb 14 15:52:51 2006
@@ -362,30 +362,25 @@
// Emit the operand size opcode prefix as needed.
if (Desc.TSFlags & X86II::OpSize) MCE.emitByte(0x66);
- // Emit the double precision sse fp opcode prefix as needed.
- if ((Desc.TSFlags & X86II::Op0Mask) == X86II::XD) {
- MCE.emitByte(0xF2); MCE.emitByte(0x0F);
- }
-
- // Emit the double precision sse fp opcode prefix as needed.
- if ((Desc.TSFlags & X86II::Op0Mask) == X86II::XS) {
- MCE.emitByte(0xF3); MCE.emitByte(0x0F);
- }
-
switch (Desc.TSFlags & X86II::Op0Mask) {
case X86II::TB:
MCE.emitByte(0x0F); // Two-byte opcode prefix
break;
+ case X86II::REP: break; // already handled.
+ case X86II::XS: // F3 0F
+ MCE.emitByte(0xF3);
+ MCE.emitByte(0x0F);
+ break;
+ case X86II::XD: // F2 0F
+ MCE.emitByte(0xF2);
+ MCE.emitByte(0x0F);
+ break;
case X86II::D8: case X86II::D9: case X86II::DA: case X86II::DB:
case X86II::DC: case X86II::DD: case X86II::DE: case X86II::DF:
MCE.emitByte(0xD8+
(((Desc.TSFlags & X86II::Op0Mask)-X86II::D8)
>> X86II::Op0Shift));
break; // Two-byte opcode prefix
- case X86II::REP:
- case X86II::XS:
- case X86II::XD:
- break; // already handled.
default: assert(0 && "Invalid prefix!");
case 0: break; // No prefix!
}
More information about the llvm-commits
mailing list