aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2006-05-31 22:05:11 +0000
committerEvan Cheng <evan.cheng@apple.com>2006-05-31 22:05:11 +0000
commitf91c10153cbf7d7e61d0bc5601caaa6db00a449f (patch)
tree1c60d044f015629d088189a337c347a6c6f191e6
parent6dc6665e299d1d37da6fab0551f27667c1ad6c73 (diff)
downloadexternal_llvm-f91c10153cbf7d7e61d0bc5601caaa6db00a449f.zip
external_llvm-f91c10153cbf7d7e61d0bc5601caaa6db00a449f.tar.gz
external_llvm-f91c10153cbf7d7e61d0bc5601caaa6db00a449f.tar.bz2
Sign extender
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28603 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Target/X86/X86InstrInfo.td18
1 files changed, 10 insertions, 8 deletions
diff --git a/lib/Target/X86/X86InstrInfo.td b/lib/Target/X86/X86InstrInfo.td
index d222bea..cd023cc 100644
--- a/lib/Target/X86/X86InstrInfo.td
+++ b/lib/Target/X86/X86InstrInfo.td
@@ -706,14 +706,6 @@ def IDIV16m: I<0xF7, MRM7m, (ops i16mem:$src), // DX:AX/[mem16] = AX,DX
def IDIV32m: I<0xF7, MRM7m, (ops i32mem:$src), // EDX:EAX/[mem32] = EAX,EDX
"idiv{l} $src", []>, Imp<[EAX,EDX],[EAX,EDX]>;
-// Sign-extenders for division.
-def CBW : I<0x98, RawFrm, (ops),
- "{cbtw|cbw}", []>, Imp<[AL],[AH]>; // AX = signext(AL)
-def CWD : I<0x99, RawFrm, (ops),
- "{cwtd|cwd}", []>, Imp<[AX],[DX]>; // DX:AX = signext(AX)
-def CDQ : I<0x99, RawFrm, (ops),
- "{cltd|cdq}", []>, Imp<[EAX],[EDX]>; // EDX:EAX = signext(EAX)
-
//===----------------------------------------------------------------------===//
// Two address Instructions...
@@ -2285,6 +2277,16 @@ def MOVZX32rm16: I<0xB7, MRMSrcMem, (ops GR32:$dst, i16mem:$src),
"movz{wl|x} {$src, $dst|$dst, $src}",
[(set GR32:$dst, (zextloadi32i16 addr:$src))]>, TB;
+def CBW : I<0x98, RawFrm, (ops),
+ "{cbtw|cbw}", []>, Imp<[AL],[AX]>; // AX = signext(AL)
+def CWDE : I<0x98, RawFrm, (ops),
+ "{cwtl|cwde}", []>, Imp<[AX],[EAX]>; // EAX = signext(AX)
+
+def CWD : I<0x99, RawFrm, (ops),
+ "{cwtd|cwd}", []>, Imp<[AX],[AX,DX]>; // DX:AX = signext(AX)
+def CDQ : I<0x99, RawFrm, (ops),
+ "{cltd|cdq}", []>, Imp<[EAX],[EAX,EDX]>; // EDX:EAX = signext(EAX)
+
//===----------------------------------------------------------------------===//
// Miscellaneous Instructions
//===----------------------------------------------------------------------===//