arm64 float vs double

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

arm64 float vs double

KenDickey
 
>    I don't understand this proposed change.  float is a 32-bit
> datatype, double is a 64-bit datatype.  My understanding is that on
> ARM64 floating-point arguments are passed as doubles.  What am I
> missing?

What I was missing was the rationale for using only even numbered array
indices for floatRegisters in
ThreadedARM{32,64}FFIPlugin>>ffiCalloutTo:SpecOnStack:in:

I am following the pattern of ThreadedARM32FFIPlugin:
  - floats get assigned to the register array slots
[#ffiPushSingleFloat:in:]
  - doubles get mem-copied to the register array slots
[#ffiPushDoubleFloat:in:]

C casting tricks are then used to interpret memory properly for FFI
usage.

One could do the other way around.

Case of 6 of one, half a dozen of the other.

This is why we need to leave mouse tracks (er, document) our artifacts.

Hey, this confused the heck out of me!
-KenD
-KenD