[patch] Thumb2 pc-relative addressing

Paul Brook paul@codesourcery.com
Thu Jul 21 02:51:00 GMT 2005


The attached patch fixes a segfault when assembling the thumb2 instruction
ldr rN, [pc, #im]

encode_thumb32_addr_mode was incorrectly setting inst.reloc.pc_rel. This will 
already have been set by parse_address in the ldr rN, label case.

Tested with cross to arm-none-eabi.
Ok?

Paul

2005-07-21  Paul Brook  <paul@codesourcery.com>

gas/
	* config/tc-arm.c (encode_thumb32_addr_mode): Don't set
	inst.reloc.pc_rel.
gas/testsuite/
	* gas/arm/thumb32.s: Add tests for [pc, #imm] addressing modes.
	* gas/arm/thumb32.d: Ditto.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.t2_pcrel
Type: text/x-diff
Size: 3094 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20050721/bf64ab47/attachment.bin>


More information about the Binutils mailing list