[PATCH, rs6000] Add non-relative jump table support on Power Linux
HAO CHEN GUI
guihaoc@linux.ibm.com
Fri Nov 27 01:16:25 GMT 2020
Segher,
Thanks for your comments. I have modified the patch according to your
advice and committed.
On 24/11/2020 上午 6:25, Segher Boessenkool wrote:
> Hi!
>
> Sorry this took so long.
>
> On Thu, Oct 15, 2020 at 04:46:01PM +0800, HAO CHEN GUI wrote:
>> On 29/9/2020 上午 6:46, Segher Boessenkool wrote:
>>> [ Please do not insert patches into discussions ]
> So, please send new patches as a new thread. This makes it much easier
> to handle. If you want to reply to something in the old thread just do
> it there, but send the new patch not as a reply.
>
>> * config/rs6000/rs6000.opt (mrelative-jumptables): Add
>> mrelative-jumptables.
> Just "New." or "New flag." or similar?
>
>> +/* Implement TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC.
>> + Marco relative jumpstables indicates addr_diff_vec or addr_vec. */
> The documentation says
> Return true to generate ADDR_DIF_VEC table or false to generate
> ADDR_VEC table for jumps in case of -fPIC.
> but you can just leave out that last line completely.
>
>> + if (rs6000_relative_jumptables)
>> + {
>> + if (TARGET_32BIT)
>> + jump = gen_tablejumpsi_nospec (operands[0], operands[1], ccreg);
>> + else
>> + jump = gen_tablejumpdi_nospec (operands[0], operands[1], ccreg);
>> + }
>> else
>> - jump = gen_tablejumpdi_nospec (operands[0], operands[1], ccreg);
>> + jump = gen_tablejump_absolute_nospec (Pmode, operands[0], operands[1],
>> + ccreg);
>> emit_jump_insn (jump);
> It now is
> @tablejump<mode>_nospec
> so this code will become something like
>
> if (rs6000_relative_jumptables)
> jump = gen_tablejumpsi_nospec (Pmode, operands[0], operands[1], ccreg);
> else
> jump = gen_tablejump_absolute_nospec (Pmode, operands[0], operands[1],
> ccreg);
> emit_jump_insn (jump);
>
>
> Okay for trunk with those changes. Thank you!
>
>
> Segher
More information about the Gcc-patches
mailing list