diff options
author | Rohit Arul Raj <rohitarulraj@freescale.com> | 2015-05-14 22:58:27 -0600 |
---|---|---|
committer | Jeff Law <law@gcc.gnu.org> | 2015-05-14 22:58:27 -0600 |
commit | 06e7e3183b8869d45ed8719b449c0f7dd2573ab8 (patch) | |
tree | 0f84fb84eaad7d48acc6f4fd4bef4aaab4000b7c /gcc/varasm.c | |
parent | a5551ee6fc33e6b0b4bef3b3720173a8bb7eed44 (diff) | |
download | gcc-06e7e3183b8869d45ed8719b449c0f7dd2573ab8.zip gcc-06e7e3183b8869d45ed8719b449c0f7dd2573ab8.tar.gz gcc-06e7e3183b8869d45ed8719b449c0f7dd2573ab8.tar.bz2 |
varasm.c (output_constant_pool_1): Pass down alignment from constant pool entry's descriptor to output_constant_pool_2.
2015-05-14 Rohit Arul Raj <rohitrulraj@freescale.com>
* varasm.c (output_constant_pool_1): Pass down alignment from
constant pool entry's descriptor to output_constant_pool_2.
(output_object_block): Add comment prior to call to
output_constant_pool_1.
* gcc.target/powerpc/pr60158.c: New test.
From-SVN: r223209
Diffstat (limited to 'gcc/varasm.c')
-rw-r--r-- | gcc/varasm.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/gcc/varasm.c b/gcc/varasm.c index 11cb2c5..7630202 100644 --- a/gcc/varasm.c +++ b/gcc/varasm.c @@ -3968,8 +3968,12 @@ output_constant_pool_1 (struct constant_descriptor_rtx *desc, /* Output the label. */ targetm.asm_out.internal_label (asm_out_file, "LC", desc->labelno); - /* Output the data. */ - output_constant_pool_2 (desc->mode, x, align); + /* Output the data. + Pass actual alignment value while emitting string constant to asm code + as function 'output_constant_pool_1' explicitly passes the alignment as 1 + assuming that the data is already aligned which prevents the generation + of fix-up table entries. */ + output_constant_pool_2 (desc->mode, x, desc->align); /* Make sure all constants in SECTION_MERGE and not SECTION_STRINGS sections have proper size. */ @@ -7380,6 +7384,8 @@ output_object_block (struct object_block *block) if (CONSTANT_POOL_ADDRESS_P (symbol)) { desc = SYMBOL_REF_CONSTANT (symbol); + /* Pass 1 for align as we have already laid out everything in the block. + So aligning shouldn't be necessary. */ output_constant_pool_1 (desc, 1); offset += GET_MODE_SIZE (desc->mode); } |