diff options
-rw-r--r-- | gas/testsuite/gas/mips/micromips@relax-swap3.d | 22 | ||||
-rw-r--r-- | gas/testsuite/gas/mips/mips16@relax-swap3.d | 15 | ||||
-rw-r--r-- | gas/testsuite/gas/mips/relax-swap3.d | 21 | ||||
-rw-r--r-- | gas/testsuite/gas/mips/relax-swap3.s | 14 |
4 files changed, 72 insertions, 0 deletions
diff --git a/gas/testsuite/gas/mips/micromips@relax-swap3.d b/gas/testsuite/gas/mips/micromips@relax-swap3.d new file mode 100644 index 0000000..d84d386 --- /dev/null +++ b/gas/testsuite/gas/mips/micromips@relax-swap3.d @@ -0,0 +1,22 @@ +#objdump: -dr --prefix-addresses --show-raw-insn +#name: MIPS relaxed macro with branch swapping +#as: -32 +#source: relax-swap3.s + +.*: +file format .*mips.* + +Disassembly of section \.text: +[0-9a-f]+ <[^>]*> 41a2 0000 lui v0,0x0 +[ ]*[0-9a-f]+: R_MICROMIPS_HI16 bar +[0-9a-f]+ <[^>]*> 3042 0000 addiu v0,v0,0 +[ ]*[0-9a-f]+: R_MICROMIPS_LO16 bar +[0-9a-f]+ <[^>]*> 4583 jr v1 +[0-9a-f]+ <[^>]*> 0c00 nop +[0-9a-f]+ <[^>]*> 41a2 0000 lui v0,0x0 +[ ]*[0-9a-f]+: R_MICROMIPS_HI16 bar +[0-9a-f]+ <[^>]*> 3042 0000 addiu v0,v0,0 +[ ]*[0-9a-f]+: R_MICROMIPS_LO16 bar +[0-9a-f]+ <[^>]*> 8dff beqz v1,[0-9a-f]+ <[^>]*> +[ ]*[0-9a-f]+: R_MICROMIPS_PC7_S1 .* +[0-9a-f]+ <[^>]*> 0c00 nop + \.\.\. diff --git a/gas/testsuite/gas/mips/mips16@relax-swap3.d b/gas/testsuite/gas/mips/mips16@relax-swap3.d new file mode 100644 index 0000000..49949b4 --- /dev/null +++ b/gas/testsuite/gas/mips/mips16@relax-swap3.d @@ -0,0 +1,15 @@ +#objdump: -dr --prefix-addresses --show-raw-insn +#name: MIPS relaxed macro with branch swapping +#as: -32 +#source: relax-swap3.s + +.*: +file format .*mips.* + +Disassembly of section \.text: +[0-9a-f]+ <[^>]*> 0a00 la v0,[0-9a-f]+ <[^>]*> +[0-9a-f]+ <[^>]*> eb00 jr v1 +[0-9a-f]+ <[^>]*> 6500 nop +[0-9a-f]+ <[^>]*> f7ff 0a1c la v0,[0-9a-f]+ <[^>]*> +[0-9a-f]+ <[^>]*> 2300 beqz v1,[0-9a-f]+ <[^>]*> + \.\.\. +#pass diff --git a/gas/testsuite/gas/mips/relax-swap3.d b/gas/testsuite/gas/mips/relax-swap3.d new file mode 100644 index 0000000..fcc509b --- /dev/null +++ b/gas/testsuite/gas/mips/relax-swap3.d @@ -0,0 +1,21 @@ +#objdump: -dr --prefix-addresses --show-raw-insn +#name: MIPS relaxed macro with branch swapping +#as: -32 +#source: relax-swap3.s + +.*: +file format .*mips.* + +Disassembly of section \.text: +[0-9a-f]+ <[^>]*> 3c020000 lui v0,0x0 +[ ]*[0-9a-f]+: R_MIPS_HI16 bar +[0-9a-f]+ <[^>]*> 24420000 addiu v0,v0,0 +[ ]*[0-9a-f]+: R_MIPS_LO16 bar +[0-9a-f]+ <[^>]*> 00600008 jr v1 +[0-9a-f]+ <[^>]*> 00000000 nop +[0-9a-f]+ <[^>]*> 3c020000 lui v0,0x0 +[ ]*[0-9a-f]+: R_MIPS_HI16 bar +[0-9a-f]+ <[^>]*> 24420000 addiu v0,v0,0 +[ ]*[0-9a-f]+: R_MIPS_LO16 bar +[0-9a-f]+ <[^>]*> 10600001 beqz v1,[0-9a-f]+ <[^>]*> +[0-9a-f]+ <[^>]*> 00000000 nop + \.\.\. diff --git a/gas/testsuite/gas/mips/relax-swap3.s b/gas/testsuite/gas/mips/relax-swap3.s new file mode 100644 index 0000000..497ecf8 --- /dev/null +++ b/gas/testsuite/gas/mips/relax-swap3.s @@ -0,0 +1,14 @@ +# Source file used to check the lack of branch swapping with a relaxed macro. + + .text +foo: + la $2, bar + jr $3 + + la $2, bar + beqz $3, 0f +0: + +# Force at least 8 (non-delay-slot) zero bytes, to make 'objdump' print ... + .align 2 + .space 8 |