Exetools  

Go Back   Exetools > General > x64 OS

Notices

Reply
 
Thread Tools Display Modes
  #1  
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
  #2  
Old 12-25-2010, 06:15
unknownone
 
Posts: n/a
Quote:
Originally Posted by Taitch View Post
Some reasons to use intrinsics:
* Inline asm not supported in x64.
this is one pice of crap for someone developing low level stuff with c++&asm

all the code should be rewrited in order to compile for x64
Reply With Quote
  #3  
Old 12-30-2010, 07:25
Fyyre's Avatar
Fyyre Fyyre is offline
Fyyre
 
Join Date: Dec 2009
Location: 0°N 0°E / 0°N 0°E / 0; 0
Posts: 295
Rept. Given: 106
Rept. Rcvd 93 Times in 44 Posts
Thanks Given: 203
Thanks Rcvd at 397 Times in 130 Posts
Fyyre Reputation: 93
inline assembly language in functions? not really so useful, imho... for situations where it is, intrincs do well enough (imho, of course :)

i.e.

Code:
#define memopen()   _disable(); __writecr0(__readcr0() & (~(0x10000)));
#define memclose()  __writecr0(__readcr0() ^ 0x10000);  _enable();
atm... 60% of code I write is for nt kernel (x64).

-fyyre

Quote:
Originally Posted by unknownone View Post
this is one pice of crap for someone developing low level stuff with c++&asm

all the code should be rewrited in order to compile for x64 :(
Reply With Quote
The Following 2 Users Gave Reputation+1 to Fyyre For This Useful Post:
Git (12-30-2010), sendersu (12-31-2010)
Reply

Thread Tools
Display Modes

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 18:35.


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