[PATCH, rs6000] Add non-relative jump table support on Power Linux

HAO CHEN GUI guihaoc@linux.ibm.com
Fri Nov 6 01:02:57 GMT 2020


Hi,

Gentle ping this:

https://gcc.gnu.org/pipermail/gcc-patches/2020-October/556236.html

Thanks.

Gui Haochen


On 15/10/2020 下午 4:46, HAO CHEN GUI wrote:
> Segher,
>
>     I re-wrote the patch based on parameterized name.
>
>     The attachments are the patch diff file and change log file.
>
>     Bootstrapped and tested on powerpc64le-linux-gnu with no 
> regressions.  Is this okay for trunk? Any recommendations? Thanks a lot.
>
>
> On 29/9/2020 上午 6:46, Segher Boessenkool wrote:
>> Hi hao Chen,
>>
>> On Wed, Sep 09, 2020 at 04:55:29PM +0800, HAO CHEN GUI wrote:
>>>      Thanks for your advice. I removed macros defined in linux64.h and
>>> linux.h. So they take relative jump tables by default. When
>>> no-relative-jumptables is set, the absolute jump tables are taken. All
>>> things relevant to section relocations are put in another patch. Thanks
>>> again.
>> [ Please do not insert patches into discussions ]
>>
>>> +/* Implement TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC.
>>> +   Return true if rs6000_relative_jumptables is set.  */
>> Don't just say what the code does (we can see that ;-) ); say *why*.
>> Of course it is terribly simple in this case, so maybe just that first
>> line is plenty.
>>
>>> +/* Specify the machine mode that this machine uses
>>> +   for the index in the tablejump instruction.  */
>>> +#define CASE_VECTOR_MODE \
>>> +  (TARGET_32BIT || rs6000_relative_jumptables ? SImode : Pmode)
>> If TARGET_32BIT is true, SImode and Pmode are the same, so this is
>> simpler said as
>>
>> #define CASE_VECTOR_MODE (rs6000_relative_jumptables ? SImode : Pmode)
>>
>>
>> I'll have the tablejump* patterns converted to paremeterized names
>> hopefully tonight or tomorrow, which will make your patch much easier
>> to read.  It looks like it will be fine, thanks :-)
>>
>>
>> Segher


More information about the Gcc-patches mailing list