[PATCH, arm] Stack the PIC register for Thumb if PIC is enabled
Adam Nemet
anemet@Lnxw.COM
Fri Aug 2 00:33:00 GMT 2002
Nick,
Thanks for looking into this patch.
> I think that this patch would be better if you moved the entire test
> for a thumb register being pushed into a macro and then just used the
> macro throughtout arm.[ch]. See the attached reworked patch for an
> example.
>
> Using a macro has several advantages:
>
> * It will be easier to update the test in the future.
>
> * It eliminates discrepancies in different functions which need to
> decide if a register will be stacked. For example the current
> implementation of THUMB_INITIAL_ELIMINATION_OFFSET does not take
> into account "!(TARGET_SINGLE_PIC_BASE && ((reg) == arm_pic_register))"
>
> * It reduces source code size and makes the code easier to read.
>
> What do you think ?
I agree. I just simply followed the logic (and the lack of
abstraction) that was used with ARM. For completeness we should
probably add ARM_REG_PUSHED_P later as well.
If you want I can update the ChangeLog and rerun the tests
(-marm/-mthumb with /-fPIC/-fPIC -mpic-register=6). Let me know.
Adam
More information about the Gcc-patches
mailing list