24531904_j
24531904_j 24531904_j
RET—Return from Procedure ( 続き ) THEN IF second doubleword on stack is not within stack limits THEN #SS(0); FI; ELSE (* OperandSize = 16 *) IF second word on stack is not within stack limits THEN #SS(0); FI; FI; IF return code segment selector is null THEN GP(0); FI; IF return code segment selector addrsses descriptor beyond diescriptor table limit THEN GP(selector; FI; Obtain descriptor to which return code segment selector points from descriptor table IF return code segment descriptor is not a code segment THEN #GP(selector); FI; if return code segment selector RPL < CPL THEN #GP(selector); FI; IF return code segment descriptor is condorming AND return code segment DPL > return code segment selector RPL THEN #GP(selector); FI; IF return code segment descriptor is not present THEN #NP(selector); FI: IF return code segment selector RPL > CPL THEN GOTO RETURN-OUTER-PRIVILEGE-LEVEL; ELSE GOTO RETURN-TO-SAME-PRIVILEGE-LEVEL FI; END;FI; RETURN-SAME-PRIVILEGE-LEVEL: IF the return instruction pointer is not within ther return code segment limit THEN #GP(0); FI; IF OperandSize=32 THEN EIP ← Pop(); CS ← Pop(); (* 32-bit pop, high-order 16-bits discarded *) ESP ← ESP + SRC; ELSE (* OperandSize=16 *) EIP ← Pop(); EIP ← EIP AND 0000FFFFH; CS ← Pop(); (* 16-bit pop *) ESP ← ESP + SRC; FI; IF Itanium System Environment AND PSR.tb THEN IA-32_Exception(Debug); RETURN-OUTER-PRIVILEGE-LEVEL: IF top (16 + SRC) bytes of stack are not within stack limits (OperandSize=32) OR top (8 + SRC) bytes of stack are not within stack limits (OperandSize=16) THEN #SS(0); FI; FI; Read return segment selector; IF stack segment selector is null THEN #GP(0); FI; IF return stack segment selector index is not within its descriptor table limits THEN #GP(selector); FI; Read segment descriptor pointed to by return segment selector; IF stack segment selector RPL ≠ RPL of the return code segment selector OR stack segment is not a writable data segment OR stack segment descriptor DPL ≠ RPL of the return code segment selector THEN #GP(selector); FI; 3:718 第 3 巻 : IA-32 基本命令リファレンス
RET—Return from Procedure ( 続き ) IF stack segment not present THEN #SS(StackSegmentSelector); FI; IF the return instruction pointer is not within the return code segment limit THEN #GP(0); FI: CPL ← ReturnCodeSegmentSelector(RPL); IF OperandSize=32 THEN EIP ← Pop(); CS ← Pop(); (* 32-bit pop, high-order 16-bits discarded *) (* segment descriptor information also loaded *) CS(RPL) ← CPL; ESP ← ESP + SRC; tempESP ← Pop(); tempSS ← Pop(); (* 32-bit pop, high-order 16-bits discarded *) (* segment descriptor information also loaded *) ESP ← tempESP; SS ← tempSS; ELSE (* OperandSize=16 *) EIP ← Pop(); EIP ← EIP AND 0000FFFFH; CS ← Pop(); (* 16-bit pop; segment descriptor information also loaded *) CS(RPL) ← CPL; ESP ← ESP + SRC; tempESP ← Pop(); tempSS ← Pop(); (* 16-bit pop; segment descriptor information also loaded *) (* segment descriptor information also loaded *) ESP ← tempESP; SS ← tempSS; FI; FOR each of segment register (ES, FS, GS, and DS) DO; IF segment register points to data or non-conforming code segment AND CPL > segment descriptor DPL; (* DPL in hidden part of segment register *) THEN (* segment register invalid *) SegmentSelector/Descriptor ← 0; (* null segment selector *) FI; OD; For each of ES, FS, GS, and DS DO IF segment descriptor indicates the segment is not a data or readable code segment OR if the segment is a data or non-conforming code segment and the segment descriptor’s DPL < CPL or RPL of code segment’s segment selector THEN segment selector register ← null selector; OD; 影響を受けるフラグ なし。 第 3 巻 : IA-32 基本命令リファレンス 3:719
- Seite 680 und 681: MOVZX—Move with Zero-Extend オ
- Seite 682 und 683: MUL—Unsigned Multiplication of AL
- Seite 684 und 685: NEG—Two's Complement Negation オ
- Seite 686 und 687: NOP—No Operation オペコード
- Seite 688 und 689: NOT—One's Complement Negation (
- Seite 690 und 691: OR—Logical Inclusive OR ( 続き
- Seite 692 und 693: OUT—Output to Port ( 続き ) 操
- Seite 694 und 695: OUTS/OUTSB/OUTSW/OUTSD—Output Str
- Seite 696 und 697: OUTS/OUTSB/OUTSW/OUTSD—Output Str
- Seite 698 und 699: POP—Pop a Value from the Stack
- Seite 700 und 701: POP—Pop a Value from the Stack (
- Seite 702 und 703: POP—Pop a Value from the Stack (
- Seite 704 und 705: POPA/POPAD—Pop All General-Purpos
- Seite 706 und 707: POPF/POPFD—Pop Stack into EFLAGS
- Seite 708 und 709: PUSH—Push Word or Doubleword onto
- Seite 710 und 711: PUSH—Push Word or Doubleword onto
- Seite 712 und 713: PUSHA/PUSHAD—Push All General-Pur
- Seite 714 und 715: PUSHF/PUSHFD—Push EFLAGS Register
- Seite 716 und 717: RCL/RCR/ROL/ROR-—Rotate ( 続き
- Seite 718 und 719: RCL/RCR/ROL/ROR-—Rotate ( 続き
- Seite 720 und 721: RDMSR—Read from Model Specific Re
- Seite 722 und 723: RDPMC—Read Performance-Monitoring
- Seite 724 und 725: RDTSC—Read Time-Stamp Counter (
- Seite 726 und 727: REP/REPE/REPZ/REPNE /REPNZ—Repeat
- Seite 728 und 729: RET—Return from Procedure オペ
- Seite 732 und 733: RET—Return from Procedure ( 続
- Seite 734 und 735: ROL/ROR—Rotate 「RCL/RCR/ROL/ROR
- Seite 736 und 737: SAHF—Store AH into Flags オペ
- Seite 738 und 739: SAL/SAR/SHL/SHR—Shift ( 続き )
- Seite 740 und 741: SAL/SAR/SHL/SHR—Shift ( 続き )
- Seite 742 und 743: SBB—Integer Subtraction with Borr
- Seite 744 und 745: SCAS/SCASB/SCASW/SCASD—Scan Strin
- Seite 746 und 747: SETcc—Set Byte on Condition オ
- Seite 748 und 749: SETcc—Set Byte on Condition ( 続
- Seite 750 und 751: SGDT/SIDT—Store Global/Interrupt
- Seite 752 und 753: SHLD—Double Precision Shift Left
- Seite 754 und 755: SHLD—Double Precision Shift Left
- Seite 756 und 757: SHRD—Double Precision Shift Right
- Seite 758 und 759: SIDT—Store Interrupt Descriptor T
- Seite 760 und 761: SLDT—Store Local Descriptor Table
- Seite 762 und 763: SMSW—Store Machine Status Word (
- Seite 764 und 765: STD—Set Direction Flag オペコ
- Seite 766 und 767: STI—Set Interrupt Flag ( 続き )
- Seite 768 und 769: STOS/STOSB/STOSW/STOSD—Store Stri
- Seite 770 und 771: STOS/STOSB/STOSW/STOSD—Store Stri
- Seite 772 und 773: STR—Store Task Register ( 続き
- Seite 774 und 775: SUB—Subtract ( 続き ) 保護モ
- Seite 776 und 777: TEST—Logical Compare ( 続き )
- Seite 778 und 779: VERR, VERW—Verify a Segment for R
RET—Return from Procedure ( 続き )<br />
THEN<br />
IF second doubleword on stack is not within stack limits THEN #SS(0); FI;<br />
ELSE (* OperandSize = 16 *)<br />
IF second word on stack is not within stack limits THEN #SS(0); FI;<br />
FI;<br />
IF return code segment selector is null THEN GP(0); FI;<br />
IF return code segment selector addrsses descriptor beyond diescriptor table limit<br />
THEN GP(selector; FI;<br />
Obtain descriptor to which return code segment selector points from descriptor table<br />
IF return code segment descriptor is not a code segment THEN #GP(selector); FI;<br />
if return code segment selector RPL < CPL THEN #GP(selector); FI;<br />
IF return code segment descriptor is condorming<br />
AND return code segment DPL > return code segment selector RPL<br />
THEN #GP(selector); FI;<br />
IF return code segment descriptor is not present THEN #NP(selector); FI:<br />
IF return code segment selector RPL > CPL<br />
THEN GOTO RETURN-OUTER-PRIVILEGE-LEVEL;<br />
ELSE GOTO RETURN-TO-SAME-PRIVILEGE-LEVEL<br />
FI;<br />
END;FI;<br />
RETURN-SAME-PRIVILEGE-LEVEL:<br />
IF the return instruction pointer is not within ther return code segment limit<br />
THEN #GP(0);<br />
FI;<br />
IF OperandSize=32<br />
THEN<br />
EIP ← Pop();<br />
CS ← Pop(); (* 32-bit pop, high-order 16-bits discarded *)<br />
ESP ← ESP + SRC;<br />
ELSE (* OperandSize=16 *)<br />
EIP ← Pop();<br />
EIP ← EIP AND 0000FFFFH;<br />
CS ← Pop(); (* 16-bit pop *)<br />
ESP ← ESP + SRC;<br />
FI;<br />
IF Itanium System Environment AND PSR.tb THEN IA-32_Exception(Debug);<br />
RETURN-OUTER-PRIVILEGE-LEVEL:<br />
IF top (16 + SRC) bytes of stack are not within stack limits (OperandSize=32)<br />
OR top (8 + SRC) bytes of stack are not within stack limits (OperandSize=16)<br />
THEN #SS(0); FI;<br />
FI;<br />
Read return segment selector;<br />
IF stack segment selector is null THEN #GP(0); FI;<br />
IF return stack segment selector index is not within its descriptor table limits<br />
THEN #GP(selector); FI;<br />
Read segment descriptor pointed to by return segment selector;<br />
IF stack segment selector RPL ≠ RPL of the return code segment selector<br />
OR stack segment is not a writable data segment<br />
OR stack segment descriptor DPL ≠ RPL of the return code segment selector<br />
THEN #GP(selector); FI;<br />
3:718 第 3 巻 : IA-32 基本命令リファレンス