[PATCH] D144936: [SPARC][IAS] Add support for v9 DONE, RETRY, SAVED, & RESTORED

Koakuma via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Aug 6 07:21:31 PDT 2023


koakuma updated this revision to Diff 547577.
koakuma retitled this revision from "[SPARC][IAS] Recognize more SPARCv9 instructions/pseudoinstructions" to "[SPARC][IAS] Add support for v9 DONE, RETRY, SAVED, & RESTORED".
koakuma edited the summary of this revision.
koakuma added a comment.

Split other changes into D157230 <https://reviews.llvm.org/D157230>, D157231 <https://reviews.llvm.org/D157231>, D157232 <https://reviews.llvm.org/D157232>, D157233 <https://reviews.llvm.org/D157233>, D157234 <https://reviews.llvm.org/D157234>, D157235 <https://reviews.llvm.org/D157235>, and D157236 <https://reviews.llvm.org/D157236>.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D144936/new/

https://reviews.llvm.org/D144936

Files:
  llvm/lib/Target/Sparc/SparcInstrInfo.td
  llvm/test/MC/Sparc/sparcv9-instructions.s


Index: llvm/test/MC/Sparc/sparcv9-instructions.s
===================================================================
--- llvm/test/MC/Sparc/sparcv9-instructions.s
+++ llvm/test/MC/Sparc/sparcv9-instructions.s
@@ -433,3 +433,20 @@
         ! V8-NEXT: prefetch  [ %i1 + %i2 ], 1
         ! V9: prefetch  [%i1+%i2], 1  ! encoding: [0xc3,0x6e,0x40,0x1a]
         prefetch  [ %i1 + %i2 ], 1
+
+        ! V8:      error: instruction requires a CPU feature not currently enabled
+        ! V8-NEXT: done
+        ! V9: done      ! encoding: [0x81,0xf0,0x00,0x00]
+        done
+        ! V8:      error: instruction requires a CPU feature not currently enabled
+        ! V8-NEXT: retry
+        ! V9: retry     ! encoding: [0x83,0xf0,0x00,0x00]
+        retry
+        ! V8:      error: instruction requires a CPU feature not currently enabled
+        ! V8-NEXT: saved
+        ! V9: saved     ! encoding: [0x81,0x88,0x00,0x00]
+        saved
+        ! V8:      error: instruction requires a CPU feature not currently enabled
+        ! V8-NEXT: restored
+        ! V9: restored  ! encoding: [0x83,0x88,0x00,0x00]
+        restored
Index: llvm/lib/Target/Sparc/SparcInstrInfo.td
===================================================================
--- llvm/lib/Target/Sparc/SparcInstrInfo.td
+++ llvm/lib/Target/Sparc/SparcInstrInfo.td
@@ -1743,6 +1743,22 @@
 }
 }
 
+// Section A.11 - DONE and RETRY
+// Section A.47 - SAVED and RESTORED
+let Predicates = [HasV9], rs1 = 0, rs2 = 0 in {
+  let rd = 0 in
+    def DONE : F3_1<2, 0b111110, (outs), (ins), "done", []>;
+
+  let rd = 1 in
+    def RETRY : F3_1<2, 0b111110, (outs), (ins), "retry", []>;
+
+  let rd = 0 in
+    def SAVED : F3_1<2, 0b110001, (outs), (ins), "saved", []>;
+
+  let rd = 1 in
+    def RESTORED : F3_1<2, 0b110001, (outs), (ins), "restored", []>;
+}
+
 // Section A.42 - Prefetch Data
 let Predicates = [HasV9] in {
   def PREFETCHr : F3_1<3, 0b101101,


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D144936.547577.patch
Type: text/x-patch
Size: 1923 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230806/a221b76c/attachment.bin>


More information about the llvm-commits mailing list