[PATCH/ARM] PR 16722, support VLDR s/d0, =Imm
Jiong Wang
jiong.wang@arm.com
Tue Apr 22 12:46:00 GMT 2014
LDR support load constants from literal pool or optimize to vmov, while no such support on VLDR. This patch fixes this issue.
the logic of this patch is
for VLDR s/d, =IMM, (currently no support for FPIMM)
if (s reg)
always spill to literal pool.
if (d reg)
if (IMM acceptable by vmov)
{
if (thumb_mode)
rewrite vldr d, #IMM to vmov.XX d, #IMM under thumb2 encoding.
else
rewrite under arm encoding.
}
else
spill to literal pool.
OK for trunk?
thanks.
PR target/16722
gas/
* config/tc-arm.c (add_to_lit_pool): Add one parameter 'nbytes'.
Support literal pool entry be 8 byte.
(s_ltorg): Likewise.
(enum lit_type): New enum type.
(encode_arm_cp_address): Generate literal pool entry if possible.
(move_or_literal_pool): Generate entry for vldr case.
(do_ldst): Use new enum type.
(do_ldstv4): Likewise.
(do_t_ldst): Likewise.
(neon_write_immbits): Support Thumb-2 mode.
gas/testsuite/
* gas/arm/ldconst.s: Add new cases for vldr.
* gas/arm/ldconst.d: Likewise.
* gas/arm/thumb2_pool.s: Likewise.
* gas/arm/thumb2_pool.d: Likewise.
--
Jiong
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vldr-literal-pool-v3.patch
Type: text/x-patch
Size: 31911 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20140422/8314f5c9/attachment.bin>
More information about the Binutils
mailing list