Skip to content

Commit 492495d

Browse files
committed
Apply suggestions for error checks
1 parent e0d2634 commit 492495d

File tree

1 file changed

+21
-42
lines changed

1 file changed

+21
-42
lines changed

llvm/test/MC/Sparc/sparcv9-instructions.s

Lines changed: 21 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -53,24 +53,19 @@
5353
! V9: lda [%i0+%l6] #ASI_SNF, %o2 ! encoding: [0xd4,0x86,0x10,0x76]
5454
lduwa [%i0 + %l6] (130+1), %o2
5555

56-
! V8: error: instruction requires a CPU feature not currently enabled
57-
! V8-NEXT: ldsw [%i0 + %l6], %o2
56+
! V8: [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
5857
! V9: ldsw [%i0+%l6], %o2 ! encoding: [0xd4,0x46,0x00,0x16]
5958
ldsw [%i0 + %l6], %o2
60-
! V8: error: instruction requires a CPU feature not currently enabled
61-
! V8-NEXT: ldsw [%i0 + 32], %o2
59+
! V8: [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
6260
! V9: ldsw [%i0+32], %o2 ! encoding: [0xd4,0x46,0x20,0x20]
6361
ldsw [%i0 + 32], %o2
64-
! V8: error: instruction requires a CPU feature not currently enabled
65-
! V8-NEXT: ldsw [%g1], %o2
62+
! V8: [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
6663
! V9: ldsw [%g1], %o2 ! encoding: [0xd4,0x40,0x40,0x00]
6764
ldsw [%g1], %o2
68-
! V8: error: instruction requires a CPU feature not currently enabled
69-
! V8-NEXT: ldswa [%i0 + %l6] 131, %o2
65+
! V8: [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
7066
! V9: ldswa [%i0+%l6] #ASI_SNF, %o2 ! encoding: [0xd4,0xc6,0x10,0x76]
7167
ldswa [%i0 + %l6] 131, %o2
72-
! V8: error: instruction requires a CPU feature not currently enabled
73-
! V8-NEXT: ldswa [%i0 + %l6] (130+1), %o2
68+
! V8: [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
7469
! V9: ldswa [%i0+%l6] #ASI_SNF, %o2 ! encoding: [0xd4,0xc6,0x10,0x76]
7570
ldswa [%i0 + %l6] (130+1), %o2
7671

@@ -131,12 +126,10 @@
131126
! V9: ldx [%g2+%i5], %fsr ! encoding: [0xc3,0x08,0x80,0x1d]
132127
ldx [%g2 + %i5],%fsr
133128

134-
! V8: error: instruction requires a CPU feature not currently enabled
135-
! V8-NEXT: ldxa [%g2 + %i5] 131, %g0
129+
! V8: [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
136130
! V9: ldxa [%g2+%i5] #ASI_SNF, %g0 ! encoding: [0xc0,0xd8,0x90,0x7d]
137131
ldxa [%g2 + %i5] 131, %g0
138-
! V8: error: instruction requires a CPU feature not currently enabled
139-
! V8-NEXT: ldxa [%g2 + %i5] (130+1), %g0
132+
! V8: [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
140133
! V9: ldxa [%g2+%i5] #ASI_SNF, %g0 ! encoding: [0xc0,0xd8,0x90,0x7d]
141134
ldxa [%g2 + %i5] (130+1), %g0
142135

@@ -148,12 +141,10 @@
148141
! V9: stx %fsr, [%g2+%i5] ! encoding: [0xc3,0x28,0x80,0x1d]
149142
stx %fsr,[%g2 + %i5]
150143

151-
! V8: error: instruction requires a CPU feature not currently enabled
152-
! V8-NEXT: stxa %g0, [%g2 + %i5] 131
144+
! V8: [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
153145
! V9: stxa %g0, [%g2+%i5] #ASI_SNF ! encoding: [0xc0,0xf0,0x90,0x7d]
154146
stxa %g0, [%g2 + %i5] 131
155-
! V8: error: instruction requires a CPU feature not currently enabled
156-
! V8-NEXT: stxa %g0, [%g2 + %i5] (130+1)
147+
! V8: [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
157148
! V9: stxa %g0, [%g2+%i5] #ASI_SNF ! encoding: [0xc0,0xf0,0x90,0x7d]
158149
stxa %g0, [%g2 + %i5] (130+1)
159150

@@ -416,57 +407,45 @@
416407
! V9: wr %i0, 1, %asr21 ! encoding: [0xab,0x86,0x20,0x01]
417408
wr %i0, 1, %clear_softint
418409

419-
! V8: error: invalid instruction mnemonic
420-
! V8-NEXT: stw %o1, [%o0]
410+
! V8: [[#@LINE+2]]:9: error: invalid instruction mnemonic
421411
! V9: st %o1, [%o0] ! encoding: [0xd2,0x22,0x00,0x00]
422412
stw %o1, [%o0]
423-
! V8: error: invalid instruction mnemonic
424-
! V8-NEXT: stuw %o1, [%o0]
413+
! V8: [[#@LINE+2]]:9: error: invalid instruction mnemonic
425414
! V9: st %o1, [%o0] ! encoding: [0xd2,0x22,0x00,0x00]
426415
stuw %o1, [%o0]
427-
! V8: error: invalid instruction mnemonic
428-
! V8-NEXT: stsw %o1, [%o0]
416+
! V8: [[#@LINE+2]]:9: error: invalid instruction mnemonic
429417
! V9: st %o1, [%o0] ! encoding: [0xd2,0x22,0x00,0x00]
430418
stsw %o1, [%o0]
431419

432-
! V8: error: invalid instruction mnemonic
433-
! V8-NEXT: stwa %o2, [%i0 + %l6] 131
420+
! V8: [[#@LINE+2]]:9: error: invalid instruction mnemonic
434421
! V9: sta %o2, [%i0+%l6] #ASI_SNF ! encoding: [0xd4,0xa6,0x10,0x76]
435422
stwa %o2, [%i0 + %l6] 131
436-
! V8: error: invalid instruction mnemonic
437-
! V8-NEXT: stuwa %o2, [%i0 + %l6] 131
423+
! V8: [[#@LINE+2]]:9: error: invalid instruction mnemonic
438424
! V9: sta %o2, [%i0+%l6] #ASI_SNF ! encoding: [0xd4,0xa6,0x10,0x76]
439425
stuwa %o2, [%i0 + %l6] 131
440-
! V8: error: invalid instruction mnemonic
441-
! V8-NEXT: stswa %o2, [%i0 + %l6] 131
426+
! V8: [[#@LINE+2]]:9: error: invalid instruction mnemonic
442427
! V9: sta %o2, [%i0+%l6] #ASI_SNF ! encoding: [0xd4,0xa6,0x10,0x76]
443428
stswa %o2, [%i0 + %l6] 131
444429

445430
!! SPARCv9 provides a new variant of ASI-tagged memory accesses.
446-
! V8: error: instruction requires a CPU feature not currently enabled
447-
! V8-NEXT: ldxa [%g2] %asi, %g0
431+
! V8: [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
448432
! V9: ldxa [%g2] %asi, %g0 ! encoding: [0xc0,0xd8,0xa0,0x00]
449433
ldxa [%g2] %asi, %g0
450-
! V8: error: instruction requires a CPU feature not currently enabled
451-
! V8-NEXT: stxa %g0, [%g2] %asi
434+
! V8: [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
452435
! V9: stxa %g0, [%g2] %asi ! encoding: [0xc0,0xf0,0xa0,0x00]
453436
stxa %g0, [%g2] %asi
454-
! V8: error: instruction requires a CPU feature not currently enabled
455-
! V8-NEXT: ldxa [%g2 + 5] %asi, %g0
437+
! V8: [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
456438
! V9: ldxa [%g2+5] %asi, %g0 ! encoding: [0xc0,0xd8,0xa0,0x05]
457439
ldxa [%g2 + 5] %asi, %g0
458-
! V8: error: instruction requires a CPU feature not currently enabled
459-
! V8-NEXT: stxa %g0, [%g2 + 5] %asi
440+
! V8: [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
460441
! V9: stxa %g0, [%g2+5] %asi ! encoding: [0xc0,0xf0,0xa0,0x05]
461442
stxa %g0, [%g2 + 5] %asi
462443

463444
!! Also make sure named ASI tags are parsed properly.
464-
! V8: error: instruction requires a CPU feature not currently enabled
465-
! V8-NEXT: ldxa [%g2 + %i5] #ASI_SNF, %g0
445+
! V8: [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
466446
! V9: ldxa [%g2+%i5] #ASI_SNF, %g0 ! encoding: [0xc0,0xd8,0x90,0x7d]
467447
ldxa [%g2 + %i5] #ASI_SNF, %g0
468-
! V8: error: instruction requires a CPU feature not currently enabled
469-
! V8-NEXT: stxa %g0, [%g2 + %i5] #ASI_SNF
448+
! V8: [[#@LINE+2]]:9: error: instruction requires a CPU feature not currently enabled
470449
! V9: stxa %g0, [%g2+%i5] #ASI_SNF ! encoding: [0xc0,0xf0,0x90,0x7d]
471450
stxa %g0, [%g2 + %i5] #ASI_SNF
472451

0 commit comments

Comments
 (0)