gas/testsuite/

2012-09-23  Maciej W. Rozycki  <macro@codesourcery.com>

	* gas/mips/hilo-diff-eb.d: New test.
	* gas/mips/hilo-diff-eb-n32.d: New test.
	* gas/mips/hilo-diff-eb-n64.d: New test.
	* gas/mips/hilo-diff-el.d: New test.
	* gas/mips/hilo-diff-el-n32.d: New test.
	* gas/mips/hilo-diff-el-n64.d: New test.
	* gas/mips/mips16@hilo-diff-eb.d: New test.
	* gas/mips/mips16@hilo-diff-eb-n32.d: New test.
	* gas/mips/mips16@hilo-diff-eb-n64.d: New test.
	* gas/mips/mips16@hilo-diff-el.d: New test.
	* gas/mips/mips16@hilo-diff-el-n32.d: New test.
	* gas/mips/mips16@hilo-diff-el-n64.d: New test.
	* gas/mips/micromips@hilo-diff-eb.d: New test.
	* gas/mips/micromips@hilo-diff-eb-n32.d: New test.
	* gas/mips/micromips@hilo-diff-eb-n64.d: New test.
	* gas/mips/micromips@hilo-diff-el.d: New test.
	* gas/mips/micromips@hilo-diff-el-n32.d: New test.
	* gas/mips/micromips@hilo-diff-el-n64.d: New test.
	* gas/mips/hilo-diff.s: New test source.
	* gas/mips/mips.exp: Run the new tests.
This commit is contained in:
Richard Sandiford 2012-09-23 11:16:53 +00:00
parent b886a2ab0d
commit 1976c29229
21 changed files with 394 additions and 0 deletions

View file

@ -1,3 +1,26 @@
2012-09-23 Maciej W. Rozycki <macro@codesourcery.com>
* gas/mips/hilo-diff-eb.d: New test.
* gas/mips/hilo-diff-eb-n32.d: New test.
* gas/mips/hilo-diff-eb-n64.d: New test.
* gas/mips/hilo-diff-el.d: New test.
* gas/mips/hilo-diff-el-n32.d: New test.
* gas/mips/hilo-diff-el-n64.d: New test.
* gas/mips/mips16@hilo-diff-eb.d: New test.
* gas/mips/mips16@hilo-diff-eb-n32.d: New test.
* gas/mips/mips16@hilo-diff-eb-n64.d: New test.
* gas/mips/mips16@hilo-diff-el.d: New test.
* gas/mips/mips16@hilo-diff-el-n32.d: New test.
* gas/mips/mips16@hilo-diff-el-n64.d: New test.
* gas/mips/micromips@hilo-diff-eb.d: New test.
* gas/mips/micromips@hilo-diff-eb-n32.d: New test.
* gas/mips/micromips@hilo-diff-eb-n64.d: New test.
* gas/mips/micromips@hilo-diff-el.d: New test.
* gas/mips/micromips@hilo-diff-el-n32.d: New test.
* gas/mips/micromips@hilo-diff-el-n64.d: New test.
* gas/mips/hilo-diff.s: New test source.
* gas/mips/mips.exp: Run the new tests.
2012-09-23 Richard Sandiford <rdsandiford@googlemail.com>
* gas/mips/elf-rel22.s, gas/mips/elf-rel22.d: Add more tests.

View file

@ -0,0 +1,5 @@
#objdump: -dr --prefix-addresses --show-raw-insn
#name: MIPS hilo-diff n32/EB
#as: -n32 -EB
#source: hilo-diff.s
#dump: hilo-diff-eb.d

View file

@ -0,0 +1,5 @@
#objdump: -dr --prefix-addresses --show-raw-insn
#name: MIPS hilo-diff n64/EB
#as: -64 -EB
#source: hilo-diff.s
#dump: hilo-diff-eb.d

View file

@ -0,0 +1,66 @@
#objdump: -dr --prefix-addresses --show-raw-insn
#name: MIPS hilo-diff o32/EB
#as: -32 -EB
#source: hilo-diff.s
.*: +file format .*mips.*
Disassembly of section \.text:
[0-9a-f]+ <[^>]*> 24040000 li a0,0
[0-9a-f]+ <[^>]*> 00042400 sll a0,a0,0x10
[0-9a-f]+ <[^>]*> 24847ffc addiu a0,a0,32764
[0-9a-f]+ <[^>]*> 24050000 li a1,0
[0-9a-f]+ <[^>]*> 00052c00 sll a1,a1,0x10
[0-9a-f]+ <[^>]*> 24a58000 addiu a1,a1,-32768
[0-9a-f]+ <[^>]*> 24040000 li a0,0
[0-9a-f]+ <[^>]*> 00042400 sll a0,a0,0x10
[0-9a-f]+ <[^>]*> 24847ffc addiu a0,a0,32764
[0-9a-f]+ <[^>]*> 24050000 li a1,0
[0-9a-f]+ <[^>]*> 00052c00 sll a1,a1,0x10
[0-9a-f]+ <[^>]*> 24a58000 addiu a1,a1,-32768
\.\.\.
[0-9a-f]+ <[^>]*> 24040000 li a0,0
[0-9a-f]+ <[^>]*> 00042400 sll a0,a0,0x10
[0-9a-f]+ <[^>]*> 24847ffc addiu a0,a0,32764
[0-9a-f]+ <[^>]*> 24050000 li a1,0
[0-9a-f]+ <[^>]*> 00052c00 sll a1,a1,0x10
[0-9a-f]+ <[^>]*> 24a58000 addiu a1,a1,-32768
[0-9a-f]+ <[^>]*> 24040001 li a0,1
[0-9a-f]+ <[^>]*> 00042400 sll a0,a0,0x10
[0-9a-f]+ <[^>]*> 24848000 addiu a0,a0,-32768
[0-9a-f]+ <[^>]*> 2405ffff li a1,-1
[0-9a-f]+ <[^>]*> 00052c00 sll a1,a1,0x10
[0-9a-f]+ <[^>]*> 24a57ffc addiu a1,a1,32764
[0-9a-f]+ <[^>]*> 24040001 li a0,1
[0-9a-f]+ <[^>]*> 00042400 sll a0,a0,0x10
[0-9a-f]+ <[^>]*> 24848000 addiu a0,a0,-32768
[0-9a-f]+ <[^>]*> 2405ffff li a1,-1
[0-9a-f]+ <[^>]*> 00052c00 sll a1,a1,0x10
[0-9a-f]+ <[^>]*> 24a57ffc addiu a1,a1,32764
\.\.\.
[0-9a-f]+ <[^>]*> 24040001 li a0,1
[0-9a-f]+ <[^>]*> 00042400 sll a0,a0,0x10
[0-9a-f]+ <[^>]*> 24848000 addiu a0,a0,-32768
[0-9a-f]+ <[^>]*> 2405ffff li a1,-1
[0-9a-f]+ <[^>]*> 00052c00 sll a1,a1,0x10
[0-9a-f]+ <[^>]*> 24a57ffc addiu a1,a1,32764
[0-9a-f]+ <[^>]*> 24040012 li a0,18
[0-9a-f]+ <[^>]*> 00042400 sll a0,a0,0x10
[0-9a-f]+ <[^>]*> 2484ffdc addiu a0,a0,-36
[0-9a-f]+ <[^>]*> 2405ffee li a1,-18
[0-9a-f]+ <[^>]*> 00052c00 sll a1,a1,0x10
[0-9a-f]+ <[^>]*> 24a50024 addiu a1,a1,36
[0-9a-f]+ <[^>]*> 24040012 li a0,18
[0-9a-f]+ <[^>]*> 00042400 sll a0,a0,0x10
[0-9a-f]+ <[^>]*> 2484ffdc addiu a0,a0,-36
[0-9a-f]+ <[^>]*> 2405ffee li a1,-18
[0-9a-f]+ <[^>]*> 00052c00 sll a1,a1,0x10
[0-9a-f]+ <[^>]*> 24a50024 addiu a1,a1,36
\.\.\.
[0-9a-f]+ <[^>]*> 24040012 li a0,18
[0-9a-f]+ <[^>]*> 00042400 sll a0,a0,0x10
[0-9a-f]+ <[^>]*> 2484ffdc addiu a0,a0,-36
[0-9a-f]+ <[^>]*> 2405ffee li a1,-18
[0-9a-f]+ <[^>]*> 00052c00 sll a1,a1,0x10
[0-9a-f]+ <[^>]*> 24a50024 addiu a1,a1,36
\.\.\.

View file

@ -0,0 +1,5 @@
#objdump: -dr --prefix-addresses --show-raw-insn
#name: MIPS hilo-diff n32/EL
#as: -n32 -EL
#source: hilo-diff.s
#dump: hilo-diff-eb.d

View file

@ -0,0 +1,5 @@
#objdump: -dr --prefix-addresses --show-raw-insn
#name: MIPS hilo-diff n64/EL
#as: -64 -EL
#source: hilo-diff.s
#dump: hilo-diff-eb.d

View file

@ -0,0 +1,5 @@
#objdump: -dr --prefix-addresses --show-raw-insn
#name: MIPS hilo-diff o32/EL
#as: -32 -EL
#source: hilo-diff.s
#dump: hilo-diff-eb.d

View file

@ -0,0 +1,90 @@
# Source code used to test %hi/%lo operators with constants worked out
# as a difference of local symbols, both previously defined and forward
# references.
.text
foo:
li $4, %hi(2f - 0f)
sll $4, 16
addiu $4, %lo(2f - 0f)
li $5, %hi(0f - 3f)
sll $5, 16
addiu $5, %lo(0f - 3f)
0:
li $4, %hi(2f - 0b)
sll $4, 16
addiu $4, %lo(2f - 0b)
li $5, %hi(0b - 3f)
sll $5, 16
addiu $5, %lo(0b - 3f)
1:
.insn
.fill 0x7ffc - (1b - 0b)
2:
.insn
.fill 0x8000 - (2b - 0b)
3:
li $4, %hi(2b - 0b)
sll $4, 16
addiu $4, %lo(2b - 0b)
li $5, %hi(0b - 3b)
sll $5, 16
addiu $5, %lo(0b - 3b)
li $4, %hi(2f - 0f)
sll $4, 16
addiu $4, %lo(2f - 0f)
li $5, %hi(0f - 3f)
sll $5, 16
addiu $5, %lo(0f - 3f)
0:
li $4, %hi(2f - 0b)
sll $4, 16
addiu $4, %lo(2f - 0b)
li $5, %hi(0b - 3f)
sll $5, 16
addiu $5, %lo(0b - 3f)
1:
.insn
.fill 0x8000 - (1b - 0b)
2:
.insn
.fill 0x8004 - (2b - 0b)
3:
li $4, %hi(2b - 0b)
sll $4, 16
addiu $4, %lo(2b - 0b)
li $5, %hi(0b - 3b)
sll $5, 16
addiu $5, %lo(0b - 3b)
li $4, %hi(2f - 0f)
sll $4, 16
addiu $4, %lo(2f - 0f)
li $5, %hi(0f - 3f)
sll $5, 16
addiu $5, %lo(0f - 3f)
0:
li $4, %hi(2f - 0b)
sll $4, 16
addiu $4, %lo(2f - 0b)
li $5, %hi(0b - 3f)
sll $5, 16
addiu $5, %lo(0b - 3f)
1:
.insn
.fill 0x11ffdc - (1b - 0b)
2:
.insn
.fill 0
3:
li $4, %hi(2b - 0b)
sll $4, 16
addiu $4, %lo(2b - 0b)
li $5, %hi(0b - 3b)
sll $5, 16
addiu $5, %lo(0b - 3b)
# Force some (non-delay-slot) zero bytes, to make 'objdump' print ...
.align 4, 0
.space 16

View file

@ -0,0 +1,5 @@
#objdump: -dr --prefix-addresses --show-raw-insn
#name: MIPS hilo-diff n32/EB
#as: -n32 -EB
#source: hilo-diff.s
#dump: micromips@hilo-diff-eb.d

View file

@ -0,0 +1,5 @@
#objdump: -dr --prefix-addresses --show-raw-insn
#name: MIPS hilo-diff n64/EB
#as: -64 -EB
#source: hilo-diff.s
#dump: micromips@hilo-diff-eb.d

View file

@ -0,0 +1,66 @@
#objdump: -dr --prefix-addresses --show-raw-insn
#name: MIPS hilo-diff o32/EB
#as: -32 -EB
#source: hilo-diff.s
.*: +file format .*mips.*
Disassembly of section \.text:
[0-9a-f]+ <[^>]*> 3080 0000 li a0,0
[0-9a-f]+ <[^>]*> 0084 8000 sll a0,a0,0x10
[0-9a-f]+ <[^>]*> 3084 7ffc addiu a0,a0,32764
[0-9a-f]+ <[^>]*> 30a0 0000 li a1,0
[0-9a-f]+ <[^>]*> 00a5 8000 sll a1,a1,0x10
[0-9a-f]+ <[^>]*> 30a5 8000 addiu a1,a1,-32768
[0-9a-f]+ <[^>]*> 3080 0000 li a0,0
[0-9a-f]+ <[^>]*> 0084 8000 sll a0,a0,0x10
[0-9a-f]+ <[^>]*> 3084 7ffc addiu a0,a0,32764
[0-9a-f]+ <[^>]*> 30a0 0000 li a1,0
[0-9a-f]+ <[^>]*> 00a5 8000 sll a1,a1,0x10
[0-9a-f]+ <[^>]*> 30a5 8000 addiu a1,a1,-32768
\.\.\.
[0-9a-f]+ <[^>]*> 3080 0000 li a0,0
[0-9a-f]+ <[^>]*> 0084 8000 sll a0,a0,0x10
[0-9a-f]+ <[^>]*> 3084 7ffc addiu a0,a0,32764
[0-9a-f]+ <[^>]*> 30a0 0000 li a1,0
[0-9a-f]+ <[^>]*> 00a5 8000 sll a1,a1,0x10
[0-9a-f]+ <[^>]*> 30a5 8000 addiu a1,a1,-32768
[0-9a-f]+ <[^>]*> 3080 0001 li a0,1
[0-9a-f]+ <[^>]*> 0084 8000 sll a0,a0,0x10
[0-9a-f]+ <[^>]*> 3084 8000 addiu a0,a0,-32768
[0-9a-f]+ <[^>]*> 30a0 ffff li a1,-1
[0-9a-f]+ <[^>]*> 00a5 8000 sll a1,a1,0x10
[0-9a-f]+ <[^>]*> 30a5 7ffc addiu a1,a1,32764
[0-9a-f]+ <[^>]*> 3080 0001 li a0,1
[0-9a-f]+ <[^>]*> 0084 8000 sll a0,a0,0x10
[0-9a-f]+ <[^>]*> 3084 8000 addiu a0,a0,-32768
[0-9a-f]+ <[^>]*> 30a0 ffff li a1,-1
[0-9a-f]+ <[^>]*> 00a5 8000 sll a1,a1,0x10
[0-9a-f]+ <[^>]*> 30a5 7ffc addiu a1,a1,32764
\.\.\.
[0-9a-f]+ <[^>]*> 3080 0001 li a0,1
[0-9a-f]+ <[^>]*> 0084 8000 sll a0,a0,0x10
[0-9a-f]+ <[^>]*> 3084 8000 addiu a0,a0,-32768
[0-9a-f]+ <[^>]*> 30a0 ffff li a1,-1
[0-9a-f]+ <[^>]*> 00a5 8000 sll a1,a1,0x10
[0-9a-f]+ <[^>]*> 30a5 7ffc addiu a1,a1,32764
[0-9a-f]+ <[^>]*> 3080 0012 li a0,18
[0-9a-f]+ <[^>]*> 0084 8000 sll a0,a0,0x10
[0-9a-f]+ <[^>]*> 3084 ffdc addiu a0,a0,-36
[0-9a-f]+ <[^>]*> 30a0 ffee li a1,-18
[0-9a-f]+ <[^>]*> 00a5 8000 sll a1,a1,0x10
[0-9a-f]+ <[^>]*> 30a5 0024 addiu a1,a1,36
[0-9a-f]+ <[^>]*> 3080 0012 li a0,18
[0-9a-f]+ <[^>]*> 0084 8000 sll a0,a0,0x10
[0-9a-f]+ <[^>]*> 3084 ffdc addiu a0,a0,-36
[0-9a-f]+ <[^>]*> 30a0 ffee li a1,-18
[0-9a-f]+ <[^>]*> 00a5 8000 sll a1,a1,0x10
[0-9a-f]+ <[^>]*> 30a5 0024 addiu a1,a1,36
\.\.\.
[0-9a-f]+ <[^>]*> 3080 0012 li a0,18
[0-9a-f]+ <[^>]*> 0084 8000 sll a0,a0,0x10
[0-9a-f]+ <[^>]*> 3084 ffdc addiu a0,a0,-36
[0-9a-f]+ <[^>]*> 30a0 ffee li a1,-18
[0-9a-f]+ <[^>]*> 00a5 8000 sll a1,a1,0x10
[0-9a-f]+ <[^>]*> 30a5 0024 addiu a1,a1,36
\.\.\.

View file

@ -0,0 +1,5 @@
#objdump: -dr --prefix-addresses --show-raw-insn
#name: MIPS hilo-diff n32/EL
#as: -n32 -EL
#source: hilo-diff.s
#dump: micromips@hilo-diff-eb.d

View file

@ -0,0 +1,5 @@
#objdump: -dr --prefix-addresses --show-raw-insn
#name: MIPS hilo-diff n64/EL
#as: -64 -EL
#source: hilo-diff.s
#dump: micromips@hilo-diff-eb.d

View file

@ -0,0 +1,5 @@
#objdump: -dr --prefix-addresses --show-raw-insn
#name: MIPS hilo-diff o32/EL
#as: -32 -EL
#source: hilo-diff.s
#dump: micromips@hilo-diff-eb.d

View file

@ -1117,4 +1117,12 @@ if { [istarget mips*-*-vxworks*] } {
run_dump_test_arches "mcu" [mips_arch_list_matching mips32r2 \
!octeon]
run_dump_test_arches "hilo-diff-eb" [mips_arch_list_all]
run_dump_test_arches "hilo-diff-el" [mips_arch_list_all]
if $has_newabi {
run_dump_test_arches "hilo-diff-eb-n32" [mips_arch_list_matching mips3]
run_dump_test_arches "hilo-diff-el-n32" [mips_arch_list_matching mips3]
run_dump_test_arches "hilo-diff-eb-n64" [mips_arch_list_matching mips3]
run_dump_test_arches "hilo-diff-el-n64" [mips_arch_list_matching mips3]
}
}

View file

@ -0,0 +1,5 @@
#objdump: -dr --prefix-addresses --show-raw-insn
#name: MIPS hilo-diff n32/EB
#as: -n32 -EB
#source: hilo-diff.s
#dump: mips16@hilo-diff-eb.d

View file

@ -0,0 +1,5 @@
#objdump: -dr --prefix-addresses --show-raw-insn
#name: MIPS hilo-diff n64/EB
#as: -64 -EB
#source: hilo-diff.s
#dump: mips16@hilo-diff-eb.d

View file

@ -0,0 +1,66 @@
#objdump: -dr --prefix-addresses --show-raw-insn
#name: MIPS hilo-diff o32/EB
#as: -32 -EB
#source: hilo-diff.s
.*: +file format .*mips.*
Disassembly of section \.text:
[0-9a-f]+ <[^>]*> f000 6c00 li a0,0
[0-9a-f]+ <[^>]*> f400 3480 sll a0,16
[0-9a-f]+ <[^>]*> f7ef 4c1c addiu a0,32764
[0-9a-f]+ <[^>]*> f000 6d00 li a1,0
[0-9a-f]+ <[^>]*> f400 35a0 sll a1,16
[0-9a-f]+ <[^>]*> f010 4d00 addiu a1,-32768
[0-9a-f]+ <[^>]*> f000 6c00 li a0,0
[0-9a-f]+ <[^>]*> f400 3480 sll a0,16
[0-9a-f]+ <[^>]*> f7ef 4c1c addiu a0,32764
[0-9a-f]+ <[^>]*> f000 6d00 li a1,0
[0-9a-f]+ <[^>]*> f400 35a0 sll a1,16
[0-9a-f]+ <[^>]*> f010 4d00 addiu a1,-32768
\.\.\.
[0-9a-f]+ <[^>]*> 6c00 li a0,0
[0-9a-f]+ <[^>]*> f400 3480 sll a0,16
[0-9a-f]+ <[^>]*> f7ef 4c1c addiu a0,32764
[0-9a-f]+ <[^>]*> 6d00 li a1,0
[0-9a-f]+ <[^>]*> f400 35a0 sll a1,16
[0-9a-f]+ <[^>]*> f010 4d00 addiu a1,-32768
[0-9a-f]+ <[^>]*> f000 6c01 li a0,1
[0-9a-f]+ <[^>]*> f400 3480 sll a0,16
[0-9a-f]+ <[^>]*> f010 4c00 addiu a0,-32768
[0-9a-f]+ <[^>]*> f7ff 6d1f li a1,65535
[0-9a-f]+ <[^>]*> f400 35a0 sll a1,16
[0-9a-f]+ <[^>]*> f7ef 4d1c addiu a1,32764
[0-9a-f]+ <[^>]*> f000 6c01 li a0,1
[0-9a-f]+ <[^>]*> f400 3480 sll a0,16
[0-9a-f]+ <[^>]*> f010 4c00 addiu a0,-32768
[0-9a-f]+ <[^>]*> f7ff 6d1f li a1,65535
[0-9a-f]+ <[^>]*> f400 35a0 sll a1,16
[0-9a-f]+ <[^>]*> f7ef 4d1c addiu a1,32764
\.\.\.
[0-9a-f]+ <[^>]*> 6c01 li a0,1
[0-9a-f]+ <[^>]*> f400 3480 sll a0,16
[0-9a-f]+ <[^>]*> f010 4c00 addiu a0,-32768
[0-9a-f]+ <[^>]*> f7ff 6d1f li a1,65535
[0-9a-f]+ <[^>]*> f400 35a0 sll a1,16
[0-9a-f]+ <[^>]*> f7ef 4d1c addiu a1,32764
[0-9a-f]+ <[^>]*> f000 6c12 li a0,18
[0-9a-f]+ <[^>]*> f400 3480 sll a0,16
[0-9a-f]+ <[^>]*> f7df 4c1c addiu a0,-36
[0-9a-f]+ <[^>]*> f7ff 6d0e li a1,65518
[0-9a-f]+ <[^>]*> f400 35a0 sll a1,16
[0-9a-f]+ <[^>]*> f020 4d04 addiu a1,36
[0-9a-f]+ <[^>]*> f000 6c12 li a0,18
[0-9a-f]+ <[^>]*> f400 3480 sll a0,16
[0-9a-f]+ <[^>]*> f7df 4c1c addiu a0,-36
[0-9a-f]+ <[^>]*> f7ff 6d0e li a1,65518
[0-9a-f]+ <[^>]*> f400 35a0 sll a1,16
[0-9a-f]+ <[^>]*> f020 4d04 addiu a1,36
\.\.\.
[0-9a-f]+ <[^>]*> 6c12 li a0,18
[0-9a-f]+ <[^>]*> f400 3480 sll a0,16
[0-9a-f]+ <[^>]*> 4cdc addiu a0,-36
[0-9a-f]+ <[^>]*> f7ff 6d0e li a1,65518
[0-9a-f]+ <[^>]*> f400 35a0 sll a1,16
[0-9a-f]+ <[^>]*> 4d24 addiu a1,36
\.\.\.

View file

@ -0,0 +1,5 @@
#objdump: -dr --prefix-addresses --show-raw-insn
#name: MIPS hilo-diff n32/EL
#as: -n32 -EL
#source: hilo-diff.s
#dump: mips16@hilo-diff-eb.d

View file

@ -0,0 +1,5 @@
#objdump: -dr --prefix-addresses --show-raw-insn
#name: MIPS hilo-diff n64/EL
#as: -64 -EL
#source: hilo-diff.s
#dump: mips16@hilo-diff-eb.d

View file

@ -0,0 +1,5 @@
#objdump: -dr --prefix-addresses --show-raw-insn
#name: MIPS hilo-diff o32/EL
#as: -32 -EL
#source: hilo-diff.s
#dump: mips16@hilo-diff-eb.d