27.12.2012 Views

Virtual Machines – Architectures, Implementations, and ... - Hot Chips

Virtual Machines – Architectures, Implementations, and ... - Hot Chips

Virtual Machines – Architectures, Implementations, and ... - Hot Chips

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Binary Translation Example<br />

x86 Source Binary<br />

addl %edx,4(%eax)<br />

movl 4(%eax),%edx<br />

add %eax,4<br />

PowerPC Target<br />

addi r16,r4,4 ;add 4 to %eax<br />

lwzx r17,r2,r16 ;load oper<strong>and</strong> from memory<br />

add r7,r17,r7 ;perform add of %edx<br />

stwx r7,r2,r16 ;store %edx value into memory<br />

mr r4,r16 ;move update value into %eax<br />

addi r3,r3,9 ;update PC (9 bytes)<br />

August 2005 VM Intro (c) 2005, J. E. Smith 34

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!