[PATCH] D144936: [SPARC][IAS] Add support for v9 DONE, RETRY, SAVED, & RESTORED
Koakuma via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 8 07:21:56 PDT 2023
koakuma updated this revision to Diff 548210.
koakuma added a comment.
Add disassembly tests.
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/Disassembler/Sparc/sparc-v9.txt
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/test/MC/Disassembler/Sparc/sparc-v9.txt
===================================================================
--- llvm/test/MC/Disassembler/Sparc/sparc-v9.txt
+++ llvm/test/MC/Disassembler/Sparc/sparc-v9.txt
@@ -137,3 +137,15 @@
# CHECK: prefetch [%i1+%i2], 1
0xc3,0x6e,0x40,0x1a
+
+# CHECK: done
+0x81,0xf0,0x00,0x00
+
+# CHECK: retry
+0x83,0xf0,0x00,0x00
+
+# CHECK: saved
+0x81,0x88,0x00,0x00
+
+# CHECK: restored
+0x83,0x88,0x00,0x00
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.548210.patch
Type: text/x-patch
Size: 2376 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230808/2b132768/attachment.bin>
More information about the llvm-commits
mailing list