Re: [PATCH] powerpc/atomic: Use YZ constraints for DS-form instructions

2024-09-19 Thread Michael Ellerman
Segher Boessenkool writes: > Hi! > > On Mon, Sep 16, 2024 at 10:05:10PM +1000, Michael Ellerman wrote: >> The 'ld' and 'std' instructions require a 4-byte aligned displacement >> because they are DS-form instructions. But the "m" asm constraint >> doesn't enforce that. >> >> That can lead to buil

Re: [PATCH] powerpc/atomic: Use YZ constraints for DS-form instructions

2024-09-17 Thread Michael Ellerman
On Mon, 16 Sep 2024 22:05:10 +1000, Michael Ellerman wrote: > The 'ld' and 'std' instructions require a 4-byte aligned displacement > because they are DS-form instructions. But the "m" asm constraint > doesn't enforce that. > > That can lead to build errors if the compiler chooses a non-aligned >

Re: [PATCH] powerpc/atomic: Use YZ constraints for DS-form instructions

2024-09-17 Thread Segher Boessenkool
Hi! On Mon, Sep 16, 2024 at 10:05:10PM +1000, Michael Ellerman wrote: > The 'ld' and 'std' instructions require a 4-byte aligned displacement > because they are DS-form instructions. But the "m" asm constraint > doesn't enforce that. > > That can lead to build errors if the compiler chooses a non

Re: [PATCH] powerpc/atomic: Use YZ constraints for DS-form instructions

2024-09-16 Thread Michael Ellerman
Mina Almasry writes: > On Mon, Sep 16, 2024 at 5:05 AM Michael Ellerman wrote: >> >> The 'ld' and 'std' instructions require a 4-byte aligned displacement >> because they are DS-form instructions. But the "m" asm constraint >> doesn't enforce that. >> >> That can lead to build errors if the compi

Re: [PATCH] powerpc/atomic: Use YZ constraints for DS-form instructions

2024-09-16 Thread Mina Almasry
On Mon, Sep 16, 2024 at 5:05 AM Michael Ellerman wrote: > > The 'ld' and 'std' instructions require a 4-byte aligned displacement > because they are DS-form instructions. But the "m" asm constraint > doesn't enforce that. > > That can lead to build errors if the compiler chooses a non-aligned > di

[PATCH] powerpc/atomic: Use YZ constraints for DS-form instructions

2024-09-16 Thread Michael Ellerman
The 'ld' and 'std' instructions require a 4-byte aligned displacement because they are DS-form instructions. But the "m" asm constraint doesn't enforce that. That can lead to build errors if the compiler chooses a non-aligned displacement, as seen with GCC 14: /tmp/ccuSzwiR.s: Assembler message