Hi,

You can disregard this patch, Wilco found problems with it, and I
think he is working on a more complete fix.

Thanks,

Christophe


On Thu, 16 Apr 2020 at 17:39, Christophe Lyon
<christophe.l...@linaro.org> wrote:
>
> Hi,
>
> In PR94538, Wilco mentioned that my patch to enable -mpure-code for
> v6m caused regressions in the code generated for cortex-m23.
>
> Specifically, for
> int f3 (void) { return 0x11000000; }
> int f3_bis (void) { return 0x12345678; }
>
> we currently generate (-O2 -mcpu=cortex-m23 -mpure-code)
>         movs    r0, #17
>         lsls    r0, r0, #8
>         lsls    r0, r0, #8
>         lsls    r0, r0, #8
>         bx      lr
> and
>         movs    r0, #86
>         lsls    r0, r0, #8
>         adds    r0, r0, #120
>         movt    r0, 4660
>         bx      lr
>
> The attached patch brings back the original code generation:
>         movs    r0, #136        @ 12    [c=4 l=2]  *thumb1_movsi_insn/1
>         lsls    r0, r0, #21     @ 9     [c=4 l=2]  *thumb1_ashlsi3/0
>         bx      lr
> and
>         movw    r0, #22136      @ 12    [c=4 l=4]  *thumb1_movsi_insn/2
>         movt    r0, 4660        @ 13    [c=4 l=4]  *arm_movtas_ze/1
>         bx      lr
>
> This does not address the other problems discussed in the PR, so I'm
> not mentioning it in the ChangeLog.
>
> OK?
>
> Thanks,
>
> Christophe

Reply via email to