[fpc-devel] FPC_REQUIRES_PROPER_ALIGNMENT

Jonas Maebe jonas at zeus.ugent.be
Wed Oct 13 16:38:02 CEST 2004


On 12 okt 2004, at 22:12, Marc Weustink wrote:

> M:> Is a sigbus catchable so that you can read the data and continue 
> as if nothing happened (or is that something at OS level)

That is normally possible, yes. But as Florian said, it's quite a bit 
of work and also extremely slow (you get 4 context switches per 
unaligned access, + the work to load the value).

> M:> Let the user take care of alignment makes me a bit itchy. I don't 
> get a good feeling with it.

I think it's normal he has to. We also don't emulate the 80-bit 
extended type on processors which only have a 64-bit double precision 
fpu. We also don't emulate endianess. Portability has a lot of 
pitfalls.

> M:> But how are members of packed records accessed ?

Just like members of regular records. The difference is that there are 
simply no alignment bytes between the different fields of the record.


Jonas





More information about the fpc-devel mailing list