Re: [PATCH] rs6000: Disable PCREL for unsupported targets [PR111045]

2023-11-27 Thread Michael Meissner
On Fri, Nov 10, 2023 at 06:03:40PM -0600, Peter Bergner wrote: > On 8/25/23 6:20 AM, Kewen.Lin wrote: > > btw, I was also expecting that we don't implicitly set > > OPTION_MASK_PCREL any more for Power10, that is to remove > > OPTION_MASK_PCREL from OTHER_POWER10_MASKS. > > So my patch removes

Re: [PATCH] rs6000: Disable PCREL for unsupported targets [PR111045]

2023-11-14 Thread Peter Bergner
On 11/13/23 8:33 PM, Kewen.Lin wrote: >> if (PCREL_SUPPORTED_BY_OS) > >> + else >> +{ >> + if (TARGET_PCREL >> + && (rs6000_isa_flags_explicit & OPTION_MASK_PCREL) != 0) >> +error ("use of %qs is invalid for this target", "-mpcrel"); >>rs6000_isa_flags &=

Re: [PATCH] rs6000: Disable PCREL for unsupported targets [PR111045]

2023-11-13 Thread Kewen.Lin
Hi Peter, on 2023/11/11 07:51, Peter Bergner wrote: > On 8/27/23 9:06 PM, Kewen.Lin wrote: >> Assuming we only have ELFv2_ABI_CHECK in PCREL_SUPPORTED_BY_OS, we >> can have either TARGET_PCREL or !TARGET_PCREL after the checking. >> For the latter, it's fine and don't need any checks. For the

Re: [PATCH] rs6000: Disable PCREL for unsupported targets [PR111045]

2023-11-13 Thread jeevitha
On 11/11/23 5:21 am, Peter Bergner wrote: > Jeevitha, can you test this patch to see whether it fixes the testsuite > issue caused by your earlier patch that was approved, but not yet pushed? > That was the use GPR2 for register allocation, correct? Note, you'll need > to update the patch to

Re: [PATCH] rs6000: Disable PCREL for unsupported targets [PR111045]

2023-11-10 Thread Peter Bergner
On 8/25/23 6:20 AM, Kewen.Lin wrote: > btw, I was also expecting that we don't implicitly set > OPTION_MASK_PCREL any more for Power10, that is to remove > OPTION_MASK_PCREL from OTHER_POWER10_MASKS. So my patch removes the flag from the default power10 flags, like you want. However, it doesn't

Re: [PATCH] rs6000: Disable PCREL for unsupported targets [PR111045]

2023-11-10 Thread Peter Bergner
On 8/27/23 9:06 PM, Kewen.Lin wrote: > Assuming we only have ELFv2_ABI_CHECK in PCREL_SUPPORTED_BY_OS, we > can have either TARGET_PCREL or !TARGET_PCREL after the checking. > For the latter, it's fine and don't need any checks. For the former, > if it's implicit, for !TARGET_PREFIXED we will

Re: [PATCH] rs6000: Disable PCREL for unsupported targets [PR111045]

2023-08-27 Thread Kewen.Lin via Gcc-patches
on 2023/8/26 06:04, Peter Bergner wrote: > On 8/25/23 6:20 AM, Kewen.Lin wrote: >> Assuming the current PCREL_SUPPORTED_BY_OS unchanged, when >> PCREL_SUPPORTED_BY_OS is true, all its required conditions are >> satisfied, it should be safe. while PCREL_SUPPORTED_BY_OS is >> false, it means the

Re: [PATCH] rs6000: Disable PCREL for unsupported targets [PR111045]

2023-08-25 Thread Peter Bergner via Gcc-patches
On 8/25/23 6:20 AM, Kewen.Lin wrote: > Assuming the current PCREL_SUPPORTED_BY_OS unchanged, when > PCREL_SUPPORTED_BY_OS is true, all its required conditions are > satisfied, it should be safe. while PCREL_SUPPORTED_BY_OS is > false, it means the given subtarget doesn't support it, or one > or

Re: [PATCH] rs6000: Disable PCREL for unsupported targets [PR111045]

2023-08-25 Thread Kewen.Lin via Gcc-patches
on 2023/8/25 11:20, Peter Bergner wrote: > On 8/24/23 12:56 AM, Kewen.Lin wrote: >> By looking into the uses of function rs6000_pcrel_p, I think we can >> just replace it with TARGET_PCREL. Previously we don't require PCREL >> unset for any unsupported target/OS, so we need rs6000_pcrel_p() to >>

Re: [PATCH] rs6000: Disable PCREL for unsupported targets [PR111045]

2023-08-24 Thread Peter Bergner via Gcc-patches
On 8/24/23 12:56 AM, Kewen.Lin wrote: > By looking into the uses of function rs6000_pcrel_p, I think we can > just replace it with TARGET_PCREL. Previously we don't require PCREL > unset for any unsupported target/OS, so we need rs6000_pcrel_p() to > ensure it's really supported in those use

Re: [PATCH] rs6000: Disable PCREL for unsupported targets [PR111045]

2023-08-23 Thread Kewen.Lin via Gcc-patches
Hi Peter, on 2023/8/24 10:07, Peter Bergner wrote: > On 8/21/23 8:51 PM, Kewen.Lin wrote: >>> The following patch has been bootstrapped and regtested on powerpc64-linux. >> >> I think we should test this on powerpc64le-linux P8 or P9 (no P10) as well. > > That's a good idea! > > > >> I think

Re: [PATCH] rs6000: Disable PCREL for unsupported targets [PR111045]

2023-08-23 Thread Peter Bergner via Gcc-patches
On 8/21/23 8:51 PM, Kewen.Lin wrote: >> The following patch has been bootstrapped and regtested on powerpc64-linux. > > I think we should test this on powerpc64le-linux P8 or P9 (no P10) as well. That's a good idea! > I think this should be moved to be with the hunk on PCREL: > > /* If the

Re: [PATCH] rs6000: Disable PCREL for unsupported targets [PR111045]

2023-08-21 Thread Kewen.Lin via Gcc-patches
Hi Jeevitha, on 2023/8/21 18:32, jeevitha wrote: > Hi All, > > The following patch has been bootstrapped and regtested on powerpc64-linux. I think we should test this on powerpc64le-linux P8 or P9 (no P10) as well. > > It is currently possible to incorrectly enable PCREL for targets that do