News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

Converting for x64

Started by Camper, June 08, 2017, 09:17:23 AM

Previous topic - Next topic

Camper

Hi,

What is a safe way to use x86 with x64?
Are there more boundary conditions other than not being able to overflow the registers?
Or can you use explicit type conversions for instance?

regards,


Camper

Ty,

So the x86 code is backwards compatible, can you cheat an x32 program "using shift operators"  into acting on the extended register set?

hutch--

The short answer is NO, the code is structurally different, all addresses must be 64 bit and procedures are constructed differently. If you want 64 bit, write it as 64 bit, there is no simple conversion when using mnemonics (instructions).

Mikl__

#4
Hi, Skupje!
To become available 64-bit registers, it is necessary to convert the 64-bits Intel/AMD processor to the "long-mode", otherwise 63-32 bits of registers RAX, RBX, RCX, RDX, RDI, RSI, RBP, RSP and registers R8-R15 are unavailable
read https://en.wikipedia.org/wiki/X86-64