![Intel ITANIUM ARCHITECTURE Скачать руководство пользователя страница 101](http://html.mh-extra.com/html/intel/itanium-architecture/itanium-architecture_manual_2073403101.webp)
4:94
Volume 4: Base IA-32 Instruction Reference
ENTER—Make Stack Frame for Procedure Parameters
Description
Creates a stack frame for a procedure. The first operand (size operand) specifies the
size of the stack frame (that is, the number of bytes of dynamic storage allocated on
the stack for the procedure). The second operand (nesting level operand) gives the
lexical nesting level (0 to 31) of the procedure. The nesting level determines the
number of stack frame pointers that are copied into the “display area” of the new stack
frame from the preceding frame. Both of these operands are immediate values.
The stack-size attribute determines whether the BP (16 bits) or EBP (32 bits) register
specifies the current frame pointer and whether SP (16 bits) or ESP (32 bits) specifies
the stack pointer.
The ENTER and companion LEAVE instructions are provided to support block structured
languages. They do not provide a jump or call to another procedure; they merely set up
a new stack frame for an already called procedure. An ENTER instruction is commonly
followed by a CALL, JMP, or J
cc
instruction to transfer program control to the procedure
being called.
If the nesting level is 0, the processor pushes the frame pointer from the EBP register
onto the stack, copies the current stack pointer from the ESP register into the EBP
register, and loads the ESP register with the current stack-pointer value minus the value
in the size operand. For nesting levels of 1 or greater, the processor pushes additional
frame pointers on the stack before adjusting the stack pointer. These additional frame
pointers provide the called procedure with access points to other nested frames on the
stack.
Operation
NestingLevel
NestingLevel MOD 32
IF StackSize = 32
THEN
Push(EBP) ;
FrameTemp
ESP;
ELSE (* StackSize = 16*)
Push(BP);
FrameTemp
SP;
FI;
IF NestingLevel = 0
THEN GOTO CONTINUE;
FI;
IF (NestingLevel
0)
FOR i
1 TO (NestingLevel
1)
DO
IF OperandSize = 32
THEN
Opcode
Instruction
Description
C8
iw
00
ENTER
imm16
,0
Create a stack frame for a procedure
C8
iw
01
ENTER
imm16
,1
Create a nested stack frame for a procedure
C8
iw
ib
ENTER
imm16,imm8
Create a nested stack frame for a procedure
Содержание ITANIUM ARCHITECTURE
Страница 1: ......
Страница 7: ...402 Intel Itanium Architecture Software Developer s Manual Rev 2 3 ...
Страница 199: ...4 192 Volume 4 Base IA 32 Instruction Reference FWAIT Wait See entry for WAIT ...
Страница 269: ...4 262 Volume 4 Base IA 32 Instruction Reference LES Load Full Pointer See entry for LDS LES LFS LGS LSS ...
Страница 270: ...Volume 4 Base IA 32 Instruction Reference 4 263 LFS Load Full Pointer See entry for LDS LES LFS LGS LSS ...
Страница 273: ...4 266 Volume 4 Base IA 32 Instruction Reference LGS Load Full Pointer See entry for LDS LES LFS LGS LSS ...
Страница 288: ...Volume 4 Base IA 32 Instruction Reference 4 281 LSS Load Full Pointer See entry for LDS LES LFS LGS LSS ...
Страница 352: ...Volume 4 Base IA 32 Instruction Reference 4 345 ROL ROR Rotate See entry for RCL RCR ROL ROR ...
Страница 368: ...Volume 4 Base IA 32 Instruction Reference 4 361 SHL SHR Shift Instructions See entry for SAL SAR SHL SHR ...
Страница 373: ...4 366 Volume 4 Base IA 32 Instruction Reference SIDT Store Interrupt Descriptor Table Register See entry for SGDT SIDT ...
Страница 589: ...4 582 Volume 4 IA 32 SSE Instruction Reference ...
Страница 590: ...Index Intel Itanium Architecture Software Developer s Manual Rev 2 3 Index ...
Страница 591: ...Index Intel Itanium Architecture Software Developer s Manual Rev 2 3 ...
Страница 603: ...INDEX Index 12 Index for Volumes 1 2 3 and 4 ...
Страница 604: ......