[fpc-devel] Same 64bit assembly code compiles under windows but not in linux (fpc 260)
luiz americo pereira camara
luizmed at oi.com.br
Thu Oct 4 13:52:49 CEST 2012
2012/10/3 Jonas Maebe <jonas.maebe at elis.ugent.be>
>
> On 03 Oct 2012, at 03:29, luiz americo pereira camara wrote:
>
>
> at the line
> // Load XMM5 with the bias value.
> MOVD XMM5, [Bias] //Bias = Integer
>
> Is it a know issue or a limitation of linux version?
>
>
> Win64 uses a different calling convention compared to every other x86-64
> operating system (Microsoft probably started working on it before the
> x86-64 ABI was finalized). One of the differences is that only passes the
> first three integer parameters in registers, while other operating systems
> pass the first six integer parameters in registers. This means that on
> Win64, the above translates into
>
> movd xmm5, [rpb + some_offset]
>
> while on other platforms, it translates into
>
> movd xmm5, [r8d]
>
> So you are creating a reference with r8d as base register, which is
> invalid (because it's a 32 bit register)
>
>
Why it compiles and works with fpc 2.6.0 64bit under windows (and also
Delphi)?
Luiz
>
> Jonas
>
> _______________________________________________
> fpc-devel maillist - fpc-devel at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20121004/a3f3dce2/attachment.html>
More information about the fpc-devel
mailing list