Floating Point
Notes
- 2.3.1.6
- There are 15 floaing point registers
- They support
- 32, 64 and 128 bit floating point
- Also SIMD : Single Instruction Multiple Data
- There are also ymm (256 bits) and zmm (512 bit) registers in
- Chapter 18
- movss, movsd
- movss: move a 32 bit float between locations
- movsd: move a 64 bit float between locations
- Both can not be memory
- Neither can be an immediate
- mem to register clears the top bits
- reg to reg does not.
- cvtss2sd cvtsd2ss
- convert 32 to 64 bit number
- Convert 64 to 32 bit number
- cvtss2si/ cvttss2si , cvtsd2si/cvttsd2si
- cvtss2si: Convert 32 bit float to double round
- cvttss2si: Convert 32 bit float to double truncate
- cvtsd2si: Convert 64 bit float to double round
- cvttsd2si: Convert 64 bit float to double truncate
- addss, addsd : floating point add
- subss, subsd : subtract
- mulss, mulsd
- divss, divsd
- sqrtss, sqrtsd
- ucomiss, ucoisd : compare floating point
- Calling Convention:
- Parameters in xmm0 through xmm7
- Others on the stack
- rax holds the number of floating point parameters.
- normalDist.asm
- SIMD floating point instructions:
- movups: move unaligned paced single precision float values
- memory or register, but both can not be memory
- addps: add single precison float
- simd.asm, which I mostly got from gemini