Exetools  

Go Back   Exetools > General > x64 OS

Notices

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 09-13-2010, 23:03
Taitch
 
Posts: n/a
Some reasons to use intrinsics:
* Inline asm not supported in x64.

Works fine in GCC. You can use $eax or $rax to reference $rax. Also the Microsoft 64-bit calling convention works with MinGW GCC since 4.4.

AMD has a similar guide on x86-64, and it said things like not to use loops for short iterations because the compiler likely won't always optimise in 64-bit mode for these. So 'unroll' them. GCC has options: -funroll-all-loops -funroll-loops . It's not hugely noticeable when you have a quad-core machine @ 3.4 GHz. The guide from AMD is very technical but does explain some basics like that RAX is basicallly EAX and that a __stdcall (if that were used on x86-64 Windows) is not ordered EAX,EDX,EDI (with return value in EAX) but now it's RAX,RSI,RDI if I remember correctly. I was having trouble putting inline ASM into an app just to see if it would work, and then realised GCC won't convert it to x86-64 for me. PUSH EAX worked but almost nothing else did.

It'll be some time before the Windows world fully moves to 64-bit, but there will certainly be reversing when that time comes. By contrast, most software for Linux can either be compiled for 64-bit or has a 64-bit version binary (including things like Maya).
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
About .Net Packing and Introduction BackTangent General Discussion 10 06-12-2011 20:24


All times are GMT +8. The time now is 16:50.


Always Your Best Friend: Aaron, JMI, ahmadmansoor, ZeNiX, chessgod101
( Since 1998 )