[Bug target/111555] [AArch64] __ARM_FEATURE_UNALIGNED should be undefined with -mstrict-align

2024-03-14 Thread i at maskray dot me via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111555

Fangrui Song  changed:

   What|Removed |Added

 CC||i at maskray dot me

--- Comment #5 from Fangrui Song  ---
It seems that newer ports prefer -mstrict-align/-mno-strict-align to
-mno-unaligned-access/-munaligned-access.
Clang handling these options as aliases is unfortunate. I'll fix this issue in 
https://github.com/llvm/llvm-project/pull/85350 (hopefully milestone: 19.1.0)

[Bug target/111555] [AArch64] __ARM_FEATURE_UNALIGNED should be undefined with -mstrict-align

2024-03-14 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111555

--- Comment #4 from Andrew Pinski  ---
(In reply to Andrew Pinski from comment #3)
> (In reply to YunQiang Su from comment #2)
> > For AArch64, clang supports `-mno-unaligned-access`, while gcc doesn't,
> > should we add it as an alias of -mstrict-align?
> 
> -mno-unaligned-access is the arm option here rather than the aarch64 option
> :).
> I suspect clang folks decided to have the same option for both targets. I
> don't think we should support -mno-unaligned-access for aarch64 GCC.

See PR 99890 where -mstrict-align was rejected for arm.

[Bug target/111555] [AArch64] __ARM_FEATURE_UNALIGNED should be undefined with -mstrict-align

2024-03-14 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111555

--- Comment #3 from Andrew Pinski  ---
(In reply to YunQiang Su from comment #2)
> For AArch64, clang supports `-mno-unaligned-access`, while gcc doesn't,
> should we add it as an alias of -mstrict-align?

-mno-unaligned-access is the arm option here rather than the aarch64 option :).
I suspect clang folks decided to have the same option for both targets. I don't
think we should support -mno-unaligned-access for aarch64 GCC.

[Bug target/111555] [AArch64] __ARM_FEATURE_UNALIGNED should be undefined with -mstrict-align

2024-03-14 Thread syq at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111555

YunQiang Su  changed:

   What|Removed |Added

 CC||syq at gcc dot gnu.org

--- Comment #2 from YunQiang Su  ---
`-mno-unaligned-access` is also supported by MIPSr6.

I guess we should add a more generic macro for this case?
Is __UNALIGN_ACCESS_DISABLED__ OK?

For AArch64, clang supports `-mno-unaligned-access`, while gcc doesn't,
should we add it as an alias of -mstrict-align?

[Bug target/111555] [AArch64] __ARM_FEATURE_UNALIGNED should be undefined with -mstrict-align

2023-09-23 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111555

Andrew Pinski  changed:

   What|Removed |Added

   Last reconfirmed||2023-09-23
 Status|UNCONFIRMED |NEW
 Ever confirmed|0   |1

--- Comment #1 from Andrew Pinski  ---
Confirmed. Though the ACLE spec
(https://developer.arm.com/documentation/ihi0053/d/?lang=en) is not clear here
as this part was written as part of aarch32/thumb2 part rather than referencing
aarch64 ...