[Bug target/89400] [7/8/9 Regression] ICE: output_operand: invalid %-code with -march=armv6kz -mthumb -munaligned-access
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Feb 20 18:18:00 GMT 2019
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89400
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ramana at gcc dot gnu.org
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
All the "unaligned_access" instructions use %? in the patterns (except the last
one) where %? is TARGET_32BIT specific.
If the unaligned loads/stores don't really work for thumb1, then
if (! opts_set->x_unaligned_access)
{
opts->x_unaligned_access = (TARGET_32BIT_P (opts->x_target_flags)
&& arm_arch6 && (arm_arch_notm || arm_arch7));
}
else if (opts->x_unaligned_access == 1
&& !(arm_arch6 && (arm_arch_notm || arm_arch7)))
{
warning (0, "target CPU does not support unaligned accesses");
opts->x_unaligned_access = 0;
}
should be changed to:
else if (opts->x_unaligned_access == 1
&& (!(arm_arch6 && (arm_arch_notm || arm_arch7))
|| !TARGET_32BIT_P (opts->x_target_flags)))
If the unaligned_access instructions are also for thumb1, then perhaps they
need to set predicable to no for !TARGET_32BIT e.g. based on isa attribute and
avoid using %? in the thumb1 alternative patterns.
More information about the Gcc-bugs
mailing list