DynamoRIO / DynamoRIO/dynamorio

for 32-bit app on 64-bit kernel, switch to 64-bit mode and use extra registers in DR and tool

Open
#751 8 comments 0 reactions 0 assignees View on GitHub
Migrated Performance Priority-Low Type-Feature
Dominant language
C
Stars
3.2k
Forks
629
Avg merge
2d 18h
Merged PRs (30d)
30

Description

_From [bruen...@google.com](https://code.google.com/u/109494838902877177630/) on April 24, 2012 11:22:34_

I've long wanted to work on various projects involving switching modes, whether for the app's benefit or the tool's, but so far have not had time to work on any of them.

the idea here is that, when running a 32-bit application on a 64-bit kernel
under a DynamoRIO tool, we can switch to 64-bit mode and use the extra
registers as scratch space to reduce spills and improve performance.

we should consider using the registers for core DR for ibl, and also make
them available to the tool

we'd have to mangle instructions that are not legal in x64 mode. some just
need a re-encoding (e.g., 1-byte inc/dec) while others will be more complex
(pusha, BCD instrs, lds, etc.) and it may be simpler to swap back to x86
mode rather than try to emulate some of them.

also have to be careful of instrs whose default operand size changes based
on mode. most problematic and common will be push/pop which will likely
have to all be converted to store/load (multiple if mem arg).

need to ensure fault handling is done properly regardless of mode

xref issue #49 : simultaneous 32-bit and 64-bit app code support

xref my prior proposals about 32-to-64 for app code for supporting 32-bit
legacy plugins in 64-bit apps

xref "Dynamic Register Promotion of Stack Variables" in CGO 2011
32-to-64 to optimize app by getting app stack refs into regs

_Original issue: http://code.google.com/p/dynamorio/issues/detail?id=751_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.