Data Speculation Recovery Using Chk - Intel ITANIUM ARCHITECTURE - SOFTWARE DEVELOPERS MANUAL VOLUME 1 REV 2.3 Manual

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

Advertisement

speculation check (chk.s) in that, if the speculation was successful, execution
continues inline and no recovery is necessary; if speculation was unsuccessful,
the chk.a branches to compiler-generated recovery code. The recovery code
contains instructions that will re-execute all the work that was dependent on the
failed data speculative load up to the point of the check instruction. As with the
check load, the success of a data speculation using an advanced load check is
determined by searching the ALAT for a matching entry. This transformation is
shown in
Figure 4-3.
// Other instructions
st8
ld8
add
st8
Recovery code may use either a normal or advanced load to obtain the correct value for
the failed advanced load. An advanced load is used only when it is advantageous to
have an ALAT entry reallocated after a failed speculation. The last instruction in the
recovery code should branch to the instruction following the chk.a.
4.4.5.3
Detailed Functionality of the ALAT and Related Instructions
The ALAT is the structure that holds the state necessary for advanced loads and checks
to operate correctly. The ALAT is searched in two different ways: by physical addresses
and by ALAT register tags. An ALAT register tag is a unique number derived from the
physical target register number and type in conjunction with other
implementation-specific state. Implementation-specific state might include register
stack wraparound information to distinguish one instance of a physical register that
may have been spilled by the RSE from the current instance of that register, thus
avoiding the need to purge the ALAT on all register stack wraparounds.
IA-32 instruction set execution leaves the contents of the ALAT undefined. Software can
not rely on ALAT values being preserved across an instruction set transition. On entry to
IA-32 instruction set, existing entries in the ALAT are ignored.
4.4.5.3.1
Advanced loads perform the following actions:
1. The ALAT register tag for the advanced load is computed. (For ldfp.a, a tag is
computed only for the first target register.)
2. If an entry with a matching ALAT register tag exists, it is removed.
Volume 1, Part 1: Application Programming Model
Figure
4-3.
Data Speculation Recovery Using chk.a
Before Data Speculation
[r4] = r12
r6 = [r8];;
r5 = r6, r7;;
[r18] = r5
Allocating and Checking ALAT Entries
After Data Speculation
ld8.a
r6 = [r8];;
// Other instructions
add
r5 = r6, r7;;
// Other instructions
st8
[r4] = r12
chk.a.clr
r6, recover
back:
st8
[r18] = r5
// Somewhere else in program
recover:
ld8
r6 = [r8];;
add
r5 = r6, r7
br
back
1:65

Advertisement

Table of Contents
loading

This manual is also suitable for:

Itanium architecture 2.3

Table of Contents