Intel ITANIUM ARCHITECTURE - SOFTWARE DEVELOPERS MANUAL VOLUME 1 REV 2.3 Manual page 846

Hide thumbs Also See for ITANIUM ARCHITECTURE - SOFTWARE DEVELOPERS MANUAL VOLUME 1 REV 2.3:
Table of Contents

Advertisement

4. Make sure JMPE knows where to return to, e.g. deposit return address for the
JMPE on memory stack or pass it in an IA-32 visible register.
5. Setup IA-32 branch target in branch register.
6. Flush register stack, but no other RSE updates.
7. br.ia is an indirect branch to IA-32 code. There is no need to preserve Itanium
only application registers, since IA-32 code execution leaves them unmodified.
8. Run in the IA-32 callee until it executes a JMPE instruction.
9. JMPE instruction is an unconditional jump to Itanium architecture-based code.
JMPE should use the return address specified in step 4.
10. Move return values from memory stack to static Itanium register used for
procedure return value according to Itanium calling conventions.
11. Ensure that IA-32 code correctly unwound memory stack, and that memory stack
pointer is correctly aligned.
12. Update exception handle unwind data structures according to OS convention.
13. br.ret returns to Itanium architecture-based caller.
9.1.4.2
IA-32 Caller to Itanium
This section outlines what steps an IA-32 caller of an Itanium architecture-based
procedure needs to perform. The ordering of the steps is approximate and need not be
executed exactly in the order presented.
1. Caller deposits arguments on memory stack, and calls Itanium
architecture-based transition stub using the JMPE instruction.
2. Execute JMPE instruction as an unconditional branch to Itanium
architecture-based code. The JMPE instruction will leave the address of the IA-32
instruction following the JMPE itself in Itanium register GR1. This address may be
used as a return address later.
3. Allocate a register stack frame with the alloc instruction.
4. Load procedure arguments from memory stack into Itanium stacked registers.
Preserve IA-32 return address in memory or register stack.
5. Set up exception handle unwind data structures according to OS convention.
6. br.call to target Itanium architecture-based callee.
7. Execute Itanium architecture-based code until it returns using br.ret.
8. Move return value from static Itanium register to memory stack.
9. Load IA-32 return address from step 4 into branch register.
10. Instead of flushing the register stack to memory, the contents of the register
stack can be discarded at this point since IA-32 code execution will overwrite it
anyway. Invalidate register stack by:
a. Allocating a zero-size stack frame using the alloc instruction.
b. Writing zero into RSC application register, and executing a loadrs instruction.
c.
2:598
®
Architecture-based Callee
Restore RSC application register to its original value in preparation for the
next call from IA-32 to Itanium instruction set.
Volume 2, Part 2: IA-32 Application Support

Advertisement

Table of Contents
loading

This manual is also suitable for:

Itanium architecture 2.3

Table of Contents