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