[Patch, ARM, GAS] Fix single-reg LDM/STM to LDR/STR translation.
Richard Earnshaw
rearnsha@arm.com
Fri Sep 17 13:59:00 GMT 2010
More information about the Binutils mailing list
Fri Sep 17 13:59:00 GMT 2010
- Previous message (by thread): [Patch, ARM, GAS] Fix single-reg LDM/STM to LDR/STR translation.
- Next message (by thread): [Patch, ARM, GAS] Fix single-reg LDM/STM to LDR/STR translation.
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Fri, 2010-09-17 at 11:06 +0100, Tejas Belagod wrote:
> Hi,
>
> The attached patch fixes the translation of single-register LDM/STM. For
> instruction like:
> STMIA sp, {r1}
> this patch chooses to encode this as
> STR r1, [sp, #0]
> which can fit into a 16-bit thumb encoding. This is in line with what
> the ARM ARM has to say about choosing encodings for STM:
>
> "Encoding T2 does not support a list containing only one register. If an
> STM instruction with just one register <Rt> in the list is assembled to
> Thumb and encoding T1 is not available, it is assembled to the
> equivalent STR<c><q> <Rt>,[<Rn>]{,#4} instruction"
>
> For LDM/STM with single-register list that can't fit into 16-bit
> encoding after translation to STR/LDR, 32-bit encoding is used. Care
> also has been taken to record UNPREDICTABLE errors where necessary.
>
> Tested with arm-none-eabi. OK?
>
> --
> Tejas Belagod
> ARM.
>
> Changelog:
>
> gas/
>
> 2010-09-17 Tejas Belagod <tejas.belagod@arm.com>
>
> * config/tc-arm.c (do_t_ldmstm): Add logic to handle
> single-register list for ldm/stm.
>
> gas/testsuite
>
> 2010-09-17 Tejas Belagod <tejas.belagod@arm.com>
>
> * gas/arm/thumb2_ldmstm.d: Change single-register stmia to use
> 16-bit str encoding instead of str.w. Likewise for ldmia.
> * gas/arm/thumb2_ldmstm.s: Change stmia comment. Add tests for
> T1 ldmia-to-ldr.
This is OK.
R.
- Previous message (by thread): [Patch, ARM, GAS] Fix single-reg LDM/STM to LDR/STR translation.
- Next message (by thread): [Patch, ARM, GAS] Fix single-reg LDM/STM to LDR/STR translation.
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Binutils mailing list