64-bit long mode compatability with 32-bit instructions-GAS (Developers)
> Well, about WoW64 I read on wiki and it's clear then that it does CPU mode
> switching so this means that 32b code cannot be executed natively
Why not? It can and does. The switch is needed because the kernel is 64-bit, while the caller (your app) is not and you need to switch between the two modes since 32-bit code won't execute in 64-bit mode correctly and the other way around.
> and I do
> need branching for some cases. BTW can I manipulate AX or AH in long mode?
You surely can, the register is still there for you.
> BTW when WoW64 switches CPU to 32b mode (or what else is "compatibility
> mode") then it should be possible to switch it to v86 mode and execute 16b
> code too?
Unfortunately, no. Once you've got into long/64-bit mode, only 16- and 32-bit protected compatibility modes can coexist with it. V86 and real mode can't. Your only options for real-mode/v86 code are:
- code emulation
- hardware virtualization (note that older Intel's CPUs with VT didn't quite support real/v86 VMs, while AMD's with Pacifica did, not to mention the fact that the two implementations need two different versions of the Hypervisor)
- leaving long/64-bit mode completely (undoing all things that were required to set it up) and either switching to 32-bit protected mode (if you are OK with v86) or going one step further and leaving protected mode altogether.
Complete thread:
- 64-bit long mode compatability with 32-bit instructions-GAS - RayeR, 22.01.2014, 23:44
![Open in board view [Board]](img/board_d.gif)
![Open in mix view [Mix]](img/mix_d.gif)
- 64-bit long mode compatability with 32-bit instructions-GAS - Rugxulo, 23.01.2014, 01:10
- 64-bit long mode compatability with 32-bit instructions-GAS - Oso2k, 23.01.2014, 01:34
- 64-bit long mode compatability with 32-bit instructions-GAS - RayeR, 23.01.2014, 03:03
- 64-bit long mode compatability with 32-bit instructions-GAS - alexfru, 23.01.2014, 08:34
- 64-bit long mode compatability with 32-bit instructions-GAS - georgpotthast, 23.01.2014, 20:16
- 64-bit long mode compatability with 32-bit instructions-GAS - alexfru, 23.01.2014, 08:34
- 64-bit long mode compatability with 32-bit instructions-GAS - marcov, 23.01.2014, 21:57
Mix view