|
From: Nicholas N. <nj...@cs...> - 2006-06-14 23:21:21
|
On Wed, 14 Jun 2006, Eric Li wrote: > I have another question about PUT/GET in VEX. In the outdated > documentation, it says PUT/GET is for moving values between CPU registers > and Temp registers. In the VEX IR, PUT/GET uses offsets, which implies > that it's addressed like memory, so then where do all the registers (eax, > ebx, etc.) go? The guest state (registers) is stored by default in a block of memory. Each register value gets pulled into real machine registers in order to be used, and if it is changed it then gets written back to the memory block before the end of the BB. > I looked at the IR for some common instructions and noticed that eax seems > to be at PUT(0), is this always true? If so, is there a mapping of which > registers go at which offsets somewhere? Yes. Look at VEX/libvex_guest_*.h, it has the mapping for each architecture. And VEX/libvex_guest_offsets.h is auto-generated by auxprogs/genoffsets.c, I think it just gives a handy name for the integer registers on each platform, which can be useful. Nick |