www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - How to phrase RIP addressing in assembly under Linux AMD64

reply Sean O'Connor <sean.c4s.vn gmail.com> writes:
How to I phrase RIP addressing in assembly under Linux AMD64 in 
D.  I can't seem to figure it out.
Normally I do something like:

movq rax,rndphi[rip]

Where rndphi is a label pointing to data.

I know I have change movq to mov in D and hope the operation 
works on all 64 bits.

If for some reason it is not possible in D I can still put all my 
special vectorized code in a shared library and access it that 
way.  In fact I should code it on a GPU where it likely would run 
100 times faster. Maybe I should set up a Patreon account and see 
if there are any true believers in evolution out there.
https://github.com/S6Regen/Thunderbird
Aug 19 2018
parent reply Basile B. <b2.temp gmx.com> writes:
On Sunday, 19 August 2018 at 07:18:20 UTC, Sean O'Connor wrote:
 How to I phrase RIP addressing in assembly under Linux AMD64 in 
 D.  I can't seem to figure it out.
 Normally I do something like:

 movq rax,rndphi[rip]

 Where rndphi is a label pointing to data.

 I know I have change movq to mov in D and hope the operation 
 works on all 64 bits.

 If for some reason it is not possible in D I can still put all 
 my special vectorized code in a shared library and access it 
 that way.  In fact I should code it on a GPU where it likely 
 would run 100 times faster. Maybe I should set up a Patreon 
 account and see if there are any true believers in evolution 
 out there.
 https://github.com/S6Regen/Thunderbird
Hello, there's an issue opened https://issues.dlang.org/show_bug.cgi?id=17617. RIP is not available ATM.
Aug 19 2018
parent Sean O'Connor <sean.c4s.vn gmail.com> writes:
Okay, I see.  I'll try with a shared library.  I only have 3 or 4 
algorithms that don't auto-vectorize well with modern compilers 
and have to be written by hand.
Patreon have that terrible catch 22 tax form that stopped me 
writing for US magazines, rather unfortunate.
Aug 19 2018