14.06.2015 Views

Power ISA™ Version 2.03 - Power.org

Power ISA™ Version 2.03 - Power.org

Power ISA™ Version 2.03 - Power.org

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>Version</strong> <strong>2.03</strong><br />

For an X-form Load or Store, it is acceptable for the<br />

processor to set the DSISR to the same value that<br />

would have resulted if the corresponding D- or DS-form<br />

instruction had caused the interrupt. Similarly, for a D-<br />

or DS-form Load or Store, it is acceptable for the processor<br />

to set the DSISR to the value that would have<br />

resulted for the corresponding X-form instruction. For<br />

example, an unaligned lwax (that crosses a protection<br />

boundary) would normally, following the description<br />

above, cause the DSISR to be set to binary:<br />

000000000000 00 0 01 0 0101 ttttt ?????<br />

where “ttttt” denotes the RT field, and “?????” denotes<br />

an undefined 5-bit value. However, it is acceptable if it<br />

causes the DSISR to be set as for lwa, which is<br />

000000000000 10 0 00 0 1101 ttttt ?????<br />

If there is no corresponding alternative form instruction<br />

(e.g., for lwaux), the value described above is set in<br />

the DSISR.<br />

The instruction pairs that may use the same DSISR<br />

value are.<br />

lhz/lhzx lhzu/lhzux lha/lhax lhau/lhaux<br />

lwz/lwzx lwzu/lwzux lwa/lwax<br />

ld/ldx ldu/ldux<br />

lsth/sthx sthu/sthux stw/stwx stwu/stwux<br />

std/stdx stdu/stdux<br />

lfs/lfsx lfsu/lfsux lfd/lfdx lfdu/lfdux<br />

stfs/stfsx stfsu/stfsux stfd/stfdx stfdu/stfdux<br />

Execution resumes at effective address<br />

0x0000_0000_0000_0600.<br />

Programming Note<br />

The architecture does not support the use of an<br />

unaligned effective address by lwarx, ldarx,<br />

stwcx., stdcx., eciwx, and ecowx. If an Alignment<br />

interrupt occurs because one of these instructions<br />

specifies an unaligned effective address, the<br />

Alignment interrupt handler must not attempt to<br />

simulate the instruction, but instead should treat<br />

the instruction as a programming error.<br />

6.5.9 Program Interrupt<br />

A Program interrupt occurs when no higher priority<br />

exception exists and one of the following exceptions<br />

arises during execution of an instruction:<br />

Floating-Point Enabled Exception<br />

A Floating-Point Enabled Exception type Program<br />

interrupt is generated when the value of the<br />

expression<br />

(MSR FE0 | MSR FE1 ) & FPSCR FEX<br />

is 1. FPSCR FEX is set to 1 by the execution of a<br />

floating-point instruction that causes an enabled<br />

exception, including the case of a Move To FPSCR<br />

instruction that causes an exception bit and the<br />

corresponding enable bit both to be 1.<br />

Illegal Instruction<br />

An Illegal Instruction type Program interrupt is generated<br />

when execution is attempted of an illegal<br />

instruction, or of a reserved instruction or an<br />

instruction that is not provided by the implementation.<br />

An Illegal Instruction type Program interrupt may<br />

be generated when execution is attempted of any<br />

of the following kinds of instruction.<br />

an instruction that is in invalid form<br />

an lswx instruction for which RA or RB is in<br />

the range of registers to be loaded<br />

an mtspr or mfspr instruction with an SPR<br />

field that does not contain one of the defined<br />

values<br />

Privileged Instruction<br />

The following applies if the instruction is executed<br />

when MSR PR = 1.<br />

A Privileged Instruction type Program interrupt<br />

is generated when execution is attempted of a<br />

privileged instruction, or of an mtspr or mfspr<br />

instruction with an SPR field that contains one<br />

of the defined values having spr 0 =1. It may be<br />

generated when execution is attempted of an<br />

mtspr or mfspr instruction with an SPR field<br />

that does not contain one of the defined values<br />

but has spr 0 =1.<br />

The following applies if the instruction is executed<br />

when MSR HV PR = 0b00.<br />

A Privileged Instruction type Program interrupt<br />

may be generated when execution is<br />

attempted of an mtspr instruction with an<br />

SPR field that designates a hypervisor<br />

resource, or when execution of a tlbie, tlbiel,<br />

tlbia, or tlbsync instruction is attempted.<br />

450<br />

<strong>Power</strong> ISA -- Book III-S

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!