13.07.2015 Views

Volume 3: General-Purpose and System Instructions - Stanford ...

Volume 3: General-Purpose and System Instructions - Stanford ...

Volume 3: General-Purpose and System Instructions - Stanford ...

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.

AMD64 Technology 24594 Rev. 3.10 February 2005temp_*_descNULL = 0x0000// temporary descriptor, with subfields:// if it points to a block of memory: sel base limit attr// if it’s a gate descriptor: sel offset segment attr// null selector is all zeros// V,Z,A,S are integer variables, assigned a value when an instruction begins// executing (they can be assigned a different value in the middle of an// instruction, if needed)V = 2 if OPERAND_SIZE=164 if OPERAND_SIZE=328 if OPERAND_SIZE=64Z = 2 if OPERAND_SIZE=164 if OPERAND_SIZE=324 if OPERAND_SIZE=64A = 2 if ADDRESS_SIZE=164 if ADDRESS_SIZE=328 if ADDRESS_SIZE=64S = 2 if STACK_SIZE=164 if STACK_SIZE=328 if STACK_SIZE=64/////////////////////////////////////////////////////////////////////////////////// Bit Range Inside a Register/////////////////////////////////////////////////////////////////////////////////temp_data.[X:Y]// Bit X through Y in temp_data, with the other bits// in the register masked off./////////////////////////////////////////////////////////////////////////////////// Moving Data From One Register To Another/////////////////////////////////////////////////////////////////////////////////temp_dest.b = temp_srctemp_dest.w = temp_srctemp_dest.d = temp_srctemp_dest.q = temp_srctemp_dest.v = temp_src// 1-byte move (copies lower 8 bits of temp_src to// temp_dest, preserving the upper 56 bits of temp_dest)// 2-byte move (copies lower 16 bits of temp_src to// temp_dest, preserving the upper 48 bits of temp_dest)// 4-byte move (copies lower 32 bits of temp_src to// temp_dest, <strong>and</strong> zeros out the upper 32 bits of temp_dest)// 8-byte move (copies all 64 bits of temp_src to// temp_dest)// 2-byte move if V=2,// 4-byte move if V=4,50 Chapter 2: Instruction Overview

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

Saved successfully!

Ooh no, something went wrong!