1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 03:02:36 +01:00

[mips] Mark tests for lw/sw expansion in PIC by a separate "check prefix". NFC

That simplify adding XGOT tests later.

llvm-svn: 372219
This commit is contained in:
Simon Atanasyan 2019-09-18 12:24:30 +00:00
parent fa04b58fc7
commit 1124aeadf7
2 changed files with 74 additions and 73 deletions

View File

@ -1,7 +1,7 @@
# RUN: llvm-mc %s -triple=mipsel-unknown-linux -show-encoding -mcpu=mips32r2 | \
# RUN: FileCheck %s --check-prefixes=CHECK,CHECK-LE
# RUN: llvm-mc %s -triple=mips-unknown-linux -show-encoding -mcpu=mips32r2 | \
# RUN: FileCheck %s --check-prefixes=CHECK,CHECK-BE
# RUN: llvm-mc %s -triple=mipsel-unknown-linux -mcpu=mips32r2 \
# RUN: -show-encoding | FileCheck %s --check-prefixes=CHECK,CHECK-LE,GOT
# RUN: llvm-mc %s -triple=mips-unknown-linux -mcpu=mips32r2 \
# RUN: -show-encoding | FileCheck %s --check-prefixes=CHECK,CHECK-BE
# Check that the IAS expands macro instructions in the same way as GAS.
@ -110,56 +110,56 @@
.option pic2
.set noat
lw $10, symbol($4)
# CHECK-LE: lw $10, %got(symbol)($gp) # encoding: [A,A,0x8a,0x8f]
# CHECK-LE: # fixup A - offset: 0, value: %got(symbol), kind: fixup_Mips_GOT
# CHECK-LE: addu $10, $10, $4 # encoding: [0x21,0x50,0x44,0x01]
# CHECK-LE: lw $10, 0($10) # encoding: [0x00,0x00,0x4a,0x8d]
# GOT: lw $10, %got(symbol)($gp) # encoding: [A,A,0x8a,0x8f]
# GOT-NEXT: # fixup A - offset: 0, value: %got(symbol), kind: fixup_Mips_GOT
# GOT-NEXT: addu $10, $10, $4 # encoding: [0x21,0x50,0x44,0x01]
# GOT-NEXT: lw $10, 0($10) # encoding: [0x00,0x00,0x4a,0x8d]
.set at
sw $10, symbol($9)
# CHECK-LE: lw $1, %got(symbol)($gp) # encoding: [A,A,0x81,0x8f]
# CHECK-LE: # fixup A - offset: 0, value: %got(symbol), kind: fixup_Mips_GOT
# CHECK-LE: addu $1, $1, $9 # encoding: [0x21,0x08,0x29,0x00]
# CHECK-LE: sw $10, 0($1) # encoding: [0x00,0x00,0x2a,0xac]
# GOT: lw $1, %got(symbol)($gp) # encoding: [A,A,0x81,0x8f]
# GOT-NEXT: # fixup A - offset: 0, value: %got(symbol), kind: fixup_Mips_GOT
# GOT-NEXT: addu $1, $1, $9 # encoding: [0x21,0x08,0x29,0x00]
# GOT-NEXT: sw $10, 0($1) # encoding: [0x00,0x00,0x2a,0xac]
lw $8, 1f+8
# CHECK-LE: lw $8, %got($tmp0)($gp) # encoding: [A,A,0x88,0x8f]
# CHECK-LE-NEXT: # fixup A - offset: 0, value: %got($tmp0), kind: fixup_Mips_GOT
# CHECK-LE-NEXT: addiu $8, $8, %lo($tmp0) # encoding: [A,A,0x08,0x25]
# CHECK-LE-NEXT: # fixup A - offset: 0, value: %lo($tmp0), kind: fixup_Mips_LO16
# CHECK-LE-NEXT: lw $8, 8($8) # encoding: [0x08,0x00,0x08,0x8d]
# GOT: lw $8, %got($tmp0)($gp) # encoding: [A,A,0x88,0x8f]
# GOT-NEXT: # fixup A - offset: 0, value: %got($tmp0), kind: fixup_Mips_GOT
# GOT-NEXT: addiu $8, $8, %lo($tmp0) # encoding: [A,A,0x08,0x25]
# GOT-NEXT: # fixup A - offset: 0, value: %lo($tmp0), kind: fixup_Mips_LO16
# GOT-NEXT: lw $8, 8($8) # encoding: [0x08,0x00,0x08,0x8d]
sw $8, 1f+8
# CHECK-LE: lw $1, %got($tmp0)($gp) # encoding: [A,A,0x81,0x8f]
# CHECK-LE-NEXT: # fixup A - offset: 0, value: %got($tmp0), kind: fixup_Mips_GOT
# CHECK-LE-NEXT: addiu $1, $1, %lo($tmp0) # encoding: [A,A,0x21,0x24]
# CHECK-LE-NEXT: # fixup A - offset: 0, value: %lo($tmp0), kind: fixup_Mips_LO16
# CHECK-LE-NEXT: sw $8, 8($1) # encoding: [0x08,0x00,0x28,0xac]
# GOT: lw $1, %got($tmp0)($gp) # encoding: [A,A,0x81,0x8f]
# GOT-NEXT: # fixup A - offset: 0, value: %got($tmp0), kind: fixup_Mips_GOT
# GOT-NEXT: addiu $1, $1, %lo($tmp0) # encoding: [A,A,0x21,0x24]
# GOT-NEXT: # fixup A - offset: 0, value: %lo($tmp0), kind: fixup_Mips_LO16
# GOT-NEXT: sw $8, 8($1) # encoding: [0x08,0x00,0x28,0xac]
lw $10, 655483($4)
# CHECK-LE: lui $10, 10 # encoding: [0x0a,0x00,0x0a,0x3c]
# CHECK-LE: addu $10, $10, $4 # encoding: [0x21,0x50,0x44,0x01]
# CHECK-LE: lw $10, 123($10) # encoding: [0x7b,0x00,0x4a,0x8d]
# GOT: lui $10, 10 # encoding: [0x0a,0x00,0x0a,0x3c]
# GOT-NEXT: addu $10, $10, $4 # encoding: [0x21,0x50,0x44,0x01]
# GOT-NEXT: lw $10, 123($10) # encoding: [0x7b,0x00,0x4a,0x8d]
sw $10, 123456($9)
# CHECK-LE: lui $1, 2 # encoding: [0x02,0x00,0x01,0x3c]
# CHECK-LE: addu $1, $1, $9 # encoding: [0x21,0x08,0x29,0x00]
# CHECK-LE: sw $10, -7616($1) # encoding: [0x40,0xe2,0x2a,0xac]
# GOT: lui $1, 2 # encoding: [0x02,0x00,0x01,0x3c]
# GOT-NEXT: addu $1, $1, $9 # encoding: [0x21,0x08,0x29,0x00]
# GOT-NEXT: sw $10, -7616($1) # encoding: [0x40,0xe2,0x2a,0xac]
lw $8, symbol+8
# CHECK-LE: lw $8, %got(symbol)($gp) # encoding: [A,A,0x88,0x8f]
# CHECK-LE-NEXT: # fixup A - offset: 0, value: %got(symbol), kind: fixup_Mips_GOT
# CHECK-LE-NEXT: lw $8, 8($8) # encoding: [0x08,0x00,0x08,0x8d]
# GOT: lw $8, %got(symbol)($gp) # encoding: [A,A,0x88,0x8f]
# GOT-NEXT: # fixup A - offset: 0, value: %got(symbol), kind: fixup_Mips_GOT
# GOT-NEXT: lw $8, 8($8) # encoding: [0x08,0x00,0x08,0x8d]
sw $8, symbol+8
# CHECK-LE: lw $1, %got(symbol)($gp) # encoding: [A,A,0x81,0x8f]
# CHECK-LE-NEXT: # fixup A - offset: 0, value: %got(symbol), kind: fixup_Mips_GOT
# CHECK-LE-NEXT: sw $8, 8($1) # encoding: [0x08,0x00,0x28,0xac]
# GOT: lw $1, %got(symbol)($gp) # encoding: [A,A,0x81,0x8f]
# GOT-NEXT: # fixup A - offset: 0, value: %got(symbol), kind: fixup_Mips_GOT
# GOT-NEXT: sw $8, 8($1) # encoding: [0x08,0x00,0x28,0xac]
ldc1 $f0, symbol
# CHECK-LE: lw $1, %got(symbol)($gp) # encoding: [A,A,0x81,0x8f]
# CHECK-LE: # fixup A - offset: 0, value: %got(symbol), kind: fixup_Mips_GOT
# CHECK-LE: ldc1 $f0, 0($1) # encoding: [0x00,0x00,0x20,0xd4]
# GOT: lw $1, %got(symbol)($gp) # encoding: [A,A,0x81,0x8f]
# GOT-NEXT: # fixup A - offset: 0, value: %got(symbol), kind: fixup_Mips_GOT
# GOT-NEXT: ldc1 $f0, 0($1) # encoding: [0x00,0x00,0x20,0xd4]
sdc1 $f0, symbol
# CHECK-LE: lw $1, %got(symbol)($gp) # encoding: [A,A,0x81,0x8f]
# CHECK-LE: # fixup A - offset: 0, value: %got(symbol), kind: fixup_Mips_GOT
# CHECK-LE: sdc1 $f0, 0($1) # encoding: [0x00,0x00,0x20,0xf4]
# GOT: lw $1, %got(symbol)($gp) # encoding: [A,A,0x81,0x8f]
# GOT-NEXT: # fixup A - offset: 0, value: %got(symbol), kind: fixup_Mips_GOT
# GOT-NEXT: sdc1 $f0, 0($1) # encoding: [0x00,0x00,0x20,0xf4]
.option pic0
# Test BNE with an immediate as the 2nd operand.

View File

@ -1,4 +1,5 @@
# RUN: llvm-mc %s -triple=mips64el-unknown-linux -show-encoding -mcpu=mips64r2 | FileCheck %s
# RUN: llvm-mc %s -triple=mips64el-unknown-linux -mcpu=mips64r2 \
# RUN: -show-encoding | FileCheck --check-prefixes=CHECK,GOT %s
# Check that signed negative 32-bit immediates are loaded correctly:
li $10, ~(0x101010)
@ -470,48 +471,48 @@ sym:
# LW/SW and LDC1/SDC1 of symbol address, done by MipsAsmParser::expandMemInst():
.option pic2
lw $10, symbol($4)
# CHECK: ld $10, %got_disp(symbol)($gp) # encoding: [A,A,0x8a,0xdf]
# CHECK: # fixup A - offset: 0, value: %got_disp(symbol), kind: fixup_Mips_GOT_DISP
# CHECK: daddu $10, $10, $4 # encoding: [0x2d,0x50,0x44,0x01]
# CHECK: lw $10, 0($10) # encoding: [0x00,0x00,0x4a,0x8d]
# GOT: ld $10, %got_disp(symbol)($gp) # encoding: [A,A,0x8a,0xdf]
# GOT-NEXT: # fixup A - offset: 0, value: %got_disp(symbol), kind: fixup_Mips_GOT_DISP
# GOT-NEXT: daddu $10, $10, $4 # encoding: [0x2d,0x50,0x44,0x01]
# GOT-NEXT: lw $10, 0($10) # encoding: [0x00,0x00,0x4a,0x8d]
sw $10, symbol($9)
# CHECK: ld $1, %got_disp(symbol)($gp) # encoding: [A,A,0x81,0xdf]
# CHECK: # fixup A - offset: 0, value: %got_disp(symbol), kind: fixup_Mips_GOT_DISP
# CHECK: daddu $1, $1, $9 # encoding: [0x2d,0x08,0x29,0x00]
# CHECK: sw $10, 0($1) # encoding: [0x00,0x00,0x2a,0xac]
# GOT: ld $1, %got_disp(symbol)($gp) # encoding: [A,A,0x81,0xdf]
# GOT-NEXT: # fixup A - offset: 0, value: %got_disp(symbol), kind: fixup_Mips_GOT_DISP
# GOT-NEXT: daddu $1, $1, $9 # encoding: [0x2d,0x08,0x29,0x00]
# GOT-NEXT: sw $10, 0($1) # encoding: [0x00,0x00,0x2a,0xac]
lw $8, sym+8
# CHECK: ld $8, %got_disp(sym)($gp) # encoding: [A,A,0x88,0xdf]
# CHECK-NEXT: # fixup A - offset: 0, value: %got_disp(sym), kind: fixup_Mips_GOT_DISP
# CHECK-NEXT: lw $8, 8($8) # encoding: [0x08,0x00,0x08,0x8d]
# GOT: ld $8, %got_disp(sym)($gp) # encoding: [A,A,0x88,0xdf]
# GOT-NEXT: # fixup A - offset: 0, value: %got_disp(sym), kind: fixup_Mips_GOT_DISP
# GOT-NEXT: lw $8, 8($8) # encoding: [0x08,0x00,0x08,0x8d]
sw $8, sym+8
# CHECK: ld $1, %got_disp(sym)($gp) # encoding: [A,A,0x81,0xdf]
# CHECK-NEXT: # fixup A - offset: 0, value: %got_disp(sym), kind: fixup_Mips_GOT_DISP
# CHECK-NEXT: sw $8, 8($1) # encoding: [0x08,0x00,0x28,0xac]
# GOT: ld $1, %got_disp(sym)($gp) # encoding: [A,A,0x81,0xdf]
# GOT-NEXT: # fixup A - offset: 0, value: %got_disp(sym), kind: fixup_Mips_GOT_DISP
# GOT-NEXT: sw $8, 8($1) # encoding: [0x08,0x00,0x28,0xac]
lw $10, 655483($4)
# CHECK: lui $10, 10 # encoding: [0x0a,0x00,0x0a,0x3c]
# CHECK: daddu $10, $10, $4 # encoding: [0x2d,0x50,0x44,0x01]
# CHECK: lw $10, 123($10) # encoding: [0x7b,0x00,0x4a,0x8d]
# GOT: lui $10, 10 # encoding: [0x0a,0x00,0x0a,0x3c]
# GOT-NEXT: daddu $10, $10, $4 # encoding: [0x2d,0x50,0x44,0x01]
# GOT-NEXT: lw $10, 123($10) # encoding: [0x7b,0x00,0x4a,0x8d]
sw $10, 123456($9)
# CHECK: lui $1, 2 # encoding: [0x02,0x00,0x01,0x3c]
# CHECK: daddu $1, $1, $9 # encoding: [0x2d,0x08,0x29,0x00]
# CHECK: sw $10, -7616($1) # encoding: [0x40,0xe2,0x2a,0xac]
# GOT: lui $1, 2 # encoding: [0x02,0x00,0x01,0x3c]
# GOT-NEXT: daddu $1, $1, $9 # encoding: [0x2d,0x08,0x29,0x00]
# GOT-NEXT: sw $10, -7616($1) # encoding: [0x40,0xe2,0x2a,0xac]
lw $8, symbol+8
# CHECK: ld $8, %got_disp(symbol)($gp) # encoding: [A,A,0x88,0xdf]
# CHECK-NEXT: # fixup A - offset: 0, value: %got_disp(symbol), kind: fixup_Mips_GOT_DISP
# CHECK-NEXT: lw $8, 8($8) # encoding: [0x08,0x00,0x08,0x8d]
# GOT: ld $8, %got_disp(symbol)($gp) # encoding: [A,A,0x88,0xdf]
# GOT-NEXT: # fixup A - offset: 0, value: %got_disp(symbol), kind: fixup_Mips_GOT_DISP
# GOT-NEXT: lw $8, 8($8) # encoding: [0x08,0x00,0x08,0x8d]
sw $8, symbol+8
# CHECK: ld $1, %got_disp(symbol)($gp) # encoding: [A,A,0x81,0xdf]
# CHECK-NEXT: # fixup A - offset: 0, value: %got_disp(symbol), kind: fixup_Mips_GOT_DISP
# CHECK-NEXT: sw $8, 8($1) # encoding: [0x08,0x00,0x28,0xac]
# GOT: ld $1, %got_disp(symbol)($gp) # encoding: [A,A,0x81,0xdf]
# GOT-NEXT: # fixup A - offset: 0, value: %got_disp(symbol), kind: fixup_Mips_GOT_DISP
# GOT-NEXT: sw $8, 8($1) # encoding: [0x08,0x00,0x28,0xac]
ldc1 $f0, symbol
# CHECK: ld $1, %got_disp(symbol)($gp) # encoding: [A,A,0x81,0xdf]
# CHECK: # fixup A - offset: 0, value: %got_disp(symbol), kind: fixup_Mips_GOT_DISP
# CHECK: ldc1 $f0, 0($1) # encoding: [0x00,0x00,0x20,0xd4]
# GOT: ld $1, %got_disp(symbol)($gp) # encoding: [A,A,0x81,0xdf]
# GOT-NEXT: # fixup A - offset: 0, value: %got_disp(symbol), kind: fixup_Mips_GOT_DISP
# GOT-NEXT: ldc1 $f0, 0($1) # encoding: [0x00,0x00,0x20,0xd4]
sdc1 $f0, symbol
# CHECK: ld $1, %got_disp(symbol)($gp) # encoding: [A,A,0x81,0xdf]
# CHECK: # fixup A - offset: 0, value: %got_disp(symbol), kind: fixup_Mips_GOT_DISP
# CHECK: sdc1 $f0, 0($1) # encoding: [0x00,0x00,0x20,0xf4]
# GOT: ld $1, %got_disp(symbol)($gp) # encoding: [A,A,0x81,0xdf]
# GOT-NEXT: # fixup A - offset: 0, value: %got_disp(symbol), kind: fixup_Mips_GOT_DISP
# GOT-NEXT: sdc1 $f0, 0($1) # encoding: [0x00,0x00,0x20,0xf4]