twi
Trap Word Immediate
Preliminary
PPC440x5 CPU Core User’s Manual
instrset.fm.
September 12, 2002
Page 443 of 589
twi
Trap Word Immediate
if (
((RA)
EXTS(IM)
∧
TO
0
= 1)
∨
((RA)
EXTS(IM)
∧
TO
1
= 1)
∨
((RA)
EXTS(IM)
∧
TO
2
= 1)
∨
((RA)
EXTS(IM)
∧
TO
3
= 1)
∨
((RA)
EXTS(IM)
∧
TO
4
= 1)
)
SRR0
←
address of twi instruction
SRR1
←
MSR
ESR[PTR]
←
1 (other bits cleared)
MSR[WE, EE, PR, FP, FE0, FE1, DWE, DS, IS])
←
9
0
PC
←
IVPR
0:15
|| IVOR6
16:27
||
4
0
else no operation
Register RA is compared with the sign-extended IM field. If any comparison condition selected by the TO field
is true, a Trap exception type Program interrupt occurs as follows (see Program Interrupt on page 187 for
more information on Program interrupts). The contents of the MSR are copied into SRR1 and the address of
the
twi instruction) is placed into SRR0. ESR[PTR] is set to 1 and the other bits ESR bits cleared to indicate
the type of exception causing the Program interrupt.
The program counter (PC) is then loaded with the interrupt vector address. The interrupt vector address is
formed by concatenating the high halfword of the Interrupt Vector Prefix Register (IVPR), bits 16:27 of the
Interrupt Vector Offset Register 6 (IVOR6), and 0b0000.
MSR[WE, EE, PR, FP, FE0, FE1, DWE, DS, IS] are set to 0.
Program execution continues at the new address in the PC.
If instruction bit 31 contains 1, the contents of CR[CR0] are undefined.
Registers Altered
• SRR0 (if trap condition is met)
• SRR1 (if trap condition is met)
• MSR[WE, EE, PR, FP, FE0, FE1, DWE, DS, IS] (if trap condition is met)
• ESR (if trap condition is met)
Invalid Instruction Forms
• Reserved fields
Programming Notes
This instruction can be inserted into the execution stream by a debugger to implement breakpoints, and is not
typically used by application code.
twi
TO, RA, IM
3
TO
RA
IM
0
6
11
16
31
<
>
=
<
u
>
u
Содержание PPC440X5 CPU Core
Страница 1: ...PPC440x5 CPU Core User s Manual Preliminary SA14 2613 02 September 12 2002 Title Page...
Страница 22: ...User s Manual PPC440x5 CPU Core Preliminary Page 22 of 583 ppc440x5LOT fm September 12 2002...
Страница 26: ...User s Manual PPC440x5 CPU Core Preliminary Page 26 of 589 preface fm September 12 2002...
Страница 38: ...User s Manual PPC440x5 CPU Core Preliminary Page 38 of 589 overview fm September 12 2002...
Страница 94: ...User s Manual PPC440x5 CPU Core Preliminary Page 94 of 589 init fm September 12 2002...
Страница 132: ...User s Manual PPC440x5 CPU Core Preliminary Page 132 of 589 cache fm September 12 2002...
Страница 158: ...User s Manual PPC440x5 CPU Core Preliminary Page 158 of 589 mmu fm September 12 2002...
Страница 218: ...User s Manual PPC440x5 CPU Core Preliminary Page 218 of 589 timers fm September 12 2002...
Страница 248: ...User s Manual PPC440x5 CPU Core Preliminary Page 248 of 589 debug fm September 12 2002...
Страница 458: ...User s Manual PPC440x5 CPU Core Preliminary Page 458 of 589 regsummIntro fm September 12 2002...
Страница 568: ...User s Manual PPC440x5 CPU Core Preliminary Page 568 of 589 instalfa fm September 12 2002...
Страница 588: ...User s Manual PPC440x5 CPU Core Preliminary Page 588 of 583 ppc440x5IX fm September 12 2002...
Страница 590: ......