diff options
author | Paul Brook <paul@codesourcery.com> | 2011-05-31 14:04:13 +0000 |
---|---|---|
committer | Paul Brook <paul@codesourcery.com> | 2011-05-31 14:04:13 +0000 |
commit | 10960bfbce1719b569d2f7e3b0a9931ec7f2b5d9 (patch) | |
tree | e752f4cd26339cf6b22042616492c77274eb5908 | |
parent | 6e7ce2cdd34f7e3ad720e1d43a19635d79ce17b4 (diff) | |
download | gdb-10960bfbce1719b569d2f7e3b0a9931ec7f2b5d9.zip gdb-10960bfbce1719b569d2f7e3b0a9931ec7f2b5d9.tar.gz gdb-10960bfbce1719b569d2f7e3b0a9931ec7f2b5d9.tar.bz2 |
2011-05-31 Paul Brook <paul@codesourcery.com>
gas/
* config/tc-arm.c (do_t_branch): Avoid relaxing branches to constant
addresses.
gas/testsuite/
* arm/t2-branch-global.d: New test.
* arm/t2-branch-global.s: New test.
-rw-r--r-- | gas/ChangeLog | 5 | ||||
-rw-r--r-- | gas/config/tc-arm.c | 4 | ||||
-rw-r--r-- | gas/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gas/testsuite/gas/arm/t2-branch-global.d | 14 | ||||
-rw-r--r-- | gas/testsuite/gas/arm/t2-branch-global.s | 5 |
5 files changed, 32 insertions, 1 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index 456f14a..28c5231 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,4 +1,9 @@ 2011-05-31 Paul Brook <paul@codesourcery.com> + + * config/tc-arm.c (do_t_branch): Avoid relaxing branches to constant + addresses. + +2011-05-31 Paul Brook <paul@codesourcery.com> Nathan Sidwell <nathan@codesourcery.com> * config/tc-arm.c (fix_new_arm): Create an absolute symbol for diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c index 375ff82..964384c 100644 --- a/gas/config/tc-arm.c +++ b/gas/config/tc-arm.c @@ -9845,7 +9845,9 @@ do_t_branch (void) if (unified_syntax && (inst.size_req == 4 - || (inst.size_req != 2 && inst.operands[0].hasreloc))) + || (inst.size_req != 2 + && (inst.operands[0].hasreloc + || inst.reloc.exp.X_op == O_constant)))) { inst.instruction = THUMB_OP32(opcode); if (cond == COND_ALWAYS) diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index fad5dfb..859bcbe 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2011-05-31 Paul Brook <paul@codesourcery.com> + + * arm/t2-branch-global.d: New test. + * arm/t2-branch-global.s: New test. + 2011-05-24 Andreas Krebbel <Andreas.Krebbel@de.ibm.com> * gas/s390/esa-g5.d: Fix fp register pair operands. diff --git a/gas/testsuite/gas/arm/t2-branch-global.d b/gas/testsuite/gas/arm/t2-branch-global.d new file mode 100644 index 0000000..5850d6b --- /dev/null +++ b/gas/testsuite/gas/arm/t2-branch-global.d @@ -0,0 +1,14 @@ +#name: Thumb-2 branch to constant address +#This test is only valid on ELF based ports. +#not-target: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd *-*-riscix* +#objdump: -rd + + +.*: +file format.*arm.* + + +Disassembly of section .text: + +00000000 <foo>: + 0: f... b... b\.w .* + 0: R_ARM_THM_JUMP24 \*ABS\*.* diff --git a/gas/testsuite/gas/arm/t2-branch-global.s b/gas/testsuite/gas/arm/t2-branch-global.s new file mode 100644 index 0000000..223d924 --- /dev/null +++ b/gas/testsuite/gas/arm/t2-branch-global.s @@ -0,0 +1,5 @@ +.thumb +.arch armv7 +.syntax unified +foo: + b 0x10 @ Assembler must not relax this |