Support unaligned load/store on more ARM targets

Anton Korobeynikov anton at korobeynikov.info
Wed May 15 16:21:22 PDT 2013


>> When this option (unaligned access) was initially added the discussion
>> ended with the default being conservative and correct. Subtarget can
>> surely redefine it, if necessary (like Darwin).
> Do you have a reference to the original discussion?
It was ~ 2-2.5 year ago when this code was added and the discussion
was on IRC most probably.

> My fix therefore follows what seems to be the sane way to use ARMv7
> hardware, but this can always be overwritten with the -arm-strict-align
> flag. Do you think that my assessment of "sane behavior on ARMv7" is
> incorrect, and do you have subtarget examples where this would be a bad
> thing?
The change you proposed is safe for Linux and PNaCl. But it's unsafe
for bare-metal platforms. There is no subtarget for this - just use
arm-eabi target triplet and you're done (subtarget here will be
blank).

Even more, the change in question actually is a regression for such
subtargets. Previously the code generated never trapped and the
present one traps. And starting to ask for additional cmdline flag is
a bad thing here IMO.

--
With best regards, Anton Korobeynikov
Faculty of Mathematics and Mechanics, Saint Petersburg State University



More information about the llvm-commits mailing list