Plug-ins, Hosts, Apps,
Hardware, Soundware
Developers
(Brands)
Videos Groups
Whats's in?
Banks & Patches
Download & Upload
Music Search
KVR
   
KVR Forum » DSP and Plug-in Development
Thread Read
Anyone used nasm for 64 bit SSE code?
JonHodgson
KVRian
- profile
- pm
PostPosted: Wed Jul 04, 2012 6:22 am reply with quote
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
^ Joined: 01 Apr 2003  Member: #6570  
mystran
KVRAF
- profile
- pm
- e-mail
- www
PostPosted: Wed Jul 04, 2012 7:18 am reply with quote
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.
----
<- my plugins | my music -> @Soundcloud
^ Joined: 11 Feb 2006  Member: #97939  Location: Helsinki, Finland
All times are GMT - 8 Hours

Printable version
Page 1 of 1
Display posts from previous:   
ReplyNew TopicPrevious TopicNext Topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Username: Password:  
KVR Developer Challenge 2012