aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-arm/arm-movwt.s
diff options
context:
space:
mode:
authorPaul Brook <paul@codesourcery.com>2006-05-11 15:17:34 +0000
committerPaul Brook <paul@codesourcery.com>2006-05-11 15:17:34 +0000
commitb6895b4f375bfb1de5a8d33b3af600c5d92314d8 (patch)
tree270b1929d939066a8b43f6cabfa3d6282c7dacdd /ld/testsuite/ld-arm/arm-movwt.s
parente28387c3bf6b1358d3a438443fc790c8e0fefa22 (diff)
downloadgdb-b6895b4f375bfb1de5a8d33b3af600c5d92314d8.zip
gdb-b6895b4f375bfb1de5a8d33b3af600c5d92314d8.tar.gz
gdb-b6895b4f375bfb1de5a8d33b3af600c5d92314d8.tar.bz2
2006-05-11 Paul Brook <paul@codesourcery.com>
bfd/ * elf32-arm.c (elf32_arm_reloc_map): Add MOVW and MOVT relocs. (elf32_arm_final_link_relocate): Handle MOVW and MOVT relocs. (elf32_arm_gc_sweep_hook, elf32_arm_check_relocs): Ditto. * reloc.c: Ditto. * bfd-in2.h: Regenerate. * libbfd.h: Regenerate. * libcoff.h: Regenerate. gas/ * config/tc-arm.c (parse_half): New function. (operand_parse_code): Remove OP_Iffff. Add OP_HALF. (parse_operands): Ditto. (do_mov16): Reject invalid relocations. (do_t_mov16): Ditto. Use Thumb reloc numbers. (insns): Replace Iffff with HALF. (md_apply_fix): Add MOVW and MOVT relocs. (tc_gen_reloc): Ditto. * doc/c-arm.texi: Document relocation operators ld/testsuite/ * ld-arm/arm-elf.exp: Add arm-movwt. * ld-arm/arm-movwt.d: New test. * ld-arm/arm-movwt.s: New test. * ld-arm/arm.ld: Add .far.
Diffstat (limited to 'ld/testsuite/ld-arm/arm-movwt.s')
-rw-r--r--ld/testsuite/ld-arm/arm-movwt.s44
1 files changed, 44 insertions, 0 deletions
diff --git a/ld/testsuite/ld-arm/arm-movwt.s b/ld/testsuite/ld-arm/arm-movwt.s
new file mode 100644
index 0000000..ba8b1c5
--- /dev/null
+++ b/ld/testsuite/ld-arm/arm-movwt.s
@@ -0,0 +1,44 @@
+ .text
+ .arch armv6t2
+ .syntax unified
+ .global _start
+ .type _start, %function
+_start:
+base1:
+arm1:
+ movw r0, #:lower16:arm2
+ movt r1, #:upper16:arm2
+ movw r2, #:lower16:(arm2 - arm1)
+ movt r3, #:upper16:(arm2 - arm1)
+ movw r4, #:lower16:thumb2
+ movt r5, #:upper16:thumb2
+ movw r6, #:lower16:(thumb2 - arm1)
+ movt r7, #:upper16:(thumb2 - arm1)
+ .thumb
+ .type thumb1, %function
+ .thumb_func
+thumb1:
+ movw r7, #:lower16:arm2
+ movt r6, #:upper16:arm2
+ movw r5, #:lower16:(arm2 - arm1)
+ movt r4, #:upper16:(arm2 - arm1)
+ movw r3, #:lower16:thumb2
+ movt r2, #:upper16:thumb2
+ movw r1, #:lower16:(thumb2 - arm1)
+ movt r0, #:upper16:(thumb2 - arm1)
+
+ .section .far, "ax", %progbits
+ .arm
+arm2:
+ movw r0, #:lower16:(arm1 - arm2)
+ movt r0, #:upper16:(arm1 - arm2)
+ movw r0, #:lower16:(thumb1 - arm2)
+ movt r0, #:upper16:(thumb1 - arm2)
+ .thumb
+ .type thumb2, %function
+ .thumb_func
+thumb2:
+ movw r0, #:lower16:(arm1 - arm2)
+ movt r0, #:upper16:(arm1 - arm2)
+ movw r0, #:lower16:(thumb1 - arm2)
+ movt r0, #:upper16:(thumb1 - arm2)