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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

24594 Rev. 3.10 February 2005 AMD64 Technology}IF ((PAGING_ENABLED) && (temp_linear is on a not-present page))EXCEPTION [#PF(error_code)] // page fault for not-present pagememory [temp_linear].x = temp.x// write the bytes to memory/////////////////////////////////////////////////////////////////////////////////// PUSH // Write data to the stack/////////////////////////////////////////////////////////////////////////////////usage:PUSH.x temp// where x is one of these: {v, z, b, w, d, q} <strong>and</strong>// denotes the size of the pushdefinition:WRITE_MEM.x [SS:RSP.s - X] = temp.xRSP.s = RSP - X// write to the stack// point rsp to the data just written/////////////////////////////////////////////////////////////////////////////////// POP // Read data from the stack, zero-extend it to 64 bits/////////////////////////////////////////////////////////////////////////////////usage:POP.x temp// where x is one of these: {v, z, b, w, d, q} <strong>and</strong>// denotes the size of the popdefinition:temp = READ_MEM.x [SS:RSP.s]RSP.s = RSP + X// read from the stack// point rsp above the data just written/////////////////////////////////////////////////////////////////////////////////// READ_DESCRIPTOR // Read 8-byte descriptor from GDT/LDT, return the descriptor/////////////////////////////////////////////////////////////////////////////////usage:temp_descriptor = READ_DESCRIPTOR (selector, chktype)// chktype field is one of the following:// cs_chk used for far call <strong>and</strong> far jump// clg_chk used when reading CS for far call or far jump through call gate// ss_chk used when reading SS// iret_chk used when reading CS for IRET or RETF// intcs_chk used when readin the CS for interrupts <strong>and</strong> exceptionsdefinition:Chapter 2: Instruction Overview 55

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

Saved successfully!

Ooh no, something went wrong!