[llvm] [SPARC][IAS] Make Is64Bit imply FeatureV9 in the assembler (PR #143232)

via llvm-commits llvm-commits at lists.llvm.org
Sat Jun 7 22:19:13 PDT 2025


https://github.com/koachan updated https://github.com/llvm/llvm-project/pull/143232

>From 9dd21f170da0f4e278ccfccc76f5bf7eb416d131 Mon Sep 17 00:00:00 2001
From: Koakuma <koachan at protonmail.com>
Date: Sat, 7 Jun 2025 10:50:27 +0700
Subject: [PATCH 1/2] [SPARC][IAS] Make Is64Bit imply FeatureV9 in the
 assembler

This prevents usage of V9 instructions in assembly code intended for 32-bit V8.

Fixes https://github.com/llvm/llvm-project/issues/142388
---
 llvm/lib/Target/Sparc/SparcInstrInfo.td       |   3 +-
 llvm/test/CodeGen/SPARC/inlineasm-v9.ll       |   9 +
 llvm/test/CodeGen/SPARC/inlineasm.ll          |   9 -
 .../Relocations/relocation-specifier-v9.s     | 211 ++++++++++++++++++
 .../Sparc/Relocations/relocation-specifier.s  |  51 -----
 llvm/test/MC/Sparc/sparcv9-instructions.s     |  42 ++++
 6 files changed, 264 insertions(+), 61 deletions(-)
 create mode 100644 llvm/test/MC/Sparc/Relocations/relocation-specifier-v9.s

diff --git a/llvm/lib/Target/Sparc/SparcInstrInfo.td b/llvm/lib/Target/Sparc/SparcInstrInfo.td
index 074a04a5dd747..1be017be1c64f 100644
--- a/llvm/lib/Target/Sparc/SparcInstrInfo.td
+++ b/llvm/lib/Target/Sparc/SparcInstrInfo.td
@@ -24,7 +24,8 @@ include "SparcInstrFormats.td"
 def Is32Bit : Predicate<"!Subtarget->is64Bit()">;
 
 // True when generating 64-bit code. This also implies HasV9.
-def Is64Bit : Predicate<"Subtarget->is64Bit()">;
+def Is64Bit : Predicate<"Subtarget->is64Bit()">,
+              AssemblerPredicate<(all_of FeatureV9)>;
 
 def UseSoftMulDiv : Predicate<"Subtarget->useSoftMulDiv()">,
               AssemblerPredicate<(all_of FeatureSoftMulDiv)>;
diff --git a/llvm/test/CodeGen/SPARC/inlineasm-v9.ll b/llvm/test/CodeGen/SPARC/inlineasm-v9.ll
index 47126d5d64daa..289bb33fb864b 100644
--- a/llvm/test/CodeGen/SPARC/inlineasm-v9.ll
+++ b/llvm/test/CodeGen/SPARC/inlineasm-v9.ll
@@ -58,3 +58,12 @@ Entry:
   tail call void asm sideeffect "", "{o0}"(i64 %val)
   ret void
 }
+
+; CHECK-LABEL: test_twinword:
+; CHECK: rd  %pc, %i1
+; CHECK: srlx %i1, 32, %i0
+
+define i64 @test_twinword(){
+  %1 = tail call i64 asm sideeffect "rd %asr5, ${0:L} \0A\09 srlx ${0:L}, 32, ${0:H}", "={i0}"()
+  ret i64 %1
+}
diff --git a/llvm/test/CodeGen/SPARC/inlineasm.ll b/llvm/test/CodeGen/SPARC/inlineasm.ll
index 3ca2168efb71b..07411385bdf37 100644
--- a/llvm/test/CodeGen/SPARC/inlineasm.ll
+++ b/llvm/test/CodeGen/SPARC/inlineasm.ll
@@ -144,15 +144,6 @@ entry:
   ret void
 }
 
-; CHECK-LABEL: test_twinword:
-; CHECK: rd  %asr5, %i1
-; CHECK: srlx %i1, 32, %i0
-
-define i64 @test_twinword(){
-  %1 = tail call i64 asm sideeffect "rd %asr5, ${0:L} \0A\09 srlx ${0:L}, 32, ${0:H}", "={i0}"()
-  ret i64 %1
-}
-
 ; CHECK-LABEL: test_symbol:
 ; CHECK: ba,a brtarget
 define void @test_symbol() {
diff --git a/llvm/test/MC/Sparc/Relocations/relocation-specifier-v9.s b/llvm/test/MC/Sparc/Relocations/relocation-specifier-v9.s
new file mode 100644
index 0000000000000..566f57731565e
--- /dev/null
+++ b/llvm/test/MC/Sparc/Relocations/relocation-specifier-v9.s
@@ -0,0 +1,211 @@
+# RUN: llvm-mc %s -triple=sparcv9 | FileCheck %s --check-prefix=ASM
+
+# RUN: llvm-mc %s -triple=sparcv9 -filetype=obj -o %t
+# RUN: llvm-objdump -dr %t | FileCheck %s --check-prefix=OBJDUMP
+# RUN: llvm-readelf -s - < %t | FileCheck %s --check-prefix=READELF --implicit-check-not=TLS
+
+# READELF: TLS     LOCAL  DEFAULT [[#]] s_tle_hix22
+# READELF: TLS     LOCAL  DEFAULT [[#]] s_tldo_hix22
+# READELF: TLS     GLOBAL DEFAULT   UND s_tle_lox10
+# READELF: TLS     GLOBAL DEFAULT   UND s_tie_hi22
+# READELF: TLS     GLOBAL DEFAULT   UND s_tie_lo10
+# READELF: TLS     GLOBAL DEFAULT   UND s_tie_ld
+# READELF: TLS     GLOBAL DEFAULT   UND s_tie_ldx
+# READELF: TLS     GLOBAL DEFAULT   UND s_tie_add
+# READELF: TLS     GLOBAL DEFAULT   UND s_tldm_hi22
+# READELF: TLS     GLOBAL DEFAULT   UND s_tldm_lo10
+# READELF: TLS     GLOBAL DEFAULT   UND s_tldm_add
+# READELF: TLS     GLOBAL DEFAULT   UND s_tldo_lox10
+# READELF: TLS     GLOBAL DEFAULT   UND s_tldo_add
+# READELF: TLS     GLOBAL DEFAULT   UND s_tgd_hi22
+# READELF: TLS     GLOBAL DEFAULT   UND s_tgd_lo10
+# READELF: TLS     GLOBAL DEFAULT   UND s_tgd_add
+
+main:
+
+# ASM:      or %g1, %lo(sym), %g3
+# ASM-NEXT: sethi %hi(sym), %l0
+# ASM-NEXT: sethi %h44(sym), %l0
+# ASM-NEXT: or %g1, %m44(sym), %g3
+# ASM-NEXT: or %g1, %l44(sym), %g3
+# OBJDUMP:     0000000:  R_SPARC_LO10	sym
+# OBJDUMP:     0000004:  R_SPARC_HI22	sym
+# OBJDUMP:     0000008:  R_SPARC_H44	sym
+# OBJDUMP:     000000c:  R_SPARC_M44	sym
+# OBJDUMP:     0000010:  R_SPARC_L44	sym
+or %g1, %lo(sym), %g3
+sethi %hi(sym), %l0
+sethi %h44(sym), %l0
+or %g1, %m44(sym), %g3
+or %g1, %l44(sym), %g3
+
+## FIXME: Emit %pc22/%pc10
+# ASM:      sethi %hi(sym), %o1
+# ASM-NEXT: or %o1, %lo(sym), %o1
+# OBJDUMP:      sethi 0x0, %o1
+# OBJDUMP-NEXT:   R_SPARC_PC22 sym
+# OBJDUMP-NEXT: or %o1, 0x0, %o1
+# OBJDUMP-NEXT:   R_SPARC_PC10 sym
+# OBJDUMP-NEXT: sethi 0x3fffff, %o1
+# OBJDUMP-NEXT: or %o1, 0x3e0, %o1
+sethi %pc22(sym), %o1
+or %o1, %pc10(sym), %o1
+sethi %pc22(main), %o1
+or %o1, %pc10(main), %o1
+
+# ASM:      sethi %hh(sym), %l0
+# ASM-NEXT: sethi %hh(sym), %l0
+# ASM-NEXT: or %g1, %hm(sym), %g3
+# ASM-NEXT: or %g1, %hm(sym), %g3
+# ASM-NEXT: sethi %lm(sym), %l0
+# OBJDUMP:      R_SPARC_HH22	sym
+# OBJDUMP:      R_SPARC_HH22	sym
+# OBJDUMP:      R_SPARC_HM10	sym
+# OBJDUMP:      R_SPARC_HM10	sym
+# OBJDUMP:      R_SPARC_LM22	sym
+sethi %hh(sym), %l0
+sethi %uhi(sym), %l0
+or %g1, %hm(sym), %g3
+or %g1, %ulo(sym), %g3
+sethi %lm(sym), %l0
+
+# ASM:      sethi %hix(sym), %g1
+# ASM-NEXT: xor %g1, %lox(sym), %g1
+# ASM-NEXT: sethi %gdop_hix22(sym), %l1
+# ASM-NEXT: or %l1, %gdop_lox10(sym), %l1
+# ASM-NEXT: ldx [%l7+%l1], %l2, %gdop(sym)
+# OBJDUMP:      sethi 0x3fffff, %g0
+# OBJDUMP-NEXT: xor %g0, -0x400, %g0
+# OBJDUMP-NEXT: sethi 0x0, %g1
+# OBJDUMP-NEXT:   R_SPARC_HIX22 sym
+# OBJDUMP-NEXT: xor %g1, 0x0, %g1
+# OBJDUMP-NEXT:   R_SPARC_LOX10 sym
+# OBJDUMP-NEXT: sethi 0x0, %l1
+# OBJDUMP-NEXT:   R_SPARC_GOTDATA_OP_HIX22 sym
+# OBJDUMP-NEXT: or %l1, 0x0, %l1
+# OBJDUMP-NEXT:   R_SPARC_GOTDATA_OP_LOX10 sym
+# OBJDUMP-NEXT: ldx [%l7+%l1], %l2
+# OBJDUMP-NEXT:   R_SPARC_GOTDATA_OP sym
+sethi %hix(zero), %g0
+xor %g0, %lox(zero), %g0
+sethi %hix(sym), %g1
+xor %g1, %lox(sym), %g1
+sethi %gdop_hix22(sym), %l1
+or %l1, %gdop_lox10(sym), %l1
+ldx [%l7 + %l1], %l2, %gdop(sym)
+
+.set abs, 0xfedcba98
+.set abs48, 0xfedcba987654
+zero = 0
+
+## FIXME: Don't emit GOT relocations when -position-independent is specified.
+# NOPIC:      sethi 0x3fb72e, %o0
+# NOPIC-NEXT: xor %o0, 0x298, %o0
+# NOPIC-NEXT: sethi 0x3b72ea, %o1
+# NOPIC-NEXT: xor %o0, 0x188, %o1
+sethi %hi(abs), %o0
+xor %o0, %lo(abs), %o0
+sethi %hi(-0x12345678), %o1
+xor %o0, %lo(-0x12345678), %o1
+
+# OBJDUMP:      ld [%o0+0x7], %o0
+ld [%o0 + seven], %o0
+seven = 7
+
+# OBJDUMP:      sethi 0x3b72ea, %o0
+# OBJDUMP-NEXT: or %o0, 0x187, %o0
+# OBJDUMP-NEXT: ld [%o0+0x654], %o0
+sethi %h44(abs48), %o0
+or %o0, %m44(abs48), %o0
+ld [%o0 + %l44(abs48)], %o0
+
+# OBJDUMP-NEXT: sethi 0x0, %o0
+# OBJDUMP-NEXT: sethi 0x3fb72e, %o0
+# OBJDUMP-NEXT: or %o0, 0x0, %o0
+sethi %hh(abs), %o0
+sethi %lm(abs), %o0
+or %o0, %hm(abs), %o0
+
+# OBJDUMP-NEXT: sethi 0x48d1, %o0
+# OBJDUMP-NEXT: xor %o0, -0x168, %o0
+sethi %hix(abs), %o0
+xor %o0, %lox(abs), %o0
+
+# OBJDUMP-LABEL: <.tls>:
+.section .tls,"ax"
+## Local Executable model:
+# ASM:      sethi %tle_hix22(s_tle_hix22), %i0
+# ASM-NEXT: xor %i0, %tle_lox10(s_tle_lox10), %i0
+
+# OBJDUMP:      31 00 00 00   sethi 0x0, %i0
+# OBJDUMP-NEXT:  00000000:  R_SPARC_TLS_LE_HIX22 s_tle_hix22
+# OBJDUMP-NEXT: b0 1e 20 00   xor %i0, 0x0, %i0
+# OBJDUMP-NEXT:  00000004:  R_SPARC_TLS_LE_LOX10 s_tle_lox10
+        sethi %tle_hix22(s_tle_hix22), %i0
+        xor %i0, %tle_lox10(s_tle_lox10), %i0
+
+## Initial Executable model
+# ASM:      sethi %tie_hi22(s_tie_hi22), %i1
+# ASM-NEXT: add %i1, %tie_lo10(s_tie_lo10), %i1
+# ASM-NEXT: ld [%i0+%i1], %i0, %tie_ld(s_tie_ld)
+# ASM-NEXT: ldx [%i0+%i1], %i0, %tie_ldx(s_tie_ldx)
+# ASM-NEXT: add %g7, %i0, %o0, %tie_add(s_tie_add)
+
+# OBJDUMP:      R_SPARC_TLS_IE_HI22	s_tie_hi22
+# OBJDUMP:      R_SPARC_TLS_IE_LO10	s_tie_lo10
+# OBJDUMP:      R_SPARC_TLS_IE_LD	s_tie_ld
+# OBJDUMP:      R_SPARC_TLS_IE_LDX	s_tie_ldx
+# OBJDUMP:      R_SPARC_TLS_IE_ADD	s_tie_add
+	sethi %tie_hi22(s_tie_hi22), %i1
+        add %i1, %tie_lo10(s_tie_lo10), %i1
+        ld [%i0+%i1], %i0, %tie_ld(s_tie_ld)
+        ldx [%i0+%i1], %i0, %tie_ldx(s_tie_ldx)
+        add %g7, %i0, %o0, %tie_add(s_tie_add)
+
+## Local Dynamic model
+# ASM:      sethi %tldo_hix22(s_tldo_hix22), %i1
+# ASM-NEXT: sethi %tldm_hi22(s_tldm_hi22), %i2
+# ASM-NEXT: add %i2, %tldm_lo10(s_tldm_lo10), %i2
+# ASM-NEXT: add %i0, %i2, %o0, %tldm_add(s_tldm_add)
+# ASM-NEXT: xor %i1, %tldo_lox10(s_tldo_lox10), %i0
+# ASM-NEXT: call __tls_get_addr, %tldm_call(s_tldm_call)
+# ASM-NEXT: nop
+# ASM-NEXT: add %o0, %i0, %o0, %tldo_add(s_tldo_add)
+
+# OBJDUMP:      R_SPARC_TLS_LDO_HIX22	s_tldo_hix22
+# OBJDUMP:      R_SPARC_TLS_LDM_HI22	s_tldm_hi22
+# OBJDUMP:      R_SPARC_TLS_LDM_LO10	s_tldm_lo10
+# OBJDUMP:      R_SPARC_TLS_LDM_ADD	s_tldm_add
+# OBJDUMP:      R_SPARC_TLS_LDO_LOX10	s_tldo_lox10
+# OBJDUMP:      R_SPARC_TLS_LDM_CALL	s_tldm_call
+# OBJDUMP:      R_SPARC_TLS_LDO_ADD	s_tldo_add
+        sethi %tldo_hix22(s_tldo_hix22), %i1
+        sethi %tldm_hi22(s_tldm_hi22), %i2
+        add %i2, %tldm_lo10(s_tldm_lo10), %i2
+	add %i0, %i2, %o0, %tldm_add(s_tldm_add)
+        xor %i1, %tldo_lox10(s_tldo_lox10), %i0
+        call __tls_get_addr, %tldm_call(s_tldm_call)
+        nop
+        add %o0, %i0, %o0, %tldo_add(s_tldo_add)
+
+## General Dynamic model
+# ASM:      sethi %tgd_hi22(s_tgd_hi22), %i1
+# ASM-NEXT: add %i1, %tgd_lo10(s_tgd_lo10), %i1
+# ASM-NEXT: add %i0, %i1, %o0, %tgd_add(s_tgd_add)
+# ASM-NEXT: call __tls_get_addr, %tgd_call(s_tgd_call)
+
+# OBJDUMP:      R_SPARC_TLS_GD_HI22	s_tgd_hi22
+# OBJDUMP:      R_SPARC_TLS_GD_LO10	s_tgd_lo10
+# OBJDUMP:      R_SPARC_TLS_GD_ADD	s_tgd_add
+# OBJDUMP:      R_SPARC_TLS_GD_CALL	s_tgd_call
+        sethi %tgd_hi22(s_tgd_hi22), %i1
+        add %i1, %tgd_lo10(s_tgd_lo10), %i1
+        add %i0, %i1, %o0, %tgd_add(s_tgd_add)
+        call __tls_get_addr, %tgd_call(s_tgd_call)
+
+        .type  Local, at object
+        .section      .tbss,#alloc,#write,#tls
+s_tle_hix22:
+s_tldo_hix22:
+        .word  0
+        .size  Local, 4
diff --git a/llvm/test/MC/Sparc/Relocations/relocation-specifier.s b/llvm/test/MC/Sparc/Relocations/relocation-specifier.s
index 1d89babb5e6cd..563f966b1e450 100644
--- a/llvm/test/MC/Sparc/Relocations/relocation-specifier.s
+++ b/llvm/test/MC/Sparc/Relocations/relocation-specifier.s
@@ -1,20 +1,12 @@
 # RUN: llvm-mc %s -triple=sparc | FileCheck %s --check-prefix=ASM
-# RUN: llvm-mc %s -triple=sparcv9 | FileCheck %s --check-prefix=ASM
 
 # RUN: llvm-mc %s -triple=sparc -filetype=obj -o %t
 # RUN: llvm-objdump -dr %t | FileCheck %s --check-prefix=OBJDUMP
-# RUN: llvm-mc %s -triple=sparcv9 -filetype=obj -o %t
-# RUN: llvm-objdump -dr %t | FileCheck %s --check-prefix=OBJDUMP
 # RUN: llvm-readelf -s - < %t | FileCheck %s --check-prefix=READELF --implicit-check-not=TLS
 
 # READELF: TLS     LOCAL  DEFAULT [[#]] s_tle_hix22
 # READELF: TLS     LOCAL  DEFAULT [[#]] s_tldo_hix22
 # READELF: TLS     GLOBAL DEFAULT   UND s_tle_lox10
-# READELF: TLS     GLOBAL DEFAULT   UND s_tie_hi22
-# READELF: TLS     GLOBAL DEFAULT   UND s_tie_lo10
-# READELF: TLS     GLOBAL DEFAULT   UND s_tie_ld
-# READELF: TLS     GLOBAL DEFAULT   UND s_tie_ldx
-# READELF: TLS     GLOBAL DEFAULT   UND s_tie_add
 # READELF: TLS     GLOBAL DEFAULT   UND s_tldm_hi22
 # READELF: TLS     GLOBAL DEFAULT   UND s_tldm_lo10
 # READELF: TLS     GLOBAL DEFAULT   UND s_tldm_add
@@ -72,31 +64,6 @@ or %g1, %hm(sym), %g3
 or %g1, %ulo(sym), %g3
 sethi %lm(sym), %l0
 
-# ASM:      sethi %hix(sym), %g1
-# ASM-NEXT: xor %g1, %lox(sym), %g1
-# ASM-NEXT: sethi %gdop_hix22(sym), %l1
-# ASM-NEXT: or %l1, %gdop_lox10(sym), %l1
-# ASM-NEXT: ldx [%l7+%l1], %l2, %gdop(sym)
-# OBJDUMP:      sethi 0x3fffff, %g0
-# OBJDUMP-NEXT: xor %g0, -0x400, %g0
-# OBJDUMP-NEXT: sethi 0x0, %g1
-# OBJDUMP-NEXT:   R_SPARC_HIX22 sym
-# OBJDUMP-NEXT: xor %g1, 0x0, %g1
-# OBJDUMP-NEXT:   R_SPARC_LOX10 sym
-# OBJDUMP-NEXT: sethi 0x0, %l1
-# OBJDUMP-NEXT:   R_SPARC_GOTDATA_OP_HIX22 sym
-# OBJDUMP-NEXT: or %l1, 0x0, %l1
-# OBJDUMP-NEXT:   R_SPARC_GOTDATA_OP_LOX10 sym
-# OBJDUMP-NEXT: ldx [%l7+%l1], %l2
-# OBJDUMP-NEXT:   R_SPARC_GOTDATA_OP sym
-sethi %hix(zero), %g0
-xor %g0, %lox(zero), %g0
-sethi %hix(sym), %g1
-xor %g1, %lox(sym), %g1
-sethi %gdop_hix22(sym), %l1
-or %l1, %gdop_lox10(sym), %l1
-ldx [%l7 + %l1], %l2, %gdop(sym)
-
 .set abs, 0xfedcba98
 .set abs48, 0xfedcba987654
 zero = 0
@@ -147,24 +114,6 @@ xor %o0, %lox(abs), %o0
         sethi %tle_hix22(s_tle_hix22), %i0
         xor %i0, %tle_lox10(s_tle_lox10), %i0
 
-## Initial Executable model
-# ASM:      sethi %tie_hi22(s_tie_hi22), %i1
-# ASM-NEXT: add %i1, %tie_lo10(s_tie_lo10), %i1
-# ASM-NEXT: ld [%i0+%i1], %i0, %tie_ld(s_tie_ld)
-# ASM-NEXT: ldx [%i0+%i1], %i0, %tie_ldx(s_tie_ldx)
-# ASM-NEXT: add %g7, %i0, %o0, %tie_add(s_tie_add)
-
-# OBJDUMP:      R_SPARC_TLS_IE_HI22	s_tie_hi22
-# OBJDUMP:      R_SPARC_TLS_IE_LO10	s_tie_lo10
-# OBJDUMP:      R_SPARC_TLS_IE_LD	s_tie_ld
-# OBJDUMP:      R_SPARC_TLS_IE_LDX	s_tie_ldx
-# OBJDUMP:      R_SPARC_TLS_IE_ADD	s_tie_add
-	sethi %tie_hi22(s_tie_hi22), %i1
-        add %i1, %tie_lo10(s_tie_lo10), %i1
-        ld [%i0+%i1], %i0, %tie_ld(s_tie_ld)
-        ldx [%i0+%i1], %i0, %tie_ldx(s_tie_ldx)
-        add %g7, %i0, %o0, %tie_add(s_tie_add)
-
 ## Local Dynamic model
 # ASM:      sethi %tldo_hix22(s_tldo_hix22), %i1
 # ASM-NEXT: sethi %tldm_hi22(s_tldm_hi22), %i2
diff --git a/llvm/test/MC/Sparc/sparcv9-instructions.s b/llvm/test/MC/Sparc/sparcv9-instructions.s
index 1c174f399ed34..2547eb53b1e38 100644
--- a/llvm/test/MC/Sparc/sparcv9-instructions.s
+++ b/llvm/test/MC/Sparc/sparcv9-instructions.s
@@ -67,14 +67,24 @@
         ! V9: lda [%i0+%l6] #ASI_SNF, %o2 ! encoding: [0xd4,0x86,0x10,0x76]
         lduwa [%i0 + %l6] (130+1), %o2
 
+        ! V8:      error: instruction requires a CPU feature not currently enabled
+        ! V8-NEXT: ldsw [%i0 + %l6], %o2
         ! V9: ldsw [%i0+%l6], %o2    ! encoding: [0xd4,0x46,0x00,0x16]
         ldsw [%i0 + %l6], %o2
+        ! V8:      error: instruction requires a CPU feature not currently enabled
+        ! V8-NEXT: ldsw [%i0 + 32], %o2
         ! V9: ldsw [%i0+32], %o2     ! encoding: [0xd4,0x46,0x20,0x20]
         ldsw [%i0 + 32], %o2
+        ! V8:      error: instruction requires a CPU feature not currently enabled
+        ! V8-NEXT: ldsw [%g1], %o2
         ! V9: ldsw [%g1], %o2        ! encoding: [0xd4,0x40,0x40,0x00]
         ldsw [%g1], %o2
+        ! V8:      error: instruction requires a CPU feature not currently enabled
+        ! V8-NEXT: ldswa [%i0 + %l6] 131, %o2
         ! V9: ldswa [%i0+%l6] #ASI_SNF, %o2 ! encoding: [0xd4,0xc6,0x10,0x76]
         ldswa [%i0 + %l6] 131, %o2
+        ! V8:      error: instruction requires a CPU feature not currently enabled
+        ! V8-NEXT: ldswa [%i0 + %l6] (130+1), %o2
         ! V9: ldswa [%i0+%l6] #ASI_SNF, %o2 ! encoding: [0xd4,0xc6,0x10,0x76]
         ldswa [%i0 + %l6] (130+1), %o2
 
@@ -151,8 +161,12 @@
         ! V9: ldx [%g2+%i5], %fsr   ! encoding: [0xc3,0x08,0x80,0x1d]
         ldx [%g2 + %i5],%fsr
 
+        ! V8:      error: instruction requires a CPU feature not currently enabled
+        ! V8-NEXT: ldxa [%g2 + %i5] 131, %g0
         ! V9: ldxa [%g2+%i5] #ASI_SNF, %g0   ! encoding: [0xc0,0xd8,0x90,0x7d]
         ldxa [%g2 + %i5] 131, %g0
+        ! V8:      error: instruction requires a CPU feature not currently enabled
+        ! V8-NEXT: ldxa [%g2 + %i5] (130+1), %g0
         ! V9: ldxa [%g2+%i5] #ASI_SNF, %g0   ! encoding: [0xc0,0xd8,0x90,0x7d]
         ldxa [%g2 + %i5] (130+1), %g0
 
@@ -166,8 +180,12 @@
         ! V9: stx %fsr, [%g2+%i5]   ! encoding: [0xc3,0x28,0x80,0x1d]
         stx %fsr,[%g2 + %i5]
 
+        ! V8:      error: instruction requires a CPU feature not currently enabled
+        ! V8-NEXT: stxa %g0, [%g2 + %i5] 131
         ! V9: stxa %g0, [%g2+%i5] #ASI_SNF   ! encoding: [0xc0,0xf0,0x90,0x7d]
         stxa %g0, [%g2 + %i5] 131
+        ! V8:      error: instruction requires a CPU feature not currently enabled
+        ! V8-NEXT: stxa %g0, [%g2 + %i5] (130+1)
         ! V9: stxa %g0, [%g2+%i5] #ASI_SNF   ! encoding: [0xc0,0xf0,0x90,0x7d]
         stxa %g0, [%g2 + %i5] (130+1)
 
@@ -507,33 +525,57 @@
         ! V9: wr %i0, 1, %asr21         ! encoding: [0xab,0x86,0x20,0x01]
         wr %i0, 1, %clear_softint
 
+        ! V8:      error: invalid instruction mnemonic
+        ! V8-NEXT: stw %o1, [%o0]
         ! V9: st %o1, [%o0]             ! encoding: [0xd2,0x22,0x00,0x00]
         stw %o1, [%o0]
+        ! V8:      error: invalid instruction mnemonic
+        ! V8-NEXT: stuw %o1, [%o0]
         ! V9: st %o1, [%o0]             ! encoding: [0xd2,0x22,0x00,0x00]
         stuw %o1, [%o0]
+        ! V8:      error: invalid instruction mnemonic
+        ! V8-NEXT: stsw %o1, [%o0]
         ! V9: st %o1, [%o0]             ! encoding: [0xd2,0x22,0x00,0x00]
         stsw %o1, [%o0]
 
+        ! V8:      error: invalid instruction mnemonic
+        ! V8-NEXT: stwa %o2, [%i0 + %l6] 131
         ! V9: sta %o2, [%i0+%l6] #ASI_SNF ! encoding: [0xd4,0xa6,0x10,0x76]
         stwa %o2, [%i0 + %l6] 131
+        ! V8:      error: invalid instruction mnemonic
+        ! V8-NEXT: stuwa %o2, [%i0 + %l6] 131
         ! V9: sta %o2, [%i0+%l6] #ASI_SNF ! encoding: [0xd4,0xa6,0x10,0x76]
         stuwa %o2, [%i0 + %l6] 131
+        ! V8:      error: invalid instruction mnemonic
+        ! V8-NEXT: stswa %o2, [%i0 + %l6] 131
         ! V9: sta %o2, [%i0+%l6] #ASI_SNF ! encoding: [0xd4,0xa6,0x10,0x76]
         stswa %o2, [%i0 + %l6] 131
 
         !! SPARCv9 provides a new variant of ASI-tagged memory accesses.
+        ! V8:      error: instruction requires a CPU feature not currently enabled
+        ! V8-NEXT: ldxa [%g2] %asi, %g0
         ! V9: ldxa [%g2] %asi, %g0    ! encoding: [0xc0,0xd8,0xa0,0x00]
         ldxa [%g2] %asi, %g0
+        ! V8:      error: instruction requires a CPU feature not currently enabled
+        ! V8-NEXT: stxa %g0, [%g2] %asi
         ! V9: stxa %g0, [%g2] %asi    ! encoding: [0xc0,0xf0,0xa0,0x00]
         stxa %g0, [%g2] %asi
+        ! V8:      error: instruction requires a CPU feature not currently enabled
+        ! V8-NEXT: ldxa [%g2 + 5] %asi, %g0
         ! V9: ldxa [%g2+5] %asi, %g0    ! encoding: [0xc0,0xd8,0xa0,0x05]
         ldxa [%g2 + 5] %asi, %g0
+        ! V8:      error: instruction requires a CPU feature not currently enabled
+        ! V8-NEXT: stxa %g0, [%g2 + 5] %asi
         ! V9: stxa %g0, [%g2+5] %asi    ! encoding: [0xc0,0xf0,0xa0,0x05]
         stxa %g0, [%g2 + 5] %asi
 
         !! Also make sure named ASI tags are parsed properly.
+        ! V8:      error: instruction requires a CPU feature not currently enabled
+        ! V8-NEXT: ldxa [%g2 + %i5] #ASI_SNF, %g0
         ! V9: ldxa [%g2+%i5] #ASI_SNF, %g0   ! encoding: [0xc0,0xd8,0x90,0x7d]
         ldxa [%g2 + %i5] #ASI_SNF, %g0
+        ! V8:      error: instruction requires a CPU feature not currently enabled
+        ! V8-NEXT: stxa %g0, [%g2 + %i5] #ASI_SNF
         ! V9: stxa %g0, [%g2+%i5] #ASI_SNF   ! encoding: [0xc0,0xf0,0x90,0x7d]
         stxa %g0, [%g2 + %i5] #ASI_SNF
 

>From 3f6c047a1c834fb8ed852c7fcf39c4dde5178da1 Mon Sep 17 00:00:00 2001
From: Koakuma <koachan at protonmail.com>
Date: Sun, 8 Jun 2025 10:45:29 +0700
Subject: [PATCH 2/2] Apply suggestions for error checks

---
 llvm/test/MC/Sparc/sparcv9-instructions.s | 487 +++++++---------------
 1 file changed, 162 insertions(+), 325 deletions(-)

diff --git a/llvm/test/MC/Sparc/sparcv9-instructions.s b/llvm/test/MC/Sparc/sparcv9-instructions.s
index 2547eb53b1e38..082c480055b9d 100644
--- a/llvm/test/MC/Sparc/sparcv9-instructions.s
+++ b/llvm/test/MC/Sparc/sparcv9-instructions.s
@@ -1,505 +1,386 @@
 ! RUN: not llvm-mc %s -triple=sparc   -show-encoding 2>&1 | FileCheck %s --check-prefix=V8
 ! RUN: llvm-mc %s -triple=sparcv9 -show-encoding | FileCheck %s --check-prefix=V9
 
-        ! V8:      error: invalid instruction mnemonic
-        ! V8-NEXT: addc %g2, %g1, %g3
+        ! V8:      [[#@LINE+2]]:9: error: invalid instruction mnemonic
         ! V9:      addx %g2, %g1, %g3              ! encoding: [0x86,0x40,0x80,0x01]
         addc %g2, %g1, %g3
 
-        ! V8:      error: invalid instruction mnemonic
-        ! V8-NEXT: addc %g2, 1, %g3
+        ! V8:      [[#@LINE+2]]:9: error: invalid instruction mnemonic
         ! V9:      addx %g2, 1, %g3              ! encoding: [0x86,0x40,0xa0,0x01]
         addc %g2, 1, %g3
 
-        ! V8:      error: invalid instruction mnemonic
-        ! V8-NEXT: addc 1, %g2, %g3
+        ! V8:      [[#@LINE+2]]:9: error: invalid instruction mnemonic
         ! V9:      addx %g2, 1, %g3              ! encoding: [0x86,0x40,0xa0,0x01]
         addc 1, %g2, %g3
 
-        ! V8:      error: invalid instruction mnemonic
-        ! V8-NEXT: addccc %g1, %g2, %g3
+        ! V8:      [[#@LINE+2]]:9: error: invalid instruction mnemonic
         ! V9:      addxcc %g1, %g2, %g3            ! encoding: [0x86,0xc0,0x40,0x02]
         addccc %g1, %g2, %g3
 
-        ! V8:      error: invalid instruction mnemonic
-        ! V8-NEXT: subc %g2, %g1, %g3
+        ! V8:      [[#@LINE+2]]:9: error: invalid instruction mnemonic
         ! V9:      subx %g2, %g1, %g3          ! encoding: [0x86,0x60,0x80,0x01]
         subc %g2, %g1, %g3
 
-        ! V8:      error: invalid instruction mnemonic
-        ! V8-NEXT: subccc %g1, %g2, %g3
+        ! V8:      [[#@LINE+2]]:9: error: invalid instruction mnemonic
         ! V9:      subxcc %g1, %g2, %g3         ! encoding: [0x86,0xe0,0x40,0x02]
         subccc %g1, %g2, %g3
 
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: popc %g1, %g2
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9:      popc %g1, %g2                ! encoding: [0x85,0x70,0x00,0x01]
         popc %g1, %g2
 
-
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: signx %g1, %g2
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: sra %g1, %g0, %g2               ! encoding: [0x85,0x38,0x40,0x00]
         signx %g1, %g2
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: signx %g1
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: sra %g1, %g0, %g1               ! encoding: [0x83,0x38,0x40,0x00]
         signx %g1
 
-        ! V8:      error: invalid instruction mnemonic
-        ! V8-NEXT: lduw [%i0 + %l6], %o2
+        ! V8:      [[#@LINE+2]]:9: error: invalid instruction mnemonic
         ! V9: ld [%i0+%l6], %o2    ! encoding: [0xd4,0x06,0x00,0x16]
         lduw [%i0 + %l6], %o2
-        ! V8:      error: invalid instruction mnemonic
-        ! V8-NEXT: lduw [%i0 + 32], %o2
+        ! V8:      [[#@LINE+2]]:9: error: invalid instruction mnemonic
         ! V9: ld [%i0+32], %o2     ! encoding: [0xd4,0x06,0x20,0x20]
         lduw [%i0 + 32], %o2
-        ! V8:      error: invalid instruction mnemonic
-        ! V8-NEXT: lduw [%g1], %o2
+        ! V8:      [[#@LINE+2]]:9: error: invalid instruction mnemonic
         ! V9: ld [%g1], %o2        ! encoding: [0xd4,0x00,0x40,0x00]
         lduw [%g1], %o2
-        ! V8:      error: invalid instruction mnemonic
-        ! V8-NEXT: lduwa [%i0 + %l6] 131, %o2
+        ! V8:      [[#@LINE+2]]:9: error: invalid instruction mnemonic
         ! V9: lda [%i0+%l6] #ASI_SNF, %o2 ! encoding: [0xd4,0x86,0x10,0x76]
         lduwa [%i0 + %l6] 131, %o2
-        ! V8:      error: invalid instruction mnemonic
-        ! V8-NEXT: lduwa [%i0 + %l6] (130+1), %o2
+        ! V8:      [[#@LINE+2]]:9: error: invalid instruction mnemonic
         ! V9: lda [%i0+%l6] #ASI_SNF, %o2 ! encoding: [0xd4,0x86,0x10,0x76]
         lduwa [%i0 + %l6] (130+1), %o2
 
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: ldsw [%i0 + %l6], %o2
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: ldsw [%i0+%l6], %o2    ! encoding: [0xd4,0x46,0x00,0x16]
         ldsw [%i0 + %l6], %o2
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: ldsw [%i0 + 32], %o2
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: ldsw [%i0+32], %o2     ! encoding: [0xd4,0x46,0x20,0x20]
         ldsw [%i0 + 32], %o2
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: ldsw [%g1], %o2
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: ldsw [%g1], %o2        ! encoding: [0xd4,0x40,0x40,0x00]
         ldsw [%g1], %o2
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: ldswa [%i0 + %l6] 131, %o2
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: ldswa [%i0+%l6] #ASI_SNF, %o2 ! encoding: [0xd4,0xc6,0x10,0x76]
         ldswa [%i0 + %l6] 131, %o2
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: ldswa [%i0 + %l6] (130+1), %o2
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: ldswa [%i0+%l6] #ASI_SNF, %o2 ! encoding: [0xd4,0xc6,0x10,0x76]
         ldswa [%i0 + %l6] (130+1), %o2
 
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: lda [%l0] 0xf0, %f29
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: lda [%l0] 240, %f29             ! encoding: [0xfb,0x84,0x1e,0x00]
         lda [%l0] 0xf0, %f29
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: lda [%l0] (0xef+0x01), %f29
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: lda [%l0] 240, %f29             ! encoding: [0xfb,0x84,0x1e,0x00]
         lda [%l0] (0xef+0x01), %f29
 
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: ldda [%l0] 0xf0, %f48
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: ldda [%l0] 240, %f48            ! encoding: [0xe3,0x9c,0x1e,0x00]
         ldda [%l0] 0xf0, %f48
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: ldda [%l0] (0xef+0x01), %f48
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: ldda [%l0] 240, %f48            ! encoding: [0xe3,0x9c,0x1e,0x00]
         ldda [%l0] (0xef+0x01), %f48
 
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: ldqa [%l0] 0xf0, %f48
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: ldqa [%l0] 240, %f48            ! encoding: [0xe3,0x94,0x1e,0x00]
         ldqa [%l0] 0xf0, %f48
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: ldqa [%l0] (0xef+0x01), %f48
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: ldqa [%l0] 240, %f48            ! encoding: [0xe3,0x94,0x1e,0x00]
         ldqa [%l0] (0xef+0x01), %f48
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: ldq [%l0], %f48
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: ldq [%l0], %f48                 ! encoding: [0xe3,0x14,0x00,0x00]
         ldq [%l0], %f48
 
 
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: sta %f29, [%l0] 0xf0
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: sta %f29, [%l0] 240             ! encoding: [0xfb,0xa4,0x1e,0x00]
         sta %f29, [%l0] 0xf0
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: sta %f29, [%l0] (0xef+0x01)
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: sta %f29, [%l0] 240             ! encoding: [0xfb,0xa4,0x1e,0x00]
         sta %f29, [%l0] (0xef+0x01)
 
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: stda %f48, [%l0] 0xf0
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: stda %f48, [%l0] 240            ! encoding: [0xe3,0xbc,0x1e,0x00]
         stda %f48, [%l0] 0xf0
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: stda %f48, [%l0] (0xef+0x01)
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: stda %f48, [%l0] 240            ! encoding: [0xe3,0xbc,0x1e,0x00]
         stda %f48, [%l0] (0xef+0x01)
 
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: stqa %f48, [%l0] 0xf0
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: stqa %f48, [%l0] 240            ! encoding: [0xe3,0xb4,0x1e,0x00]
         stqa %f48, [%l0] 0xf0
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: stqa %f48, [%l0] (0xef+0x01)
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: stqa %f48, [%l0] 240            ! encoding: [0xe3,0xb4,0x1e,0x00]
         stqa %f48, [%l0] (0xef+0x01)
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: stq %f48, [%l0]
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: stq %f48, [%l0]                 ! encoding: [0xe3,0x34,0x00,0x00]
         stq %f48, [%l0]
 
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: ldx [%g2 + 20],%fsr
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: ldx [%g2+20], %fsr    ! encoding: [0xc3,0x08,0xa0,0x14]
         ldx [%g2 + 20],%fsr
 
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: ldx [%g2 + %i5],%fsr
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: ldx [%g2+%i5], %fsr   ! encoding: [0xc3,0x08,0x80,0x1d]
         ldx [%g2 + %i5],%fsr
 
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: ldxa [%g2 + %i5] 131, %g0
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: ldxa [%g2+%i5] #ASI_SNF, %g0   ! encoding: [0xc0,0xd8,0x90,0x7d]
         ldxa [%g2 + %i5] 131, %g0
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: ldxa [%g2 + %i5] (130+1), %g0
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: ldxa [%g2+%i5] #ASI_SNF, %g0   ! encoding: [0xc0,0xd8,0x90,0x7d]
         ldxa [%g2 + %i5] (130+1), %g0
 
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: stx %fsr,[%g2 + 20]
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: stx %fsr, [%g2+20]    ! encoding: [0xc3,0x28,0xa0,0x14]
         stx %fsr,[%g2 + 20]
 
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: stx %fsr,[%g2 + %i5]
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: stx %fsr, [%g2+%i5]   ! encoding: [0xc3,0x28,0x80,0x1d]
         stx %fsr,[%g2 + %i5]
 
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: stxa %g0, [%g2 + %i5] 131
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: stxa %g0, [%g2+%i5] #ASI_SNF   ! encoding: [0xc0,0xf0,0x90,0x7d]
         stxa %g0, [%g2 + %i5] 131
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: stxa %g0, [%g2 + %i5] (130+1)
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: stxa %g0, [%g2+%i5] #ASI_SNF   ! encoding: [0xc0,0xf0,0x90,0x7d]
         stxa %g0, [%g2 + %i5] (130+1)
 
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: wrpr %g6,%i6,%tpc
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: wrpr %g6, %fp, %tpc        ! encoding: [0x81,0x91,0x80,0x1e]
         wrpr %g6,%i6,%tpc
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: wrpr %g6,%i6,%tnpc
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: wrpr %g6, %fp, %tnpc       ! encoding: [0x83,0x91,0x80,0x1e]
         wrpr %g6,%i6,%tnpc
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: wrpr %g6,%i6,%tstate
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: wrpr %g6, %fp, %tstate     ! encoding: [0x85,0x91,0x80,0x1e]
         wrpr %g6,%i6,%tstate
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: wrpr %g6,%i6,%tt
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: wrpr %g6, %fp, %tt         ! encoding: [0x87,0x91,0x80,0x1e]
         wrpr %g6,%i6,%tt
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: wrpr %g6,%i6,%tick
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: wrpr %g6, %fp, %tick       ! encoding: [0x89,0x91,0x80,0x1e]
         wrpr %g6,%i6,%tick
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: wrpr %g6,%i6,%tba
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: wrpr %g6, %fp, %tba        ! encoding: [0x8b,0x91,0x80,0x1e]
         wrpr %g6,%i6,%tba
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: wrpr %g6,%i6,%pstate
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: wrpr %g6, %fp, %pstate     ! encoding: [0x8d,0x91,0x80,0x1e]
         wrpr %g6,%i6,%pstate
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: wrpr %g6,%i6,%tl
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: wrpr %g6, %fp, %tl         ! encoding: [0x8f,0x91,0x80,0x1e]
         wrpr %g6,%i6,%tl
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: wrpr %g6,%i6,%pil
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: wrpr %g6, %fp, %pil        ! encoding: [0x91,0x91,0x80,0x1e]
         wrpr %g6,%i6,%pil
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: wrpr %g6,%i6,%cwp
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: wrpr %g6, %fp, %cwp        ! encoding: [0x93,0x91,0x80,0x1e]
         wrpr %g6,%i6,%cwp
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: wrpr %g6,%i6,%cansave
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: wrpr %g6, %fp, %cansave    ! encoding: [0x95,0x91,0x80,0x1e]
         wrpr %g6,%i6,%cansave
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: wrpr %g6,%i6,%canrestore
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: wrpr %g6, %fp, %canrestore ! encoding: [0x97,0x91,0x80,0x1e]
         wrpr %g6,%i6,%canrestore
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: wrpr %g6,%i6,%cleanwin
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: wrpr %g6, %fp, %cleanwin   ! encoding: [0x99,0x91,0x80,0x1e]
         wrpr %g6,%i6,%cleanwin
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: wrpr %g6,%i6,%otherwin
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: wrpr %g6, %fp, %otherwin   ! encoding: [0x9b,0x91,0x80,0x1e]
         wrpr %g6,%i6,%otherwin
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: wrpr %g6,%i6,%wstate
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: wrpr %g6, %fp, %wstate     ! encoding: [0x9d,0x91,0x80,0x1e]
         wrpr %g6,%i6,%wstate
 
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: wrpr %g6,255,%tpc
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: wrpr %g6, 255, %tpc        ! encoding: [0x81,0x91,0xa0,0xff]
         wrpr %g6,255,%tpc
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: wrpr %g6,255,%tnpc
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: wrpr %g6, 255, %tnpc       ! encoding: [0x83,0x91,0xa0,0xff]
         wrpr %g6,255,%tnpc
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: wrpr %g6,255,%tstate
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: wrpr %g6, 255, %tstate     ! encoding: [0x85,0x91,0xa0,0xff]
         wrpr %g6,255,%tstate
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: wrpr %g6,255,%tt
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: wrpr %g6, 255, %tt         ! encoding: [0x87,0x91,0xa0,0xff]
         wrpr %g6,255,%tt
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: wrpr %g6,255,%tick
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: wrpr %g6, 255, %tick       ! encoding: [0x89,0x91,0xa0,0xff]
         wrpr %g6,255,%tick
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: wrpr %g6,255,%tba
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: wrpr %g6, 255, %tba        ! encoding: [0x8b,0x91,0xa0,0xff]
         wrpr %g6,255,%tba
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: wrpr %g6,255,%pstate
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: wrpr %g6, 255, %pstate     ! encoding: [0x8d,0x91,0xa0,0xff]
         wrpr %g6,255,%pstate
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: wrpr %g6,255,%tl
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: wrpr %g6, 255, %tl         ! encoding: [0x8f,0x91,0xa0,0xff]
         wrpr %g6,255,%tl
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: wrpr %g6,255,%pil
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: wrpr %g6, 255, %pil        ! encoding: [0x91,0x91,0xa0,0xff]
         wrpr %g6,255,%pil
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: wrpr %g6,255,%cwp
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: wrpr %g6, 255, %cwp        ! encoding: [0x93,0x91,0xa0,0xff]
         wrpr %g6,255,%cwp
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: wrpr %g6,255,%cansave
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: wrpr %g6, 255, %cansave    ! encoding: [0x95,0x91,0xa0,0xff]
         wrpr %g6,255,%cansave
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: wrpr %g6,255,%canrestore
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: wrpr %g6, 255, %canrestore ! encoding: [0x97,0x91,0xa0,0xff]
         wrpr %g6,255,%canrestore
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: wrpr %g6,255,%cleanwin
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: wrpr %g6, 255, %cleanwin   ! encoding: [0x99,0x91,0xa0,0xff]
         wrpr %g6,255,%cleanwin
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: wrpr %g6,255,%otherwin
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: wrpr %g6, 255, %otherwin   ! encoding: [0x9b,0x91,0xa0,0xff]
         wrpr %g6,255,%otherwin
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: wrpr %g6,255,%wstate
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: wrpr %g6, 255, %wstate     ! encoding: [0x9d,0x91,0xa0,0xff]
         wrpr %g6,255,%wstate
 
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: wrpr %i6,%tpc
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: wrpr %fp, %g0, %tpc        ! encoding: [0x81,0x97,0x80,0x00]
         wrpr %i6,%tpc
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: wrpr %i6,%tnpc
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: wrpr %fp, %g0, %tnpc       ! encoding: [0x83,0x97,0x80,0x00]
         wrpr %i6,%tnpc
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: wrpr %i6,%tstate
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: wrpr %fp, %g0, %tstate     ! encoding: [0x85,0x97,0x80,0x00]
         wrpr %i6,%tstate
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: wrpr %i6,%tt
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: wrpr %fp, %g0, %tt         ! encoding: [0x87,0x97,0x80,0x00]
         wrpr %i6,%tt
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: wrpr %i6,%tick
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: wrpr %fp, %g0, %tick       ! encoding: [0x89,0x97,0x80,0x00]
         wrpr %i6,%tick
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: wrpr %i6,%tba
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: wrpr %fp, %g0, %tba        ! encoding: [0x8b,0x97,0x80,0x00]
         wrpr %i6,%tba
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: wrpr %i6,%pstate
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: wrpr %fp, %g0, %pstate     ! encoding: [0x8d,0x97,0x80,0x00]
         wrpr %i6,%pstate
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: wrpr %i6,%tl
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: wrpr %fp, %g0, %tl         ! encoding: [0x8f,0x97,0x80,0x00]
         wrpr %i6,%tl
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: wrpr %i6,%pil
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: wrpr %fp, %g0, %pil        ! encoding: [0x91,0x97,0x80,0x00]
         wrpr %i6,%pil
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: wrpr %i6,%cwp
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: wrpr %fp, %g0, %cwp        ! encoding: [0x93,0x97,0x80,0x00]
         wrpr %i6,%cwp
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: wrpr %i6,%cansave
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: wrpr %fp, %g0, %cansave    ! encoding: [0x95,0x97,0x80,0x00]
         wrpr %i6,%cansave
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: wrpr %i6,%canrestore
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: wrpr %fp, %g0, %canrestore ! encoding: [0x97,0x97,0x80,0x00]
         wrpr %i6,%canrestore
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: wrpr %i6,%cleanwin
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: wrpr %fp, %g0, %cleanwin   ! encoding: [0x99,0x97,0x80,0x00]
         wrpr %i6,%cleanwin
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: wrpr %i6,%otherwin
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: wrpr %fp, %g0, %otherwin   ! encoding: [0x9b,0x97,0x80,0x00]
         wrpr %i6,%otherwin
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: wrpr %i6,%wstate
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: wrpr %fp, %g0, %wstate     ! encoding: [0x9d,0x97,0x80,0x00]
         wrpr %i6,%wstate
 
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: wrpr 255,%tpc
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: wrpr %g0, 255, %tpc        ! encoding: [0x81,0x90,0x20,0xff]
         wrpr 255,%tpc
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: wrpr 255,%tnpc
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: wrpr %g0, 255, %tnpc       ! encoding: [0x83,0x90,0x20,0xff]
         wrpr 255,%tnpc
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: wrpr 255,%tstate
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: wrpr %g0, 255, %tstate     ! encoding: [0x85,0x90,0x20,0xff]
         wrpr 255,%tstate
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: wrpr 255,%tt
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: wrpr %g0, 255, %tt         ! encoding: [0x87,0x90,0x20,0xff]
         wrpr 255,%tt
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: wrpr 255,%tick
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: wrpr %g0, 255, %tick       ! encoding: [0x89,0x90,0x20,0xff]
         wrpr 255,%tick
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: wrpr 255,%tba
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: wrpr %g0, 255, %tba        ! encoding: [0x8b,0x90,0x20,0xff]
         wrpr 255,%tba
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: wrpr 255,%pstate
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: wrpr %g0, 255, %pstate     ! encoding: [0x8d,0x90,0x20,0xff]
         wrpr 255,%pstate
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: wrpr 255,%tl
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: wrpr %g0, 255, %tl         ! encoding: [0x8f,0x90,0x20,0xff]
         wrpr 255,%tl
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: wrpr 255,%pil
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: wrpr %g0, 255, %pil        ! encoding: [0x91,0x90,0x20,0xff]
         wrpr 255,%pil
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: wrpr 255,%cwp
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: wrpr %g0, 255, %cwp        ! encoding: [0x93,0x90,0x20,0xff]
         wrpr 255,%cwp
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: wrpr 255,%cansave
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: wrpr %g0, 255, %cansave    ! encoding: [0x95,0x90,0x20,0xff]
         wrpr 255,%cansave
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: wrpr 255,%canrestore
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: wrpr %g0, 255, %canrestore ! encoding: [0x97,0x90,0x20,0xff]
         wrpr 255,%canrestore
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: wrpr 255,%cleanwin
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: wrpr %g0, 255, %cleanwin   ! encoding: [0x99,0x90,0x20,0xff]
         wrpr 255,%cleanwin
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: wrpr 255,%otherwin
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: wrpr %g0, 255, %otherwin   ! encoding: [0x9b,0x90,0x20,0xff]
         wrpr 255,%otherwin
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: wrpr 255,%wstate
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: wrpr %g0, 255, %wstate     ! encoding: [0x9d,0x90,0x20,0xff]
         wrpr 255,%wstate
 
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: rdpr %tpc,%i5
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: rdpr %tpc, %i5            ! encoding: [0xbb,0x50,0x00,0x00]
         rdpr %tpc,%i5
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: rdpr %tnpc,%i5
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: rdpr %tnpc, %i5           ! encoding: [0xbb,0x50,0x40,0x00]
         rdpr %tnpc,%i5
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: rdpr %tstate,%i5
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: rdpr %tstate, %i5         ! encoding: [0xbb,0x50,0x80,0x00]
         rdpr %tstate,%i5
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: rdpr %tt,%i5
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: rdpr %tt, %i5             ! encoding: [0xbb,0x50,0xc0,0x00]
         rdpr %tt,%i5
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: rdpr %tick,%i5
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: rdpr %tick, %i5           ! encoding: [0xbb,0x51,0x00,0x00]
         rdpr %tick,%i5
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: rdpr %tba,%i5
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: rdpr %tba, %i5            ! encoding: [0xbb,0x51,0x40,0x00]
         rdpr %tba,%i5
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: rdpr %pstate,%i5
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: rdpr %pstate, %i5         ! encoding: [0xbb,0x51,0x80,0x00]
         rdpr %pstate,%i5
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: rdpr %tl,%i5
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: rdpr %tl, %i5             ! encoding: [0xbb,0x51,0xc0,0x00]
         rdpr %tl,%i5
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: rdpr %pil,%i5
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: rdpr %pil, %i5            ! encoding: [0xbb,0x52,0x00,0x00]
         rdpr %pil,%i5
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: rdpr %cwp,%i5
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: rdpr %cwp, %i5            ! encoding: [0xbb,0x52,0x40,0x00]
         rdpr %cwp,%i5
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: rdpr %cansave,%i5
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: rdpr %cansave, %i5        ! encoding: [0xbb,0x52,0x80,0x00]
         rdpr %cansave,%i5
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: rdpr %canrestore,%i5
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: rdpr %canrestore, %i5     ! encoding: [0xbb,0x52,0xc0,0x00]
         rdpr %canrestore,%i5
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: rdpr %cleanwin,%i5
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: rdpr %cleanwin, %i5       ! encoding: [0xbb,0x53,0x00,0x00]
         rdpr %cleanwin,%i5
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: rdpr %otherwin,%i5
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: rdpr %otherwin, %i5       ! encoding: [0xbb,0x53,0x40,0x00]
         rdpr %otherwin,%i5
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: rdpr %wstate,%i5
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: rdpr %wstate, %i5         ! encoding: [0xbb,0x53,0x80,0x00]
         rdpr %wstate,%i5
 
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: rdpr %fq,%i5
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: rdpr %fq, %i5             ! encoding: [0xbb,0x53,0xc0,0x00]
         rdpr %fq,%i5
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: rdpr %ver,%i5
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: rdpr %ver, %i5            ! encoding: [0xbb,0x57,0xc0,0x00]
         rdpr %ver,%i5
 
@@ -525,213 +406,169 @@
         ! V9: wr %i0, 1, %asr21         ! encoding: [0xab,0x86,0x20,0x01]
         wr %i0, 1, %clear_softint
 
-        ! V8:      error: invalid instruction mnemonic
-        ! V8-NEXT: stw %o1, [%o0]
+        ! V8:      [[#@LINE+2]]:9: error: invalid instruction mnemonic
         ! V9: st %o1, [%o0]             ! encoding: [0xd2,0x22,0x00,0x00]
         stw %o1, [%o0]
-        ! V8:      error: invalid instruction mnemonic
-        ! V8-NEXT: stuw %o1, [%o0]
+        ! V8:      [[#@LINE+2]]:9: error: invalid instruction mnemonic
         ! V9: st %o1, [%o0]             ! encoding: [0xd2,0x22,0x00,0x00]
         stuw %o1, [%o0]
-        ! V8:      error: invalid instruction mnemonic
-        ! V8-NEXT: stsw %o1, [%o0]
+        ! V8:      [[#@LINE+2]]:9: error: invalid instruction mnemonic
         ! V9: st %o1, [%o0]             ! encoding: [0xd2,0x22,0x00,0x00]
         stsw %o1, [%o0]
 
-        ! V8:      error: invalid instruction mnemonic
-        ! V8-NEXT: stwa %o2, [%i0 + %l6] 131
+        ! V8:      [[#@LINE+2]]:9: error: invalid instruction mnemonic
         ! V9: sta %o2, [%i0+%l6] #ASI_SNF ! encoding: [0xd4,0xa6,0x10,0x76]
         stwa %o2, [%i0 + %l6] 131
-        ! V8:      error: invalid instruction mnemonic
-        ! V8-NEXT: stuwa %o2, [%i0 + %l6] 131
+        ! V8:      [[#@LINE+2]]:9: error: invalid instruction mnemonic
         ! V9: sta %o2, [%i0+%l6] #ASI_SNF ! encoding: [0xd4,0xa6,0x10,0x76]
         stuwa %o2, [%i0 + %l6] 131
-        ! V8:      error: invalid instruction mnemonic
-        ! V8-NEXT: stswa %o2, [%i0 + %l6] 131
+        ! V8:      [[#@LINE+2]]:9: error: invalid instruction mnemonic
         ! V9: sta %o2, [%i0+%l6] #ASI_SNF ! encoding: [0xd4,0xa6,0x10,0x76]
         stswa %o2, [%i0 + %l6] 131
 
         !! SPARCv9 provides a new variant of ASI-tagged memory accesses.
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: ldxa [%g2] %asi, %g0
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: ldxa [%g2] %asi, %g0    ! encoding: [0xc0,0xd8,0xa0,0x00]
         ldxa [%g2] %asi, %g0
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: stxa %g0, [%g2] %asi
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: stxa %g0, [%g2] %asi    ! encoding: [0xc0,0xf0,0xa0,0x00]
         stxa %g0, [%g2] %asi
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: ldxa [%g2 + 5] %asi, %g0
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: ldxa [%g2+5] %asi, %g0    ! encoding: [0xc0,0xd8,0xa0,0x05]
         ldxa [%g2 + 5] %asi, %g0
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: stxa %g0, [%g2 + 5] %asi
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: stxa %g0, [%g2+5] %asi    ! encoding: [0xc0,0xf0,0xa0,0x05]
         stxa %g0, [%g2 + 5] %asi
 
         !! Also make sure named ASI tags are parsed properly.
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: ldxa [%g2 + %i5] #ASI_SNF, %g0
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: ldxa [%g2+%i5] #ASI_SNF, %g0   ! encoding: [0xc0,0xd8,0x90,0x7d]
         ldxa [%g2 + %i5] #ASI_SNF, %g0
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: stxa %g0, [%g2 + %i5] #ASI_SNF
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: stxa %g0, [%g2+%i5] #ASI_SNF   ! encoding: [0xc0,0xf0,0x90,0x7d]
         stxa %g0, [%g2 + %i5] #ASI_SNF
 
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: prefetch  [ %i1 + 0xf80 ], 1
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: prefetch  [%i1+3968], #one_read  ! encoding: [0xc3,0x6e,0x6f,0x80]
         prefetch  [ %i1 + 0xf80 ], 1
 
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: prefetch  [ %i1 + 0xf80 ], #n_reads
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: prefetch  [%i1+3968], #n_reads  ! encoding: [0xc1,0x6e,0x6f,0x80]
         prefetch  [ %i1 + 0xf80 ], #n_reads
 
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: prefetch  [ %i1 + 0xf80 ], #one_read
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: prefetch  [%i1+3968], #one_read  ! encoding: [0xc3,0x6e,0x6f,0x80]
         prefetch  [ %i1 + 0xf80 ], #one_read
 
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: prefetch  [ %i1 + 0xf80 ], #n_writes
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: prefetch  [%i1+3968], #n_writes  ! encoding: [0xc5,0x6e,0x6f,0x80]
         prefetch  [ %i1 + 0xf80 ], #n_writes
 
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: prefetch  [ %i1 + 0xf80 ], #one_write
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: prefetch  [%i1+3968], #one_write  ! encoding: [0xc7,0x6e,0x6f,0x80]
         prefetch  [ %i1 + 0xf80 ], #one_write
 
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: prefetch  [ %i1 + 0xf80 ], #page
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: prefetch  [%i1+3968], #page  ! encoding: [0xc9,0x6e,0x6f,0x80]
         prefetch  [ %i1 + 0xf80 ], #page
 
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: prefetch  [ %i1 + 0xf80 ], #unified
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: prefetch  [%i1+3968], #unified  ! encoding: [0xe3,0x6e,0x6f,0x80]
         prefetch  [ %i1 + 0xf80 ], #unified
 
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: prefetch  [ %i1 + 0xf80 ], #n_reads_strong
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: prefetch  [%i1+3968], #n_reads_strong  ! encoding: [0xe9,0x6e,0x6f,0x80]
         prefetch  [ %i1 + 0xf80 ], #n_reads_strong
 
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: prefetch  [ %i1 + 0xf80 ], #one_read_strong
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: prefetch  [%i1+3968], #one_read_strong  ! encoding: [0xeb,0x6e,0x6f,0x80]
         prefetch  [ %i1 + 0xf80 ], #one_read_strong
 
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: prefetch  [ %i1 + 0xf80 ], #n_writes_strong
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: prefetch  [%i1+3968], #n_writes_strong  ! encoding: [0xed,0x6e,0x6f,0x80]
         prefetch  [ %i1 + 0xf80 ], #n_writes_strong
 
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: prefetch  [ %i1 + 0xf80 ], #one_write_strong
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: prefetch  [%i1+3968], #one_write_strong  ! encoding: [0xef,0x6e,0x6f,0x80]
         prefetch  [ %i1 + 0xf80 ], #one_write_strong
 
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: prefetch  [ %i1 + %i2 ], 1
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: prefetch  [%i1+%i2], #one_read  ! encoding: [0xc3,0x6e,0x40,0x1a]
         prefetch  [ %i1 + %i2 ], 1
 
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: prefetch  [ %i1 + %i2 ], #n_reads
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: prefetch  [%i1+%i2], #n_reads  ! encoding: [0xc1,0x6e,0x40,0x1a]
         prefetch  [ %i1 + %i2 ], #n_reads
 
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: prefetch  [ %i1 + %i2 ], #one_read
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: prefetch  [%i1+%i2], #one_read  ! encoding: [0xc3,0x6e,0x40,0x1a]
         prefetch  [ %i1 + %i2 ], #one_read
 
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: prefetch  [ %i1 + %i2 ], #n_writes
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: prefetch  [%i1+%i2], #n_writes  ! encoding: [0xc5,0x6e,0x40,0x1a]
         prefetch  [ %i1 + %i2 ], #n_writes
 
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: prefetch  [ %i1 + %i2 ], #one_write
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: prefetch  [%i1+%i2], #one_write  ! encoding: [0xc7,0x6e,0x40,0x1a]
         prefetch  [ %i1 + %i2 ], #one_write
 
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: prefetch  [ %i1 + %i2 ], #page
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: prefetch  [%i1+%i2], #page  ! encoding: [0xc9,0x6e,0x40,0x1a]
         prefetch  [ %i1 + %i2 ], #page
 
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: prefetch  [ %i1 + %i2 ], #unified
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: prefetch  [%i1+%i2], #unified  ! encoding: [0xe3,0x6e,0x40,0x1a]
         prefetch  [ %i1 + %i2 ], #unified
 
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: prefetch  [ %i1 + %i2 ], #n_reads_strong
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: prefetch  [%i1+%i2], #n_reads_strong  ! encoding: [0xe9,0x6e,0x40,0x1a]
         prefetch  [ %i1 + %i2 ], #n_reads_strong
 
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: prefetch  [ %i1 + %i2 ], #one_read_strong
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: prefetch  [%i1+%i2], #one_read_strong  ! encoding: [0xeb,0x6e,0x40,0x1a]
         prefetch  [ %i1 + %i2 ], #one_read_strong
 
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: prefetch  [ %i1 + %i2 ], #n_writes_strong
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: prefetch  [%i1+%i2], #n_writes_strong  ! encoding: [0xed,0x6e,0x40,0x1a]
         prefetch  [ %i1 + %i2 ], #n_writes_strong
 
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: prefetch  [ %i1 + %i2 ], #one_write_strong
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: prefetch  [%i1+%i2], #one_write_strong  ! encoding: [0xef,0x6e,0x40,0x1a]
         prefetch  [ %i1 + %i2 ], #one_write_strong
 
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: prefetcha  [ %i1 + 0xf80 ] %asi, 1
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: prefetcha [%i1+3968] %asi, #one_read    ! encoding: [0xc3,0xee,0x6f,0x80]
         prefetcha  [ %i1 + 0xf80 ] %asi, 1
 
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: prefetcha  [ %i1 + 0xf80 ] %asi, #one_read
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: prefetcha [%i1+3968] %asi, #one_read    ! encoding: [0xc3,0xee,0x6f,0x80]
         prefetcha  [ %i1 + 0xf80 ] %asi, #one_read
 
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: prefetcha  [ %i1 + %i2 ] #ASI_SNF, 1
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: prefetcha [%i1+%i2] #ASI_SNF, #one_read ! encoding: [0xc3,0xee,0x50,0x7a]
         prefetcha  [ %i1 + %i2 ] #ASI_SNF, 1
 
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: prefetcha  [ %i1 + %i2 ] #ASI_SNF, #one_read
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: prefetcha [%i1+%i2] #ASI_SNF, #one_read ! encoding: [0xc3,0xee,0x50,0x7a]
         prefetcha  [ %i1 + %i2 ] #ASI_SNF, #one_read
 
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: prefetcha  [ %i1 + %i2 ] 131, 1
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: prefetcha [%i1+%i2] #ASI_SNF, #one_read ! encoding: [0xc3,0xee,0x50,0x7a]
         prefetcha  [ %i1 + %i2 ] 131, 1
 
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: prefetcha  [ %i1 + %i2 ] 131, #one_read
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: prefetcha [%i1+%i2] #ASI_SNF, #one_read ! encoding: [0xc3,0xee,0x50,0x7a]
         prefetcha  [ %i1 + %i2 ] 131, #one_read
 
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: done
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: done      ! encoding: [0x81,0xf0,0x00,0x00]
         done
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: retry
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: retry     ! encoding: [0x83,0xf0,0x00,0x00]
         retry
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: saved
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: saved     ! encoding: [0x81,0x88,0x00,0x00]
         saved
-        ! V8:      error: instruction requires a CPU feature not currently enabled
-        ! V8-NEXT: restored
+        ! V8:      [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
         ! V9: restored  ! encoding: [0x83,0x88,0x00,0x00]
         restored



More information about the llvm-commits mailing list