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 2005ARPLAdjust Requestor Privilege LevelCompares the requestor privilege level (RPL) fields of two segment selectors in thesource <strong>and</strong> destination oper<strong>and</strong>s of the instruction. If the RPL field of the destinationoper<strong>and</strong> is less than the RPL field of the segment selector in the source register, thenthe zero flag is set <strong>and</strong> the RPL field of the destination oper<strong>and</strong> is increased to matchthat of the source oper<strong>and</strong>. Otherwise, the destination oper<strong>and</strong> remains unchanged<strong>and</strong> the zero flag is cleared.The destination oper<strong>and</strong> can be either a 16-bit register or memory location; the sourceoper<strong>and</strong> must be a 16-bit register.The ARPL instruction is intended for use by operating-system procedures to adjustthe RPL of a segment selector that has been passed to the operating system by anapplication program to match the privilege level of the application program. Thesegment selector passed to the operating system is placed in the destination oper<strong>and</strong><strong>and</strong> the segment selector for the code segment of the application program is placed inthe source oper<strong>and</strong>. The RPL field in the source oper<strong>and</strong> represents the privilege levelof the application program. The ARPL instruction then insures that the RPL of thesegment selector received by the operating system is no lower than the privilege levelof the application program.See “Adjusting Access Rights” in <strong>Volume</strong> 2, for more information on access rights.In 64-bit mode, this opcode (63H) is used for the MOVSXD instruction.Mnemonic Opcode DescriptionARPL reg/mem16, reg16 63 /r Adjust the RPL of a destination segment selector to a levelnot less than the RPL of the segment selector specified inthe 16-bit source register.(Invalid in 64-bit mode.)Related <strong>Instructions</strong>LAR, LSL, VERR, VERW298 ARPL

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

Saved successfully!

Ooh no, something went wrong!