diff options
author | Nick Clifton <nickc@redhat.com> | 2004-11-12 12:27:05 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2004-11-12 12:27:05 +0000 |
commit | 30e857fcdb77010a0a57bc86d2855e78c1842918 (patch) | |
tree | 992db7b4234c3ce3b94aacd4f789a6822c5ff44a /gas/testsuite | |
parent | 9b098f24af69b10358b2254bd1a71f070d3e2514 (diff) | |
download | gdb-30e857fcdb77010a0a57bc86d2855e78c1842918.zip gdb-30e857fcdb77010a0a57bc86d2855e78c1842918.tar.gz gdb-30e857fcdb77010a0a57bc86d2855e78c1842918.tar.bz2 |
Fix off by one negative offsets for conditional branches.
Add a test of this fix.
Diffstat (limited to 'gas/testsuite')
-rw-r--r-- | gas/testsuite/ChangeLog | 7 | ||||
-rw-r--r-- | gas/testsuite/gas/mn10300/relax.d | 17 | ||||
-rw-r--r-- | gas/testsuite/gas/mn10300/relax.s | 32 |
3 files changed, 56 insertions, 0 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index b5c94fc..9de9798 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2004-11-12 Nick Clifton <nickc@redhat.com> + + * gas/mn10300/basic.exp: Add relax test. + * gas/mn10300/relax.s: New test. + * gas/mn10300/relax.d: Expected results. Make sure that the + correct size of instruction has been selected. + 2004-11-11 Bob Wilson <bob.wilson@acm.org> * gas/xtensa/short_branch_offset.s: New. diff --git a/gas/testsuite/gas/mn10300/relax.d b/gas/testsuite/gas/mn10300/relax.d new file mode 100644 index 0000000..069e8b6 --- /dev/null +++ b/gas/testsuite/gas/mn10300/relax.d @@ -0,0 +1,17 @@ +#objdump: -r +#name: Relaxation of conditional branches + +.*: +file format.*elf32-[am33lin|mn10300].* + +RELOCATION RECORDS FOR \[.rlcb\]: +OFFSET TYPE VALUE +0+8003 R_MN10300_PCREL8 .L0._0\+0x00000001 +0+8005 R_MN10300_PCREL32 .L2\+0x00000001 + + +RELOCATION RECORDS FOR \[.rsflb\]: +OFFSET TYPE VALUE +0+8004 R_MN10300_PCREL8 .L0._1\+0x00000002 +0+8006 R_MN10300_PCREL32 .L4\+0x00000001 + + diff --git a/gas/testsuite/gas/mn10300/relax.s b/gas/testsuite/gas/mn10300/relax.s new file mode 100644 index 0000000..2ef3f60 --- /dev/null +++ b/gas/testsuite/gas/mn10300/relax.s @@ -0,0 +1,32 @@ + .am33_2 + + .section .rlcb, "ax" + .global relax_long_cond_branch +relax_long_cond_branch: + clr d0 + clr d1 +.L2: + add d1,d0 + inc d1 + + .fill 32764, 1, 0xcb + + cmp 9,d1 + ble .L2 + rets + + + .section .rsflb, "ax" + .global relax_long_float_cond_branch +relax_long_float_cond_branch: + clr d0 + clr d1 +.L4: + add d1,d0 + inc d1 + + .fill 32764, 1, 0xcb + + cmp 9,d1 + fble .L4 + rets |