> -fpic will break compilation with "i" constraint.
Ah, yes. But "X" is like no constraint, shouldn't we provide something
similar to "S" in aarch64 and riscv?
I think it is better to constrain the operand to constant symbols
rather than allowing everything.
Uros Bizjak 于2022年5月18日周三 18:18写道:
>
On Wed, May 18, 2022 at 12:14 PM Hongyu Wang wrote:
>
> Oh, I just found that asm ("%p0" :: "i"(addr)); also works on
> -mcmodel=large in this case, please ignore this patch. Thanks.
-fpic will break compilation with "i" constraint.
Uros.
>
> Uros Bizjak via Gcc-patches 于2022年5月18日周三 17:46写道:
Oh, I just found that asm ("%p0" :: "i"(addr)); also works on
-mcmodel=large in this case, please ignore this patch. Thanks.
Uros Bizjak via Gcc-patches 于2022年5月18日周三 17:46写道:
>
> On Wed, May 18, 2022 at 9:32 AM Hongyu Wang wrote:
> >
> > Hi,
> >
> > This patch adds a constraint "Ws" to allow ab
On Wed, May 18, 2022 at 9:32 AM Hongyu Wang wrote:
>
> Hi,
>
> This patch adds a constraint "Ws" to allow absolute symbolic address for
> either
> function or variable. This also works under -mcmodel=large.
>
> Bootstrapped/regtested on x86_64-pc-linux-gnu{-m32,}
>
> Ok for master?
Maybe you sho
Hi,
This patch adds a constraint "Ws" to allow absolute symbolic address for either
function or variable. This also works under -mcmodel=large.
Bootstrapped/regtested on x86_64-pc-linux-gnu{-m32,}
Ok for master?
gcc/ChangeLog:
PR target/105576
* config/i386/constraints.md (Ws):