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 />

1.5 Computation modes<br />

1.5.1 Modes [Category: Server]<br />

Processors provide two execution modes, 64-bit mode<br />

and 32-bit mode. In both of these modes, instructions<br />

that set a 64-bit register affect all 64 bits. The computational<br />

mode controls how the effective address is interpreted,<br />

how status bits are set, how the Link Register is<br />

set by Branch instructions in which LK=1, and how the<br />

Count Register is tested by Branch Conditional instructions.<br />

Nearly all instructions are available in both<br />

modes (the only exceptions are a few instructions that<br />

are defined in Book III-S). In both modes, effective<br />

address computations use all 64 bits of the relevant<br />

registers (General Purpose Registers, Link Register,<br />

Count Register, etc.) and produce a 64-bit result. However,<br />

in 32-bit mode the high-order 32 bits of the computed<br />

effective address are ignored for the purpose of<br />

addressing storage; see Section 1.10.3 for additional<br />

details.<br />

1.5.2 Modes [Category: Embedded]<br />

Processors may provide 32-bit mode, or both 64-bit<br />

mode and 32-bit mode. The modes differ in the following<br />

ways.<br />

<br />

In 64-bit mode, the processor behaves as<br />

described for 64-bit mode in the Server environment;<br />

see Section 1.5.1.<br />

In 32-bit mode, instructions other than SP,<br />

SP.Embedded Float Scalar Double, and<br />

SP.Embedded Float Vector use only the lower 32<br />

bits of a GPR and produce a 32-bit result. Results<br />

written to the GPRs write only the lower 32-bits<br />

and the upper 32 bits are undefined except for<br />

SP.Embedded Float Scalar Single instructions<br />

which leave the upper 32-bits unchanged. SP,<br />

SP.Embedded Float Scalar Double, and<br />

SP.Embedded Float Vector instructions use all 64<br />

bits of a GPR and produce a 64-bit result regardless<br />

of the mode.<br />

Instructions that set condition bits do so based on<br />

the 32-bit result computed. Effective addresses<br />

and all SPRs operate on the lower 32 bits only<br />

unless otherwise stated. The instructions in the<br />

64-Bit category are not necessarily available; if<br />

they are not available, attempting to execute such<br />

an instruction causes the system illegal instruction<br />

error handler to be invoked.<br />

Floating-Point and Vector instructions operate on FPRs<br />

and VPRs, respectively, independent of modes.<br />

1.6 Instruction formats<br />

All instructions are four bytes long and word-aligned<br />

(except for VLE instructions; see Book VLE). Thus,<br />

whenever instruction addresses are presented to the<br />

processor (as in Branch instructions) the low-order two<br />

bits are ignored. Similarly, whenever the processor<br />

develops an instruction address the low-order two bits<br />

are zero.<br />

Bits 0:5 always specify the opcode (OPCD, below).<br />

Many instructions also have an extended opcode (XO,<br />

below). The remaining bits of the instruction contain<br />

one or more fields as shown below for the different<br />

instruction formats.<br />

The format diagrams given below show horizontally all<br />

valid combinations of instruction fields. The diagrams<br />

include instruction fields that are used only by instructions<br />

defined in Book II or in Book III.<br />

Split Field Notation<br />

In some cases an instruction field occupies more than<br />

one contiguous sequence of bits, or occupies one contiguous<br />

sequence of bits that are used in permuted<br />

order. Such a field is called a split field. In the format<br />

diagrams given below and in the individual instruction<br />

layouts, the name of a split field is shown in small letters,<br />

once for each of the contiguous sequences. In the<br />

RTL description of an instruction having a split field,<br />

and in certain other places where individual bits of a<br />

split field are identified, the name of the field in small<br />

letters represents the concatenation of the sequences<br />

from left to right. In all other places, the name of the<br />

field is capitalized and represents the concatenation of<br />

the sequences in some order, which need not be left to<br />

right, as described for each affected instruction.<br />

1.6.1 I-FORM<br />

0 6 30 31<br />

OPCD LI AA LK<br />

Figure 4.<br />

I instruction format<br />

1.6.2 B-FORM<br />

0 6 11 16 30 31<br />

OPCD BO BI BD AA LK<br />

Figure 5.<br />

B instruction format<br />

12<br />

<strong>Power</strong> ISA -- Book I

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

Saved successfully!

Ooh no, something went wrong!