summaryrefslogtreecommitdiff
path: root/lib/Target/PowerPC/PPCInstrFormats.td
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-11-24 03:52:02 +0000
committerChris Lattner <sabre@nondot.org>2004-11-24 03:52:02 +0000
commit69efbdd4f350e94e3f352e34053a12ba6f826e80 (patch)
treeece8ff567b53ff8e6a51ccb7511b66556061c72a /lib/Target/PowerPC/PPCInstrFormats.td
parent2f5091ac2ace9e8fd79166810a7d20a9c4692254 (diff)
downloadllvm-69efbdd4f350e94e3f352e34053a12ba6f826e80.tar.gz
llvm-69efbdd4f350e94e3f352e34053a12ba6f826e80.tar.bz2
llvm-69efbdd4f350e94e3f352e34053a12ba6f826e80.tar.xz
Fix a few more tests by encoding the extsb and other XForm11 instructions
correctly. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18200 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/PowerPC/PPCInstrFormats.td')
-rw-r--r--lib/Target/PowerPC/PPCInstrFormats.td31
1 files changed, 19 insertions, 12 deletions
diff --git a/lib/Target/PowerPC/PPCInstrFormats.td b/lib/Target/PowerPC/PPCInstrFormats.td
index 52159dc040..426e9412ef 100644
--- a/lib/Target/PowerPC/PPCInstrFormats.td
+++ b/lib/Target/PowerPC/PPCInstrFormats.td
@@ -214,6 +214,23 @@ class XForm_base_r3xo<bits<6> opcode, bits<10> xo, bit rc, bit ppc64, bit vmx,
let Inst{31} = rc;
}
+// This is the same as XForm_base_r3xo, but the first two operands are swapped
+// when code is emitted.
+class XForm_base_r3xo_swapped
+ <bits<6> opcode, bits<10> xo, bit rc, bit ppc64, bit vmx,
+ dag OL, string asmstr>
+ : I<opcode, ppc64, vmx, OL, asmstr> {
+ bits<5> A;
+ bits<5> RST;
+ bits<5> B;
+
+ let Inst{6-10} = RST;
+ let Inst{11-15} = A;
+ let Inst{16-20} = B;
+ let Inst{21-30} = xo;
+ let Inst{31} = rc;
+}
+
class XForm_1<bits<6> opcode, bits<10> xo, bit ppc64, bit vmx,
dag OL, string asmstr>
@@ -228,17 +245,7 @@ class XForm_5<bits<6> opcode, bits<10> xo, bit ppc64, bit vmx,
class XForm_6<bits<6> opcode, bits<10> xo, bit rc, bit ppc64, bit vmx,
dag OL, string asmstr>
- : I<opcode, ppc64, vmx, OL, asmstr> {
- bits<5> A;
- bits<5> RST;
- bits<5> B;
-
- let Inst{6-10} = RST;
- let Inst{11-15} = A;
- let Inst{16-20} = B;
- let Inst{21-30} = xo;
- let Inst{31} = rc;
-}
+ : XForm_base_r3xo_swapped<opcode, xo, rc, ppc64, vmx, OL, asmstr>;
class XForm_8<bits<6> opcode, bits<10> xo, bit ppc64, bit vmx,
dag OL, string asmstr>
@@ -251,7 +258,7 @@ class XForm_10<bits<6> opcode, bits<10> xo, bit rc, bit ppc64, bit vmx,
class XForm_11<bits<6> opcode, bits<10> xo, bit rc, bit ppc64, bit vmx,
dag OL, string asmstr>
- : XForm_base_r3xo<opcode, xo, rc, ppc64, vmx, OL, asmstr> {
+ : XForm_base_r3xo_swapped<opcode, xo, rc, ppc64, vmx, OL, asmstr> {
let B = 0;
}