[fpc-devel] Can FPC at least give a hint/warning?
Mark Morgan Lloyd
markMLl.fpc-devel at telemetry.co.uk
Tue Nov 8 11:45:35 CET 2016
On 08/11/16 10:26, Marco van de Voort wrote:
> In our previous episode, Mark Morgan Lloyd said:
>> The Solaris and C communities appeared to take the line that a correct
>> compiler "could not" generate unaligned accesses, although they held off
>> clarifying whether "could" in that context means "if it does it's an
>> error" or "it must rearrange data to avoid an error".
>>
>> I believe that Solaris and in some cases Linux can handle unaligned
>> accesses in the kernel, although there's obviously a significant
>> performance penalty.
>
> I can remember the early powerpc ports where I came into trouble with the
> NetBSD port because the Linux kernel used emulation to fix unaligned float
> loads/stores, while NetBSD didn't.
I believe the Linux ARM kernel can intercept some alignment traps, the
SPARC kernel can do something similar but only for kernel code (I don't
know whether that will change with the current push to get Debian onto
SPARC-64, it could be an artifact of the kernel being 64-bit but the
userspace 32-bit).
--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk
[Opinions above are the author's, not those of his employers or colleagues]
More information about the fpc-devel
mailing list