Add a pattern for i64 sra. Print 8-byte units with a space between the .quad
authorChris Lattner <sabre@nondot.org>
Tue, 27 Jun 2006 20:07:26 +0000 (20:07 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 27 Jun 2006 20:07:26 +0000 (20:07 +0000)
and the data

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28934 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/PowerPC/PPCAsmPrinter.cpp
lib/Target/PowerPC/PPCInstr64Bit.td
lib/Target/PowerPC/PPCInstrFormats.td

index 512a4cc3cfb7ce7588d9c2b05ac361786d3bff76..fd2d68d7c4ae7278fea62fed586b3604b4b6e730 100644 (file)
@@ -276,7 +276,7 @@ namespace {
       PrivateGlobalPrefix = "L";     // Marker for constant pool idxs
       ZeroDirective = "\t.space\t";  // ".space N" emits N zeros.
       if (isPPC64)
-        Data64bitsDirective = ".quad";       // we can't emit a 64-bit unit
+        Data64bitsDirective = ".quad\t";       // we can't emit a 64-bit unit
       else
         Data64bitsDirective = 0;       // we can't emit a 64-bit unit
       AlignmentIsInBytes = false;    // Alignment is by power of 2.
index bfb6a081e5d1ce7e31a6bc52659614dff68b1fec..e43c0eb724581169bc3976aa21dcfc476d96ac41 100644 (file)
@@ -190,8 +190,10 @@ def EXTSW_32_64 : XForm_11<31, 986, (ops G8RC:$rA, GPRC:$rS),
                       "extsw $rA, $rS", IntGeneral,
                       [(set G8RC:$rA, (sext GPRC:$rS))]>, isPPC64;
 
-def SRADI  : XSForm_1<31, 413, (ops GPRC:$rA, GPRC:$rS, u6imm:$SH),
-                      "sradi $rA, $rS, $SH", IntRotateD>, isPPC64;
+def SRADI  : XSForm_1<31, 413, (ops G8RC:$rA, G8RC:$rS, u6imm:$SH),
+                      "sradi $rA, $rS, $SH", IntRotateD,
+                      [(set G8RC:$rA, (sra G8RC:$rS, (i32 imm:$SH)))]>, isPPC64;
+                      
 def DIVD  : XOForm_1<31, 489, 0, (ops G8RC:$rT, G8RC:$rA, G8RC:$rB),
                      "divd $rT, $rA, $rB", IntDivD,
                      [(set G8RC:$rT, (sdiv G8RC:$rA, G8RC:$rB))]>, isPPC64,
index 87e9127365ad371264cc2ec0e6e20258fd90e52f..ae92c4388da3b99320920f015c54b028665e3720 100644 (file)
@@ -501,13 +501,14 @@ class XFXForm_7_ext<bits<6> opcode, bits<10> xo, bits<10> spr,
 
 // 1.7.10 XS-Form
 class XSForm_1<bits<6> opcode, bits<9> xo, dag OL, string asmstr,
-               InstrItinClass itin>
+               InstrItinClass itin, list<dag> pattern>
          : I<opcode, OL, asmstr, itin> {
   bits<5> RS;
   bits<5> A;
   bits<6> SH;
 
   bit RC = 0;    // set by isDOT
+  let Pattern = pattern;
 
   let Inst{6-10}  = RS;
   let Inst{11-15} = A;