Anyone used nasm for 64 bit SSE code?

DSP, Plugin and Host development discussion.
Post Reply New Topic
RELATED
PRODUCTS

Post

Hi,

I have some nasm code I'm porting to 64 bits.

Most I've managed to sort, however there's one bit that has me stumped.

I have a declaration

coeffs_0 dd <four floating point values>

then later a line

movaps xmm0, [coeffs_0]

Now this assembles fine with macho32 as the output format, and has worked perfectly for years

However when I try to compile it for macho64 I get

"Macho-O 64-bit does not support 32 bit absolute addresses"

I've tried every permutation of prefixes, bracketing, etc that I can think of, and nothing works.

I did find that if I do
movaps xmm0, [0]
it compiles fine, so it seems that nasm is deciding that the label is a 32 bit address.

Anyone know the answer to this? I've been googling for hours!

cheers

Jon

Post

No idea about nasm syntax (I've only ever written gas syntax directly) but as a work-around you could load the address into a register and use that for the load? Probably there's a way to convince NASM to do 64-bit immediates too, though.

Post Reply

Return to “DSP and Plugin Development”