Skip to content
Snippets Groups Projects
Commit a6684f0d authored by Nick Clifton's avatar Nick Clifton
Browse files

Ensure that padding in the constant pool uses constant values.

	PR target/20068
	* config/tc-arm.c (add_to_lit_pool): Ensure that the padding added
	to the pool uses O_constant.
	* testsuite/gas/arm/pr20068.s: New test.
	* testsuite/gas/arm/pr20068.d: Test driver.
parent 4e7fbb34
No related branches found
No related tags found
No related merge requests found
2016-05-11 Nick Clifton <nickc@redhat.com>
PR target/20068
* config/tc-arm.c (add_to_lit_pool): Ensure that the padding added
to the pool uses O_constant.
* testsuite/gas/arm/pr20068.s: New test.
* testsuite/gas/arm/pr20068.d: Test driver.
2016-05-11 Nick Clifton <nickc@redhat.com>
* testsuite/gas/arm/archv8m-cmse-base.d: Skip for non-ELF ARM targets.
......
......@@ -3288,6 +3288,7 @@ add_to_lit_pool (unsigned int nbytes)
}
 
pool->literals[entry] = inst.reloc.exp;
pool->literals[entry].X_op = O_constant;
pool->literals[entry].X_add_number = 0;
pool->literals[entry++].X_md = (PADDING_SLOT << 8) | 4;
pool->next_free_entry += 1;
......
# name: PR20068 - Misaligned constant pool when running GAS on a 32-bit host.
# as: -mfpu=vfpv3
# objdump: -S
.*: file format .*
Disassembly of section .text:
00000000 <main>:
0: e59f0008 ldr r0, \[pc, #8\].*
4: ed9f9b03 vldr d9, \[pc, #12\].*
8: e1a0f00e mov pc, lr
c: 00000000 .*
10: 12345678 .*
14: 00000000 .*
18: 00000fff .*
1c: 0000fff0 .*
.global main
main:
LDR R0, =0x12345678
@LDR R0, =0x87654321
FLDD D9, =0xfff000000fff
@FLDD D9, =0
@FLDD D9, =0x0
MOV PC, LR
.ltorg
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment