3.2.1. Registers
The 64-bit PowerPC Architecture provides 32 general purpose registers,
each 64 bits wide. In addition, the architecture provides 32
floating-point registers, each 64 bits wide, and several special
purpose registers. All of the integer, special purpose, and
floating-point registers are global to all functions in a running
program. The following table shows how the registers are used.
r0 Volatile register used in function prologs
r1 Stack frame pointer
r2 TOC pointer
r3 Volatile parameter and return value register
r4-r10 Volatile registers used for function parameters
r11 Volatile register used in calls by pointer and as an
environment pointer for languages which require one
r12 Volatile register used for exception handling and glink code
r13 Reserved for use as system thread ID
r14-r31 Nonvolatile registers used for local variables
f0 Volatile scratch register
f1-f4 Volatile floating point parameter and return value registers
f5-f13 Volatile floating point parameter registers
f14-f31 Nonvolatile registers
LR Link register (volatile)
CTR Loop counter register (volatile)
XER Fixed point exception register (volatile)
FPSCR Floating point status and control register (volatile)
CR0-CR1 Volatile condition code register fields
CR2-CR4 Nonvolatile condition code register fields
CR5-CR7 Volatile condition code register fields
On processors with the VMX feature.
v0-v1 Volatile scratch registers
v2-v13 Volatile vector parameters registers
v14-v19 Volatile scratch registers
v20-v31 Non-volatile registers
vrsave Non-volatile 32-bit register
Embedded/PowerPC
- PowerPC EABI Registers 2011.04.28
- PowerPC Assembly Mnemonics "mtsprg" 2011.04.18
- PowerPC Instruction Set 2011.04.04
- MPC8280 Port Registers 2011.01.04
- MPC8280 2011.01.03
PowerPC EABI Registers
PowerPC Assembly Mnemonics "mtsprg"
mtsprg 0, rs
mtspr 272, rs
yes
SPRG0
mtsprg 1, rs
mtspr 273, rs
yes
SPRG1
mtsprg 2, rs
mtspr 274, rs
yes
SPRG2
mtsprg 3, rs
mtspr 275, rs
yes
SPRG3
PowerPC Instruction Set
Below, the instruction set for the PowerPC architecture is given. A lot of instructions were intentionally left out:
- Instructions for 64-bit Implementations Only
- Floating Point Instructions
- Supervisor-Level Instructions
- I/O-specific Instructions
- Instructions for Multiprocessor Support
- Trap / System Call Instructions
This leaves 107 instructions: the core PowerPC Instruction Set.
When following the links below, you will be taken to a page describing a (family of) instructions. Note that these descriptions are taken from the 64-bit version of the instruction set; bit numbering are different for some instructions on 32-bit implementations. The lab course software uses a 32-bit PowerPC emulator.
The mnemonics column shows all valid forms of an instruction; it also shows simplified mnemonics in italics.
Instruction | Mnemonics | Description |
---|---|---|
add | add / add. / addo / addo. | Add |
addc | addc / addc. / addco /addco. | Add Carrying |
adde | adde / adde. / addeo /addeo. | Add Extended |
addi | addi / li / la / subi | Add Immediate |
addic | addic / subic | Add Immediate Carrying |
addic. | addic. / subic. | Add Immediate Carrying and Record |
addis | addis / lis / subis | Add Immediate Shifted |
addme | addme / addme. / addmeo / addmeo. | Add to Minus One Extended |
addze | addze / addze. / addzeo / addzeo. | Add to Zero Extended |
and | and / and. | AND |
andc | andc / andc. | AND with Complement |
andi. | andi. | AND Immediate |
andis. | andis. | AND Immediate Shifted |
b | b / ba / bl / bla | Branch |
bc | bc /bca / bcl bcla | Branch Conditional |
bcctr | bcctr / bcctrl | Branch Conditional to Count Register |
bclr | bclr / bclrl | Branch Conditional to Link Register |
cmp | cmp / cmpw | Compare |
cmpi | cmpi / cmpwi | Compare Immediate |
cmpl | cmpl / cmplw | Compare Logical |
cmpli | cmpli / cmplwi | Compare Logical Immediate |
cntlzw | cntlzw / cntlzw. | Count Leading Zeros Word |
crand | crand | Condition Register AND |
crandc | crandc | Condition Register AND with Complement |
creqv | creqv / crset | Condition Register Equivalent |
crnand | crnand | Condition Register NAND |
crnor | crnor / crnot | Condition Register NOR |
cror | cror / crmove | Condition Register OR |
crorc | crorc | Condition Register OR with Complement |
crxor | crxor / crclr | Condition Register XOR |
divw | divw / divw. / divwo / divwo. | Divide Word |
divwu | divwu / divwu. / divwuo / divwuo. | Divide Word Unsigned |
eqv | eqv / eqv. | Equivalent |
extsb | extsb / extsb. | Extend Sign Byte |
extsh | extsh / extsh. | Extend Sign Half Word |
lbz | lbz | Load Byte and Zero |
lbzu | lbzu | Load Byte and Zero with Update |
lbzux | lbzux | Load Byte and Zero with Update Indexed |
lbzx | lbzx | Load Byte and Zero Indexed |
lha | lha | Load Half Word Algebraic |
lhau | lhau | Load Half Word Algebraic with Update |
lhaux | lhaux | Load Half Word Algebraic with Update Indexed |
lhax | lhax | Load Half Word Algebraic Indexed |
lhbrx | lhbrx | Load Half Word Byte-Reverse Indexed |
lhz | lhz | Load Half Word and Zero |
lhzu | lhzu | Load Half Word and Zero with Update |
lhzux | lhzux | Load Half Word and Zero with Update Indexed |
lhzx | lhzx | Load Half Word and Zero Indexed |
lmw | lmw | Load Multiple Word |
lswi | lswi | Load String Word Immediate |
lswx | lswx | Load String Word Indexed |
lwbrx | lwbrx | Load Word Byte-Reversed Indexed |
lwz | lwz | Load Word and Zero |
lwzu | lwzu | Load Word and Zero with Update |
lwzux | lwzux | Load Word and Zero with Update Indexed |
lwzx | lwzx | Load Word and Zero Indexed |
mcrf | mcrf | Move Condition Regisiter Field |
mcrxr | mcrxr | Move to Condition Register from XER |
mfcr | mfcr | Move from Condition Register |
mfspr | mfspr / mfxer / mflr / mfctr | Move from Special-Purpose Register |
mftb | mftb | Move from Time Base |
mtcrf | mtcrf | Move to Condition Register Fields |
mtspr | mtspr / mtxer / mtlr / mtctr | Move to Special-Purpose Register |
mulhw | mulhw / mulhw. | Multiply High Word |
mulhwu | mulhwu / mulhwu. | Multiply High Word Unsigned |
mulli | mulli | Multiply Low Immediate |
mullw | mullw / mullw. / mullwo / mullwo. | Multiply Low Word |
nand | nand / nand. | NAND |
neg | neg / neg. / nego / nego. | Negate |
nor | nor /nor. | NOR |
or | or / or. | OR |
orc | orc / orc. | OR with Complement |
ori | ori | OR Immediate |
oris | oris | OR Immediate Shifted |
rlwimi | rlwimi / rlwimi. / inslwi / insrwi | Rotate Left Word Immediate then Mask Insert |
rlwinm | rlwinm / rlwinm. / extlwi / extrwi rotlwi / rotrwi / slwi / srwi clrlwi / clrrwi / clrlslwi |
Rotate Left Word Immediate then AND with Mask |
rlwnm | rlwnm / rlwnm. / rotlw | Rotate Left Word then AND with Mask |
slw | slw / slw. | Shift Left Word |
sraw | sraw /sraw. | Shift Right Algebraic Word |
srawi | srawi / srawi. | Shift Right Algebraic Word Immediate |
srw | srw / srw. | Shift Right Word |
stb | stb | Store Byte |
stbu | stbu | Store Byte with Update |
stbux | stbux | Store Byte with Update Indexed |
stbx | stbx | Store Byte Indexed |
sth | sth | Store Half Word |
sthbrx | sthbrx | Store Half Word Byte-Reverse Indexed |
sthu | sthu | Store Half Word with Update |
sthux | sthux | Store Half Word with Update Indexed |
sthx | sthx | Store Half Word Indexed |
stmw | stmw | Store Multiple Word |
stswi | stswi | Store String Word Immediate |
stswx | stswx | Store String Word Indexed |
stw | stw | Store Word |
stwbrx | stwbrx | Store Word Byte-Reverse Indexed |
stwu | stwu | Store Word with Update |
stwux | stwux | Store Word with Update Indexed |
stwx | stwx | Store Word Indexed |
subf | subf / subf. / subfo / subfo. / sub | Subtract From |
subfc | subfc / subfc. / subfco / subfco. / subc | Subtract from Carrying |
subfe | subfe / subfe. / subfeo. / subfeo. | Subtrect from Extended |
subfic | subfic | Subtract from Immediate Carrying |
subfme | subfme / subfme. / subfmeo / subfmeo. | Subtract from Minus One Extended |
subfze | subfze / subfze. / subfzeo / subfzeo. | Subtract from Zero Extended |
xor | xor / xor. | XOR |
xori | xori | XOR Immediate |
xoris | xoris | XOR Immediate Shifted |
출 처 : http://pds.twi.tudelft.nl/vakken/in1200/labcourse/instruction-set/
MPC8280 Port Registers
Port Registers
1. Port Open-Drain Registers
: The port open-drain register(PODR), indicates a normal or wired-OR configuration of the port pins.
: Determines whethehr the corresponding pin is actively driven as an output or is an open-drain driver.
'0' -> The I/O pin is actively driven as an output.
'1' -> The I/O pin is an open-drain driver. As an output, the pin is driven active-low, otherwise it is three-stated.
2. Port Data Register (PDATx)
3. Port Data Direction Register (PDIRx)
: Direction. Indicates whether a pin is used as an input or an output.
'0' -> The corresponding pin is an input or is bidirectional
'1' -> The corresponding pin is an output.
4. Port Pin Assignment Register (PPAR)
: Dedicated enable. Indicates whether a pin is a general-purpose I/O or a dedicated peripheral pin.
'0' -> General-purpose I/O. The peripheral functions of the pin are not used.
'1' -> Dedicated peripheral function.
5. Port Special Options Register (PSORx)
: Special-option. Determines whether a pin configured for a dedicated function uses option 1 or option 2.
'0' -> Dedicated peripheral function. Option 1
'1' -> Dedicated peripheral function. Option 2
MPC8280
MPC8280 칩의 Intenal Memory Resources는 연속적인 메모리 블럭에 맵핑되어 진다. 그 크기는 256 Kbytes이다. 이 블럭의 위치는 전역 4-Gbyte 물리 메모리 공간에 256 Kbytes 해상도로 매핑되어 지는데, IMMR(Interal Memory Map Register) 레지스터에 명시된 곳에 위치한다. 즉 Base Address를 IMMR 레지스터를 이용하여 직접 지정할 수 있다.