MIPS: fix r6 testsuites

Introduce
	run_dump_test_o32l
	run_dump_test_n32l
	run_dump_test_n64l
Which use `-march=from-abi` for pre-R6 testcases,
like micromips/mips16e etc.

For cases doesn't use run_dump_test_*, we use
	-mips32r2 for micromips32
	-mips1 for mips16-32
	-march=from-abi for testcases to o32/n32/n64 both/all.

Replace `addi` with `addiu` for some cases for both r6 and pre-R6.

Introduce some new testcases for r6 with FPXX/FP64.
Introduce new testcase: comdat-reloc-r6.

Skip `default` in mips_arch_list_matching if triple is mipsisa*, due to:
  1)it will cannot match mipsr6@*.d: since mips32rN/mips64rN
    will always be used, it won't be a problem.
  2)some test think -march=mips64rN will alway true for mipsisa64rN,
    which is not true now.

This patch fix testsuite for all r6-default gnu triples:
  mipsisa32r6-linux-gnu
  mipsisa32r6el-linux-gnu
  mips-img-linux-gnu
  mipsel-img-linux-gnu
  mipsisa64r6-linux-gnu
  mipsisa64r6el-linux-gnu
This commit is contained in:
YunQiang Su
2023-05-10 15:50:19 +08:00
parent be0d391f22
commit ffc528aed5
182 changed files with 616 additions and 344 deletions

View File

@@ -52,7 +52,8 @@ proc run_dump_test_abi { abi name args } {
set ldflags $abi_ldflags($abi)
set args [lreplace $args 0 0]
}
if !$has_abi($abi) {
set abi_r [regsub "l$" $abi {}]
if !$has_abi($abi_r) {
lappend args {notarget *-*-*}
}
@@ -74,6 +75,13 @@ proc run_dump_test_abi { abi name args } {
proc run_dump_test_o32 { name args } {
run_dump_test_abi o32 $name [lindex $args 0]
}
proc run_dump_test_o32l { name args } {
if {[istarget *-linux*] || [istarget *-img-elf]} {
run_dump_test_abi o32l $name [lindex $args 0]
} else {
run_dump_test_abi o32 $name [lindex $args 0]
}
}
# run_dump_test_n32 NAME ARGS
#
@@ -82,6 +90,13 @@ proc run_dump_test_o32 { name args } {
proc run_dump_test_n32 { name args } {
run_dump_test_abi n32 $name [lindex $args 0]
}
proc run_dump_test_n32l { name args } {
if {[istarget *-linux*] || [istarget *-img-elf]} {
run_dump_test_abi n32l $name [lindex $args 0]
} else {
run_dump_test_abi n32 $name [lindex $args 0]
}
}
# run_dump_test_n64 NAME ARGS
#
@@ -90,6 +105,13 @@ proc run_dump_test_n32 { name args } {
proc run_dump_test_n64 { name args } {
run_dump_test_abi n64 $name [lindex $args 0]
}
proc run_dump_test_n64l { name args } {
if {[istarget *-linux*] || [istarget *-img-elf]} {
run_dump_test_abi n64l $name [lindex $args 0]
} else {
run_dump_test_abi n64 $name [lindex $args 0]
}
}
set has_abi(o32) [expr ![istarget *-*-openbsd*] \
&& ![istarget mips64*el-ps2-elf*]]
@@ -109,49 +131,68 @@ set has_abi(n64) [expr [istarget *-*-freebsd*] \
|| [istarget *-*-openbsd*]]
# Set defaults.
# ABI with l tail means legacy, aka pre-R6.
# Please use them, if the test only suite for pre-R6,
# such as mips16/micromips tests.
set abi_asflags(o32) ""
set abi_asflags(o32l) ""
set abi_asflags(n32) ""
set abi_asflags(n32l) ""
set abi_asflags(n64) ""
set abi_asflags(n64l) ""
set abi_asflags(eabi) ""
set abi_ldflags(o32) ""
set abi_ldflags(o32l) ""
set abi_ldflags(n32) ""
set abi_ldflags(n32l) ""
set abi_ldflags(n64) ""
set abi_ldflags(n64l) ""
set abi_ldflags(eabi) ""
# Override as needed.
if {[istarget *-*-openbsd*] } {
set irixemul 0
} elseif { [istarget mips64*-*-linux*] } {
} elseif { [istarget mips*64*-*-linux*] } {
set abi_asflags(o32) -32
set abi_asflags(o32l) "-32 -march=from-abi"
set abi_asflags(n32) ""
set abi_asflags(n32l) "-n32 -march=from-abi"
set abi_asflags(n64) "-64"
set abi_asflags(n64l) "-march=from-abi -64"
if [istarget *el-*-*] {
set abi_asflags(o32) -32
set abi_ldflags(o32) -melf32ltsmip
set abi_asflags(n64) "-march=from-abi -64"
set abi_ldflags(o32l) -melf32ltsmip
set abi_ldflags(n64) -melf64ltsmip
set abi_ldflags(n64l) -melf64ltsmip
} else {
set abi_asflags(o32) -32
set abi_ldflags(o32) -melf32btsmip
set abi_asflags(n64) "-march=from-abi -64"
set abi_ldflags(o32l) -melf32btsmip
set abi_ldflags(n64) -melf64btsmip
set abi_ldflags(n64l) -melf64btsmip
}
set irixemul 0
} elseif {[istarget *-*-linux*] } {
} elseif {[istarget *-*-linux*] || [istarget *-img-elf] } {
set abi_asflags(o32) ""
set abi_asflags(o32l) "-march=from-abi"
set abi_asflags(n32) "-n32"
set abi_asflags(n32l) "-n32 -march=from-abi"
set abi_asflags(n64) "-64"
set abi_asflags(n64l) "-64 -march=from-abi"
if [istarget *el-*-*] {
set abi_asflags(n32) "-march=from-abi -n32"
set abi_ldflags(n32) -melf32ltsmipn32
set abi_asflags(n64) "-march=from-abi -64"
set abi_ldflags(n32l) -melf32ltsmipn32
set abi_ldflags(n64) -melf64ltsmip
set abi_ldflags(n64l) -melf64ltsmip
} else {
set abi_asflags(n32) "-march=from-abi -n32"
set abi_ldflags(n32) -melf32btsmipn32
set abi_asflags(n64) "-march=from-abi -64"
set abi_ldflags(n32l) -melf32btsmipn32
set abi_ldflags(n64) -melf64btsmip
set abi_ldflags(n64l) -melf64btsmip
}
set irixemul 0
} elseif {[istarget *-img-elf*] \
|| [istarget *-mti-elf*] \
} elseif {[istarget *-mti-elf*] \
|| [istarget *-sde-elf*] \
|| [istarget *-*-netbsd*] \
|| [istarget *-*-linux*] \
|| [istarget *-*-sysv4*] } {
if [istarget *el-*-*] {
set abi_asflags(o32) -32
@@ -229,11 +270,13 @@ run_dump_test "mips-xpa-virt-3"
run_dump_test "mips-xpa-virt-4"
run_dump_test_o32 "mixed-mips16" noarch
run_dump_test_o32 "mixed-micromips" noarch
run_dump_test "mixed-mips16-micromips"
run_dump_test_o32l "mixed-mips16-micromips"
run_dump_test_n32l "mixed-mips16-micromips"
run_dump_test_n64l "mixed-mips16-micromips"
run_dump_test_o32 "mips16-undecoded" noarch
run_dump_test_o32 "mips16e2-undecoded" noarch
run_dump_test_o32 "mips16-pcrel"
run_dump_test_o32 "mips16-extend-noinsn"
run_dump_test_o32l "mips16-extend-noinsn"
run_dump_test_o32 "mips16-extend-insn" noarch
run_dump_test_o32 "mips16e2-extend-insn" noarch
run_dump_test_o32 "mips16-alias" noarch

View File

@@ -1,5 +1,5 @@
# source: align2.s
# as: -EL
# as: -EL -march=from-abi
# objdump: -dr
.* file format .*

View File

@@ -1,4 +1,4 @@
# as: -EB
# as: -EB -march=from-abi
# objdump: -dr
.* file format .*

View File

@@ -1,4 +1,4 @@
#as: -32
#as: -32 -mips1
#source: attr-gnu-abi-fp-1.s
#readelf: -A
#name: MIPS gnu_attribute Tag_GNU_MIPS_ABI_FP,1

View File

@@ -0,0 +1,21 @@
#as: -32 -mips2 -mfpxx
#source: attr-gnu-abi-fp-5.s
#readelf: -A
#name: MIPS gnu_attribute Tag_GNU_MIPS_ABI_FP,5
Attribute Section: gnu
File Attributes
Tag_GNU_MIPS_ABI_FP: Hard float \(32-bit CPU, Any FPU\)
MIPS ABI Flags Version: 0
ISA: MIPS.*
GPR size: 32
CPR1 size: 32
CPR2 size: 0
FP ABI: Hard float \(32-bit CPU, Any FPU\)
ISA Extension: .*
ASEs:
None
FLAGS 1: 0000000.
FLAGS 2: 00000000

View File

@@ -0,0 +1 @@
.gnu_attribute Tag_GNU_MIPS_ABI_FP,5

View File

@@ -0,0 +1,21 @@
#as: -32 -mips32r2 -mfp64
#source: attr-gnu-abi-fp-6.s
#readelf: -A
#name: MIPS gnu_attribute Tag_GNU_MIPS_ABI_FP,6
Attribute Section: gnu
File Attributes
Tag_GNU_MIPS_ABI_FP: Hard float \(32-bit CPU, 64-bit FPU\)
MIPS ABI Flags Version: 0
ISA: MIPS.*
GPR size: 32
CPR1 size: 64
CPR2 size: 0
FP ABI: Hard float \(32-bit CPU, 64-bit FPU\)
ISA Extension: .*
ASEs:
None
FLAGS 1: 0000000.
FLAGS 2: 00000000

View File

@@ -0,0 +1 @@
.gnu_attribute Tag_GNU_MIPS_ABI_FP,6

View File

@@ -4,7 +4,7 @@
Attribute Section: gnu
File Attributes
Tag_GNU_MIPS_ABI_FP: Hard float \(double precision\)
Tag_GNU_MIPS_ABI_FP: Hard float \(.*\)
Tag_GNU_MIPS_ABI_MSA: 128-bit MSA
#...

View File

@@ -1,6 +1,6 @@
#objdump: -dr --prefix-addresses --show-raw-insn
#name: MIPS branch to absolute expression with addend
#as: -32
#as: -32 -mips2
.*: +file format .*mips.*

View File

@@ -1,6 +1,6 @@
#objdump: -dr --prefix-addresses --show-raw-insn
#name: MIPS branch to absolute expression
#as: -32
#as: -32 -mips2
.*: +file format .*mips.*

View File

@@ -1,6 +1,6 @@
#objdump: -dr --prefix-addresses --show-raw-insn
#name: microMIPS BAL addend encoding
#as: -32
#as: -32 -mips32r2
.*: +file format .*mips.*

View File

@@ -1,6 +1,6 @@
#objdump: -dr --prefix-addresses --show-raw-insn
#name: MIPS BAL addend encoding
#as: -32
#as: -32 -mips32r2
.*: +file format .*mips.*

View File

@@ -1,6 +1,6 @@
#objdump: -dr --prefix-addresses --show-raw-insn
#name: microMIPS branch to an external symbol
#as: -32 -KPIC -mmicromips
#as: -32 -KPIC -mips32r2 -mmicromips
#source: branch-extern.s
.*: +file format .*mips.*

View File

@@ -1,6 +1,6 @@
#objdump: -dr --prefix-addresses --show-raw-insn
#name: microMIPS relaxed branch to an external symbol
#as: -32 -KPIC -mmicromips --relax-branch
#as: -32 -KPIC -mips32r2 -mmicromips --relax-branch
#source: branch-extern.s
#warning_output: branch-extern.l

View File

@@ -1,6 +1,6 @@
#objdump: -dr --prefix-addresses --show-raw-insn
#name: MIPS branch local symbol relocation 1
#as: -32
#as: -32 -mips32r2
#source: branch-local-1.s
.*: +file format .*mips.*

View File

@@ -1,3 +1,3 @@
#name: MIPS branch local symbol relocation 2
#as: -32
#as: -32 -mips32r2
#error_output: branch-local-2.l

View File

@@ -1,3 +1,3 @@
#name: MIPS branch local symbol relocation 3
#as: -32
#as: -32 -mips32r2
#error_output: branch-local-3.l

View File

@@ -1,6 +1,6 @@
#objdump: -dr --prefix-addresses --show-raw-insn
#name: MIPS branch local symbol relocation 4
#as: -32
#as: -32 -mips32r2
#source: branch-local-4.s
.*: +file format .*mips.*

View File

@@ -1,3 +1,3 @@
#name: MIPS branch local symbol relocation 5
#as: -32
#as: -32 -mips1
#error_output: branch-local-5.l

View File

@@ -1,3 +1,3 @@
#name: MIPS branch local symbol relocation 6
#as: -32
#as: -32 -mips32r2
#error_output: branch-local-6.l

View File

@@ -1,6 +1,6 @@
#objdump: -dr --prefix-addresses --show-raw-insn
#name: MIPS branch local symbol relocation 7
#as: -32
#as: -32 -mips32r2
#source: branch-local-7.s
.*: +file format .*mips.*

View File

@@ -1,6 +1,6 @@
#objdump: -dr --prefix-addresses --show-raw-insn
#name: MIPS branch local symbol relocation 2 (ignore branch ISA)
#as: -32 -mignore-branch-isa
#as: -32 -mips32r2 -mignore-branch-isa
#source: branch-local-2.s
.*: +file format .*mips.*

View File

@@ -1,6 +1,6 @@
#objdump: -dr --prefix-addresses --show-raw-insn -mmips:isa32r6
#name: MIPS branch local symbol relocation 3 (ignore branch ISA)
#as: -32 -mignore-branch-isa
#as: -32 -mips32r2 -mignore-branch-isa
#source: branch-local-3.s
.*: +file format .*mips.*

View File

@@ -1,6 +1,6 @@
#objdump: -dr --prefix-addresses --show-raw-insn
#name: MIPS branch local symbol relocation 5 (ignore branch ISA)
#as: -32 -mignore-branch-isa
#as: -32 -mips1 -mignore-branch-isa
#source: branch-local-5.s
.*: +file format .*mips.*

View File

@@ -1,6 +1,6 @@
#objdump: -dr --prefix-addresses --show-raw-insn
#name: MIPS branch local symbol relocation 6 (ignore branch ISA)
#as: -32 -mignore-branch-isa
#as: -32 -mips32r2 -mignore-branch-isa
#source: branch-local-6.s
.*: +file format .*mips.*

View File

@@ -12,6 +12,6 @@ Disassembly of section \.text:
\.\.\.
Disassembly of section \.init:
[0-9a-f]+ <[^>]*> 03e00008 jr ra
[0-9a-f]+ <[^>]*> 03e0000[89] jr ra
[0-9a-f]+ <[^>]*> 00000000 nop
\.\.\.

View File

@@ -1,6 +1,6 @@
#objdump: -dr --prefix-addresses --show-raw-insn
#name: microMIPS branch to a different section
#as: -32 -mmicromips
#as: -32 -mips32r2 -mmicromips
#source: branch-section.s
.*: +file format .*mips.*

View File

@@ -1,6 +1,6 @@
#objdump: -dr --prefix-addresses --show-raw-insn
#name: MIPS relaxed branch to a different section
#as: -32 --relax-branch
#as: -32 -mips32r2 --relax-branch
#source: branch-section.s
#warning_output: branch-section.l

View File

@@ -1,6 +1,6 @@
#objdump: -dr --prefix-addresses --show-raw-insn
#name: microMIPS relaxed branch to a different section
#as: -32 -mmicromips --relax-branch
#as: -32 -mips32r2 -mmicromips --relax-branch
#source: branch-section.s
#warning_output: branch-section.l

View File

@@ -10,6 +10,6 @@ Disassembly of section \.text:
[ ]*[0-9a-f]+: R_MIPS_PC16 bar
[0-9a-f]+ <[^>]*> 00000000 nop
\.\.\.
[0-9a-f]+ <[^>]*> 03e00008 jr ra
[0-9a-f]+ <[^>]*> 03e0000[89] jr ra
[0-9a-f]+ <[^>]*> 00000000 nop
\.\.\.

View File

@@ -1,6 +1,6 @@
#objdump: -dr --prefix-addresses --show-raw-insn
#name: microMIPS branch to a weak symbol
#as: -32 -mmicromips --defsym align=12
#as: -32 -mips32r2 -mmicromips --defsym align=12
#source: branch-weak.s
.*: +file format .*mips.*

View File

@@ -1,6 +1,6 @@
#objdump: -dr --prefix-addresses --show-raw-insn
#name: MIPS relaxed branch to a weak symbol
#as: -32 --relax-branch --defsym align=12
#as: -32 -mips1 --relax-branch --defsym align=12
#source: branch-weak.s
#warning_output: branch-weak.l

View File

@@ -1,6 +1,6 @@
#objdump: -dr --prefix-addresses --show-raw-insn
#name: microMIPS relaxed branch to a weak symbol
#as: -32 -mmicromips --relax-branch --defsym align=12
#as: -32 -mips32r2 -mmicromips --relax-branch --defsym align=12
#source: branch-weak.s
#warning_output: branch-weak.l

View File

@@ -1,6 +1,6 @@
#objdump: -dr --prefix-addresses --show-raw-insn
#name: microMIPS short branch to a weak symbol
#as: -32 -mmicromips --defsym align=4
#as: -32 -mips32r2 -mmicromips --defsym align=4
#source: branch-weak.s
.*: +file format .*mips.*

View File

@@ -1,6 +1,6 @@
#objdump: -dr --prefix-addresses --show-raw-insn
#name: MIPS16 branch to a weak symbol
#as: -32 -mips16 --defsym align=12
#as: -32 -mips1 -mips16 --defsym align=12
#source: branch-weak.s
.*: +file format .*mips.*

View File

@@ -1,6 +1,6 @@
#objdump: -dr --prefix-addresses --show-raw-insn
#name: MIPS16 short branch to a weak symbol
#as: -32 -mips16 --defsym align=4
#as: -32 -mips1 -mips16 --defsym align=4
#source: branch-weak.s
.*: +file format .*mips.*

View File

@@ -0,0 +1,34 @@
#readelf: -gr
#name: MIPS ELF o32 PIC comdat GOT16/LO16 relocation pairing
#as: -32 -mno-pdr -mips32r6
#source: comdat-reloc.s
# Make sure the orphan GOT16 relocation is paired with LO16 for a local
# symbol in a comdat section, i.e. rather than this:
#
# 00000014 00000509 R_MIPS_GOT16 00000000 foo
# 00000020 00000506 R_MIPS_LO16 00000000 foo
# 0000001c 00000509 R_MIPS_GOT16 00000000 foo
#
# we have this:
#
# 00000014 00000509 R_MIPS_GOT16 00000000 foo
# 00000024 00000509 R_MIPS_GOT16 00000000 foo
# 0000001c 00000506 R_MIPS_LO16 00000000 foo
#...
COMDAT group section \[.....\] `\.group' \[bar\] contains .+ sections:
\[Index\] Name
\[.....\] \.text\.foo
\[.....\] \.text\.bar
#...
Relocation section '\.rel\.text\.bar' at offset .+ contains .+ entries:
Offset Info Type Sym\.Value Sym\. Name
00000000 ......05 R_MIPS_HI16 00000000 _gp_disp
00000004 ......06 R_MIPS_LO16 00000000 _gp_disp
0000000c 0000070a R_MIPS_PC16 00000020 \.L1\^B1
00000014 ......09 R_MIPS_GOT16 00000000 foo
00000024 ......09 R_MIPS_GOT16 00000000 foo
0000001c ......06 R_MIPS_LO16 00000000 foo
00000020 0000080a R_MIPS_PC16 00000018 \.L0\^B1
#pass

View File

@@ -1,6 +1,6 @@
#readelf: -gr
#name: MIPS ELF o32 PIC comdat GOT16/LO16 relocation pairing
#as: -32 -mno-pdr
#as: -32 -mno-pdr -mips1
# Make sure the orphan GOT16 relocation is paired with LO16 for a local
# symbol in a comdat section, i.e. rather than this:

View File

@@ -1,7 +1,7 @@
#objdump: -sr
#name: Compact EH EB #1 with personality ID and FDE data
#source: compact-eh-1.s
#as: -EB -mno-pdr
#as: -march=from-abi -EB -mno-pdr
.*: file format.*

View File

@@ -1,7 +1,7 @@
#objdump: -sr
#name: Compact EH EB #2 with personality routine and FDE data
#source: compact-eh-2.s
#as: -EB -mno-pdr
#as: -march=from-abi -EB -mno-pdr
.*: file format.*

View File

@@ -1,7 +1,7 @@
#objdump: -sr
#name: Compact EH EB #3 with personality id and large FDE data
#source: compact-eh-3.s
#as: -EB -mno-pdr
#as: -march=from-abi -EB -mno-pdr
.*: file format.*

View File

@@ -1,7 +1,7 @@
#objdump: -sr
#name: Compact EH EB #4 with personality id, FDE data and LSDA
#source: compact-eh-4.s
#as: -EB -mno-pdr
#as: -march=from-abi -EB -mno-pdr
.*: file format.*

View File

@@ -1,7 +1,7 @@
#objdump: -sr
#name: Compact EH EB #5 with personality routine, FDE data and LSDA
#source: compact-eh-5.s
#as: -EB -mno-pdr
#as: -march=from-abi -EB -mno-pdr
.*: file format.*

View File

@@ -1,7 +1,7 @@
#objdump: -sr
#name: Compact EH EB #6 with personality id, LSDA and large FDE data
#source: compact-eh-6.s
#as: -EB -mno-pdr
#as: -march=from-abi -EB -mno-pdr
.*: file format.*

View File

@@ -1,7 +1,7 @@
#objdump: -sr
#name: Compact EH EB #7 with personality id and fallback FDE
#source: compact-eh-7.s
#as: -EB -mno-pdr
#as: -march=from-abi -EB -mno-pdr
.*: file format.*

View File

@@ -1,7 +1,7 @@
#objdump: -sr
#name: Compact EH EL #1 with personality ID and FDE data
#source: compact-eh-1.s
#as: -EL -mno-pdr
#as: -march=from-abi -EL -mno-pdr
.*: file format.*

View File

@@ -1,7 +1,7 @@
#objdump: -sr
#name: Compact EH EL #2 with personality routine and FDE data
#source: compact-eh-2.s
#as: -EL -mno-pdr
#as: -march=from-abi -EL -mno-pdr
.*: file format.*

View File

@@ -1,7 +1,7 @@
#objdump: -sr
#name: Compact EH EL #3 with personality id and large FDE data
#source: compact-eh-3.s
#as: -EL -mno-pdr
#as: -march=from-abi -EL -mno-pdr
.*: file format.*

View File

@@ -1,7 +1,7 @@
#objdump: -sr
#name: Compact EH EL #4 with personality id, FDE data and LSDA
#source: compact-eh-4.s
#as: -EL -mno-pdr
#as: -march=from-abi -EL -mno-pdr
.*: file format.*

View File

@@ -1,7 +1,7 @@
#objdump: -sr
#name: Compact EH EL #5 with personality routine, FDE data and LSDA
#source: compact-eh-5.s
#as: -EL -mno-pdr
#as: -march=from-abi -EL -mno-pdr
.*: file format.*

View File

@@ -1,7 +1,7 @@
#objdump: -sr
#name: Compact EH EL #6 with personality id, LSDA and large FDE data
#source: compact-eh-6.s
#as: -EL -mno-pdr
#as: -march=from-abi -EL -mno-pdr
.*: file format.*

View File

@@ -1,7 +1,7 @@
#objdump: -sr
#name: Compact EH EL #7 with personality id and fallback FDE
#source: compact-eh-7.s
#as: -EL -mno-pdr
#as: -march=from-abi -EL -mno-pdr
.*: file format.*

View File

@@ -48,12 +48,12 @@ OFFSET +TYPE +VALUE
Contents of section \.text:
0000 3c010000 3c010000 3c010001 3c010001 .*
0010 3c010000 3c010001 20210018 2021001c .*
0020 20210018 2021001c 20218018 2021fffc .*
0010 3c010000 3c010001 24210018 2421001c .*
0020 24210018 2421001c 24218018 2421fffc .*
0030 3c010001 3c010001 3c010002 3c010002 .*
0040 3c010001 3c010001 2021bffe 2021c002 .*
0050 2021bffe 2021c002 20213ffe 2021bffa .*
0040 3c010001 3c010001 2421bffe 2421c002 .*
0050 2421bffe 2421c002 24213ffe 2421bffa .*
0060 3c010001 3c010001 3c010002 3c010002 .*
0070 3c010001 3c010001 2021bffe 2021c002 .*
0080 2021bffe 2021c002 20213ffe 2021bffa .*
0070 3c010001 3c010001 2421bffe 2421c002 .*
0080 2421bffe 2421c002 24213ffe 2421bffa .*
#pass

View File

@@ -12,12 +12,12 @@ l2 = l0+49150
lui $at,%hi(l0-4)
lui $at,%hi(l1+0x8000)
l1:
addi $at,$at,%lo(l1)
addi $at,$at,%lo(l1+0x10004)
addi $at,$at,%lo(l1+0x10000)
addi $at,$at,%lo(l1+4)
addi $at,$at,%lo(l1+0x8000)
addi $at,$at,%lo(l0-4)
addiu $at,$at,%lo(l1)
addiu $at,$at,%lo(l1+0x10004)
addiu $at,$at,%lo(l1+0x10000)
addiu $at,$at,%lo(l1+4)
addiu $at,$at,%lo(l1+0x8000)
addiu $at,$at,%lo(l0-4)
lui $at,%hi(l2)
lui $at,%hi(l2+4)
@@ -25,12 +25,12 @@ l1:
lui $at,%hi(l2+0x10004)
lui $at,%hi(l2-4)
lui $at,%hi(l2+0x8000)
addi $at,$at,%lo(l2)
addi $at,$at,%lo(l2+4)
addi $at,$at,%lo(l2+0x10000)
addi $at,$at,%lo(l2+0x10004)
addi $at,$at,%lo(l2+0x8000)
addi $at,$at,%lo(l2-4)
addiu $at,$at,%lo(l2)
addiu $at,$at,%lo(l2+4)
addiu $at,$at,%lo(l2+0x10000)
addiu $at,$at,%lo(l2+0x10004)
addiu $at,$at,%lo(l2+0x8000)
addiu $at,$at,%lo(l2-4)
lui $at,%hi((l2))
lui $at,%hi(((l2+4)))
@@ -38,9 +38,9 @@ l1:
lui $at,%hi(((((l2+0x10004)))))
lui $at,%hi((((((l2-4))))))
lui $at,%hi(((((((l2+0x8000)))))))
addi $at,$at,%lo((l2))
addi $at,$at,%lo(((l2+4)))
addi $at,$at,%lo((((l2+0x10000))))
addi $at,$at,%lo(((((l2+0x10004)))))
addi $at,$at,%lo((((((l2+0x8000))))))
addi $at,$at,%lo(((((((l2-4)))))))
addiu $at,$at,%lo((l2))
addiu $at,$at,%lo(((l2+4)))
addiu $at,$at,%lo((((l2+0x10000))))
addiu $at,$at,%lo(((((l2+0x10004)))))
addiu $at,$at,%lo((((((l2+0x8000))))))
addiu $at,$at,%lo(((((((l2-4)))))))

View File

@@ -1,6 +1,6 @@
#objdump: -dr --prefix-addresses
#name: MIPS ELF reloc 6
#as: -32
#as: -32 -mips1
.*: +file format elf.*mips.*

View File

@@ -1,7 +1,7 @@
# name: ELF microMIPS ASE markings 2
# source: nop.s
# objdump: -p
# as: -32 -mmicromips
# as: -32 -mips32r2 -mmicromips
.*:.*file format.*mips.*
private flags = [0-9a-f]*[2367abef]......: .*[[,]micromips[],].*

View File

@@ -1,7 +1,7 @@
# name: ELF microMIPS ASE markings
# source: empty.s
# objdump: -p
# as: -32 -mmicromips
# as: -32 -mips32r2 -mmicromips
.*:.*file format.*mips.*
!private flags = .*micromips.*

View File

@@ -1,7 +1,7 @@
# name: ELF MIPS16 ASE markings 2
# source: nop.s
# objdump: -p
# as: -32 -mips16
# as: -32 -mips1 -mips16
.*:.*file format.*mips.*
private flags = [0-9a-f]*[4-7c-f]......: .*[[,]mips16[],].*

View File

@@ -1,7 +1,7 @@
# name: ELF MIPS16 ASE markings
# source: empty.s
# objdump: -p
# as: -32 -mips16
# as: -32 -mips1 -mips16
.*:.*file format.*mips.*
!private flags = .*mips16.*

View File

@@ -49,12 +49,12 @@ OFFSET +TYPE +VALUE
Contents of section \.text:
0000 0000013c 0000013c 0100013c 0100013c .*
0010 0000013c 0100013c 18002120 1c002120 .*
0020 18002120 1c002120 18802120 fcff2120 .*
0010 0000013c 0100013c 18002124 1c002124 .*
0020 18002124 1c002124 18802124 fcff2124 .*
0030 0100013c 0100013c 0200013c 0200013c .*
0040 0100013c 0100013c febf2120 02c02120 .*
0050 febf2120 02c02120 fe3f2120 fabf2120 .*
0040 0100013c 0100013c febf2124 02c02124 .*
0050 febf2124 02c02124 fe3f2124 fabf2124 .*
0060 0100013c 0100013c 0200013c 0200013c .*
0070 0100013c 0100013c febf2120 02c02120 .*
0080 febf2120 02c02120 fe3f2120 fabf2120 .*
0070 0100013c 0100013c febf2124 02c02124 .*
0080 febf2124 02c02124 fe3f2124 fabf2124 .*
#pass

View File

@@ -1,6 +1,6 @@
#objdump: -dr --show-raw-insn
#name: microMIPS ISA mode for .insn label references
#as: -32
#as: -32 -mips32r2
.*: +file format .*mips.*

View File

@@ -1,5 +1,6 @@
#objdump: -dtz -j .text --prefix-addresses --show-raw-insn
#name: MIPS .insn default file options
#as: -march=from-abi
# Check that .insn at the beginning of assembly sees default file options
# such as the ISA mode right.

View File

@@ -1,6 +1,6 @@
#objdump: -dr --prefix-addresses --show-raw-insn
#name: MIPS JAL/JALX addend encoding
#as: -32
#as: -32 -mips32r2
.*: +file format .*mips.*

View File

@@ -1,6 +1,6 @@
#objdump: -dr --prefix-addresses --show-raw-insn
#name: MIPS JAL/JALX immediate operand encoding
#as: -32
#as: -32 -mips32r2
.*: +file format .*mips.*

View File

@@ -1,6 +1,6 @@
#objdump: -dr --prefix-addresses --show-raw-insn
#name: MIPS JALX local symbol relocation
#as: -32
#as: -32 -mips32r2
.*: +file format .*mips.*

View File

@@ -1,4 +1,4 @@
#as: -mfix-loongson2f-jump
#as: -march=loongson2f -mfix-loongson2f-jump
#objdump: -M reg-names=numeric -dr
#name: ST Microelectronics Loongson-2F workarounds of Jump Instruction issue

View File

@@ -1,6 +1,6 @@
#objdump: -dr --show-raw-insn
#name: microMIPS b16, bnez16, beqz16
#as: -32 -mmicromips
#as: -32 -mmicromips -mips32r2
#source: micromips-b16.s
.*: +file format .*mips.*

View File

@@ -1,6 +1,6 @@
#objdump: -dr --prefix-addresses --show-raw-insn
#name: microMIPS branch to absolute expression with addend
#as: -32
#as: -32 -mips32r2
.*: +file format .*mips.*

View File

@@ -1,6 +1,6 @@
#objdump: -dr --prefix-addresses --show-raw-insn
#name: microMIPS branch to absolute expression
#as: -32
#as: -32 -mips32r2
.*: +file format .*mips.*

View File

@@ -1,6 +1,6 @@
#objdump: -dr --prefix-addresses --show-raw-insn
#name: microMIPS fixed-size branch delay slots 1
#as: -32 -mmicromips
#as: -32 -mmicromips -mips32r2
#source: micromips-warn-branch-delay-1.s
.*: +file format .*mips.*

View File

@@ -1,6 +1,6 @@
#objdump: -dr --show-raw-insn -M gpr-names=numeric
#name: microMIPS fixed-size branch delay slots
#as: -mmicromips
#as: -mmicromips -march=from-abi
#source: micromips-warn-branch-delay.s
#warning_output: micromips-warn-branch-delay.l

View File

@@ -1,5 +1,5 @@
#objdump: -d
#as:
#as: -march=from-abi
#name: mips jalx-2
.*: file format .*

View File

@@ -296,7 +296,15 @@ proc mips_arch_list_matching {args} {
continue
}
if { [mips_arch_matches $arch $args] } {
lappend l $arch
# If the triple is mipsisa32*/mipsisa64*, we skip the 'default'
# Since it will always run.
if { [string compare $arch default] == 0 && [istarget mipsisa32*-*] } {
continue
} elseif { [string compare $arch default] == 0 && [istarget mipsisa64*-*] } {
continue
} else {
lappend l $arch
}
}
}
return $l
@@ -556,7 +564,8 @@ if { [istarget mips*-*-vxworks*] } {
"MIPS invalid switch to SVR4 PIC from VxWorks PIC"
} elseif { [istarget mips*-*-*] } {
set addr32 [expr [istarget mipstx39*-*-*] || [istarget mips-*-linux*] || [istarget mipsel-*-linux*] \
|| [istarget mipsisa32*-*-linux*] || [istarget mipsisa32*el-*-linux*]]
|| [istarget mipsisa32*-*-linux*] || [istarget mipsisa32*el-*-linux*] \
|| [istarget mips-*-elf] || [istarget mipsel-*-elf]]
set has_newabi [expr [istarget *-*-irix6*] || [istarget mips*-*-linux*] \
|| [istarget mips*-sde-elf*] || [istarget mips*-mti-elf*] \
|| [istarget mips*-img-elf*]]
@@ -621,7 +630,7 @@ if { [istarget mips*-*-vxworks*] } {
# we use and some space will have been already consumed. The exact
# amount depends on the host's programming model.
for { set count 960 } { $count <= 1024 } { incr count } {
run_list_test "branch-swap-2" "--defsym count=$count" \
run_list_test "branch-swap-2" "-march=from-abi --defsym count=$count" \
"MIPS branch swapping ($count)"
}
@@ -712,8 +721,8 @@ if { [istarget mips*-*-vxworks*] } {
run_dump_test "compact-eh-el-5"
run_dump_test "compact-eh-el-6"
run_dump_test "compact-eh-el-7"
run_list_test "compact-eh-err1"
run_list_test "compact-eh-err2"
run_list_test "compact-eh-err1" "-march=from-abi"
run_list_test "compact-eh-err2" "-march=from-abi"
run_dump_test "div"
@@ -950,30 +959,30 @@ if { [istarget mips*-*-vxworks*] } {
run_dump_test "jalx-local-n64"
}
run_list_test "unaligned-jump-1" "-32" \
run_list_test "unaligned-jump-1" "-32 -mips32r2" \
"MIPS jump to unaligned symbol 1"
run_list_test "unaligned-jump-2" "-32" \
run_list_test "unaligned-jump-2" "-32 -mips32r2" \
"MIPS jump to unaligned symbol 2"
if $has_newabi {
run_dump_test "unaligned-jump-3"
}
run_list_test "unaligned-jump-mips16-1" "-32" \
run_list_test "unaligned-jump-mips16-1" "-32 -mips1" \
"MIPS16 jump to unaligned symbol 1"
run_list_test "unaligned-jump-mips16-2" "-32" \
run_list_test "unaligned-jump-mips16-2" "-32 -mips1" \
"MIPS16 jump to unaligned symbol 2"
if $has_newabi {
run_dump_test "unaligned-jump-mips16-3"
}
run_list_test "unaligned-jump-micromips-1" "-32" \
run_list_test "unaligned-jump-micromips-1" "-32 -mips32r2" \
"microMIPS jump to unaligned symbol 1"
run_list_test "unaligned-jump-micromips-2" "-32" \
run_list_test "unaligned-jump-micromips-2" "-32 -mips32r2" \
"microMIPS jump to unaligned symbol 2"
if $has_newabi {
run_dump_test "unaligned-jump-micromips-3"
}
run_list_test "unaligned-branch-1" "-32" \
run_list_test "unaligned-branch-1" "-32 -mips32r2" \
"MIPS branch to unaligned symbol 1"
run_list_test "unaligned-branch-2" "-32" \
run_list_test "unaligned-branch-2" "-32 -mips32r2" \
"MIPS branch to unaligned symbol 2"
if $has_newabi {
run_dump_test "unaligned-branch-3"
@@ -990,16 +999,16 @@ if { [istarget mips*-*-vxworks*] } {
run_dump_test "unaligned-branch-r6-5"
run_dump_test "unaligned-branch-r6-6"
}
run_list_test "unaligned-branch-mips16-1" "-32" \
run_list_test "unaligned-branch-mips16-1" "-32 -mips1" \
"MIPS16 branch to unaligned symbol 1"
run_list_test "unaligned-branch-mips16-2" "-32" \
run_list_test "unaligned-branch-mips16-2" "-32 -mips1" \
"MIPS16 branch to unaligned symbol 2"
if $has_newabi {
run_dump_test "unaligned-branch-mips16-3"
}
run_list_test "unaligned-branch-micromips-1" "-32" \
run_list_test "unaligned-branch-micromips-1" "-32 -mips32r2" \
"microMIPS branch to unaligned symbol 1"
run_list_test "unaligned-branch-micromips-2" "-32" \
run_list_test "unaligned-branch-micromips-2" "-32 -mips32r2" \
"microMIPS branch to unaligned symbol 2"
if $has_newabi {
run_dump_test "unaligned-branch-micromips-3"
@@ -1104,7 +1113,7 @@ if { [istarget mips*-*-vxworks*] } {
run_dump_test_arches "eva" [mips_arch_list_matching mips32r2 !octeon]
run_list_test "illegal" "-32"
run_list_test "illegal" "-32 -mips1"
run_list_test "baddata1" "-32"
run_list_test "jalr" ""
@@ -1238,6 +1247,7 @@ if { [istarget mips*-*-vxworks*] } {
run_list_test_arches "elf-rel30" "-32" [mips_arch_list_all]
run_dump_test "comdat-reloc"
run_dump_test "comdat-reloc-r6"
run_dump_test "${tmips}mips${el}16-e"
run_dump_test "${tmips}mips${el}16-f"
@@ -1592,7 +1602,7 @@ if { [istarget mips*-*-vxworks*] } {
run_dump_test "micromips-branch-absolute-addend-n64"
}
run_dump_test "micromips-b16"
run_list_test "micromips-ill"
run_list_test "micromips-ill" "-march=from-abi"
run_dump_test_arches "mcu" [mips_arch_list_matching mips32r2 \
!octeon]
@@ -1646,7 +1656,7 @@ if { [istarget mips*-*-vxworks*] } {
run_dump_test_arches "ulh-reloc" [mips_arch_list_matching mips2 !mips32r6]
run_dump_test "l_d-reloc"
run_list_test "bltzal"
run_list_test "bltzal" "-march=from-abi"
run_dump_test_arches "msa" [mips_arch_list_matching mips32r2]
if { $has_newabi } {
@@ -1680,7 +1690,7 @@ if { [istarget mips*-*-vxworks*] } {
run_dump_test "pcrel-reloc-5"
run_dump_test "pcrel-reloc-5-r6"
run_dump_test "pcrel-reloc-6"
run_list_test "pcrel-reloc-6" "-32 --defsym offset=4" \
run_list_test "pcrel-reloc-6" "-32 --defsym offset=4 -mips1" \
"MIPS local PC-relative relocations 6b"
run_dump_test_arches "mips16-pcrel-0" [mips_arch_list_matching mips16-32]
@@ -2041,14 +2051,16 @@ if { [istarget mips*-*-vxworks*] } {
[mips_arch_list_matching mips32r2]
run_dump_test "attr-gnu-abi-fp-1"
run_dump_test "attr-gnu-abi-fp-5"
run_dump_test "attr-gnu-abi-fp-6"
run_dump_test "attr-gnu-abi-msa-1"
run_dump_test "module-override"
run_dump_test "module-defer-warn1"
run_list_test "module-defer-warn2" "-32 -mips1"
foreach testopt [list -mfp32 -mfpxx -mfp64 "-mfp64-noodd" \
-msingle-float -msoft-float] {
foreach testopt [list -mfp32 -mfpxx -mfp64 "-mfp64-noodd" -mfp64r6 "-mfp64r6-noodd" \
-msingle-float -msoft-float -msoft-float-r6] {
foreach cmdopt [list -mfp32 -mfpxx -mfp64 "-mfp64 -mno-odd-spreg" \
-msingle-float -msoft-float] {
run_dump_test "module${testopt}" \

View File

@@ -1,6 +1,6 @@
#objdump: -dr --prefix-addresses --show-raw-insn
#name: MIPS16 absolute relocation 0
#as: -32
#as: -32 -mips1
.*: +file format .*mips.*

View File

@@ -1,3 +1,3 @@
#name: MIPS16 absolute relocation 2
#as: -32
#as: -32 -mips1
#error_output: mips16-absolute-reloc-2.l

View File

@@ -1,6 +1,6 @@
#objdump: -dr --prefix-addresses --show-raw-insn
#name: MIPS16 branch to absolute expression 1
#as: -32
#as: -32 -mips1
.*: +file format .*mips.*

View File

@@ -1,4 +1,4 @@
#objdump: -dr --prefix-addresses --show-raw-insn
#name: MIPS16 branch to absolute expression 2
#as: -32
#as: -32 -mips1
#dump: mips16-branch-absolute-1.d

View File

@@ -1,4 +1,4 @@
#objdump: -dr --prefix-addresses --show-raw-insn
#name: MIPS16 branch to absolute expression with addend 1
#as: -32
#as: -32 -mips1
#dump: mips16-branch-absolute-1.d

View File

@@ -1,6 +1,6 @@
#objdump: -dr --prefix-addresses --show-raw-insn
#name: MIPS16 branch to absolute expression with addend
#as: -32
#as: -32 -mips1
.*: +file format .*mips.*

View File

@@ -1,6 +1,6 @@
#objdump: -dr --prefix-addresses --show-raw-insn
#name: MIPS16 branch to absolute expression
#as: -32
#as: -32 -mips1
.*: +file format .*mips.*

View File

@@ -1,6 +1,6 @@
#objdump: -dr --prefix-addresses --show-raw-insn
#name: MIPS16 branch relocation with addend 0
#as: -32
#as: -32 -mips1
.*: +file format .*mips.*

View File

@@ -1,6 +1,6 @@
#objdump: -dr --prefix-addresses --show-raw-insn
#name: MIPS16 branch relocation with addend 1
#as: -32
#as: -32 -mips1
.*: +file format .*mips.*

View File

@@ -1,6 +1,6 @@
#objdump: -dr --prefix-addresses --show-raw-insn
#name: MIPS16 branch relocation with addend 2
#as: -32
#as: -32 -mips1
.*: +file format .*mips.*

View File

@@ -1,6 +1,6 @@
#objdump: -dr --prefix-addresses --show-raw-insn
#name: MIPS16 branch relocation with addend 3
#as: -32
#as: -32 -mips1
.*: +file format .*mips.*

View File

@@ -1,6 +1,6 @@
#objdump: -dr --prefix-addresses --show-raw-insn
#name: MIPS16 branch relocation with addend 4
#as: -32
#as: -32 -mips1
.*: +file format .*mips.*

View File

@@ -1,4 +1,4 @@
#objdump: -dr --prefix-addresses --show-raw-insn
#name: MIPS16 branch relocation with addend 5
#as: -32
#as: -32 -mips1
#error_output: mips16-branch-addend-5.l

View File

@@ -1,6 +1,6 @@
#objdump: -dr --prefix-addresses --show-raw-insn
#name: MIPS16 branch relocation 0
#as: -32
#as: -32 -mips1
.*: +file format .*mips.*

View File

@@ -1,6 +1,6 @@
#objdump: -dr --prefix-addresses --show-raw-insn
#name: MIPS16 branch relocation 1
#as: -32
#as: -32 -mips1
.*: +file format .*mips.*

View File

@@ -1,6 +1,6 @@
#objdump: -dr --prefix-addresses --show-raw-insn
#name: MIPS16 branch relocation 2
#as: -32
#as: -32 -mips1
.*: +file format .*mips.*

View File

@@ -1,6 +1,6 @@
#objdump: -dr --prefix-addresses --show-raw-insn
#name: MIPS16 branch relocation 3
#as: -32
#as: -32 -mips1
.*: +file format .*mips.*

View File

@@ -1,6 +1,6 @@
#objdump: -dr --prefix-addresses --show-raw-insn
#name: MIPS16 branch relocation 4
#as: -32
#as: -32 -mips1
.*: +file format .*mips.*

View File

@@ -1,6 +1,6 @@
#objdump: -dr --prefix-addresses --show-raw-insn
#name: MIPS16 branch relocation 5
#as: -32
#as: -32 -mips1
.*: +file format .*mips.*

View File

@@ -1,3 +1,3 @@
#name: MIPS16 unextended branch instructions with relocation 1
#as: -32
#as: -32 -mips32
#error_output: mips16-branch-unextended.l

View File

@@ -1,3 +1,3 @@
#name: MIPS16 unextended branch instructions with relocation 2
#as: -32
#as: -32 -mips32
#error_output: mips16-branch-unextended.l

View File

@@ -1,6 +1,6 @@
#readelf: -r -wl
#name: MIPS16 DWARF2
#as: -mabi=32 -mips16 -no-mdebug -g0
#as: -mabi=32 -mips16 -no-mdebug -g0 -mips32
#source: mips16-dwarf2.s
Relocation section '\.rel\.debug_info' at offset .* contains 4 entries:

View File

@@ -1,6 +1,6 @@
#objdump: -rst --special-syms -mips16
#name: MIPS16 reloc
#as: -32 -mips16
#as: -32 -mips16 -mips32
# Check MIPS16 reloc processing

View File

@@ -1,6 +1,6 @@
#objdump: -d --prefix-addresses --show-raw-insn
#name: MIPS16 explicit EXTEND encoding
#as: -32
#as: -32 -mips32
.*: +file format .*mips.*

View File

@@ -1,6 +1,6 @@
#objdump: -rst -mips16
#name: MIPS16 reloc 2
#as: -32 -mips16
#as: -32 -mips16 -mips32
# Check MIPS16 reloc processing

View File

@@ -1,6 +1,6 @@
#objdump: -dr
#name: MIPS16 lui/addi
#as: -mips16 -mabi=32
#as: -mips16 -mabi=32 -mips32
#source: mips16-hilo.s
.*: +file format .*mips.*

Some files were not shown because too many files have changed in this diff Show More