|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.cmpware.cmp.Memory
com.cmpware.cmp.Processor
com.cmpware.tools.AutoModel
com.cmpware.cmp.models.PowerPC64
public class PowerPC64
This is an AutoModel implementation of the PowerPC 64 bit processor istructions. It implements all of the standard PowerPC Instruction Set Architecture. In particular, no extensions such as floating point, embedded or the non-portable extensions are implemented in this version, although they can be added fairly easily to this model. The large number of special registers and the unusual addressing are perhaps the biggest complication in the PowerPC model. Only the registers actually used in the implemented instructions are implemented, all others are ignored. This information is taken from the IBM document "PPC405Fx Embedded Processor Core: User's Manual (Preliminary)", IBM Document Number SA14-2764-00, January 28, 2005. PowerPC 64-bit instructions added using the document: "Power ISA" version 2.04, April 3, 2007. Implementation notes: The document specifies Big Endian, but uses bit 0 as the MSB. Field numbers in this model will be (31-n) compared to the IBM document. BCA and BCL decodes swapped. Fixed 4/23/2008 Added missing MULHWU instruction 4/23/2008 AND instruction decoding incorrectly. Fixed 4/23/2008 AND, ANDC, ANDI and ANDIS implemented incorrectly. Fixed 4/24/2008. Added proper disassembly for ANDI, ANDIS, ORI, ORIS, XORI, XORIC. Fixed 4/24/2008. Added proper disassembly for AND, ANDC, NAND, NOR, OR, ORC, XOR. Fixed 4/24/2008.
Copyright (c) 2006 Cmpware, Inc. All Rights Reserved.
| Nested Class Summary | |
|---|---|
static class |
PowerPC64.CR0
This class defines the fields in the CR Special Register |
static class |
PowerPC64.MSR
This class defines the fields in the MSR Special Register |
static class |
PowerPC64.SR
This class defines the Special Register indicies |
static class |
PowerPC64.XER
This class defines the fields in the XER Special Register |
| Nested classes/interfaces inherited from class com.cmpware.tools.AutoModel |
|---|
AutoModel.Asm, AutoModel.Decode, AutoModel.Field, AutoModel.Format, AutoModel.Function, AutoModel.Instruction, AutoModel.Symbol |
| Field Summary | |
|---|---|
static java.lang.String |
copyright
Copyright string |
static PowerPC_fp |
fp
The floating point instructions |
long[] |
r64
The 64-bit register file (shadow) |
static java.lang.String[] |
reg64Names
The IDE names for the 32-bit half registers (two per register) |
static AutoModel.Symbol[] |
regSymbols
The General Purpose Register Symbols |
(package private) boolean |
reserve
The reserve semaphore for lwarx / stwcx / ldarx / stdcx. |
(package private) long |
reserveAddr
The reserve address for ldarx / stdcx. |
long[] |
sr64
The 64-bit special register file (shadow) |
static AutoModel.Symbol[] |
sregSymbols
The Special Purpose Register Symbols |
| Fields inherited from class com.cmpware.tools.AutoModel |
|---|
currentInstr, currentInstrType, instructionSizes, TRACE |
| Fields inherited from class com.cmpware.cmp.Processor |
|---|
bkpt, branchAddr, branchDelay, breakpointHit, currentBranchDelay, currentInstrCode, cycleCount, elf, idlePower, iMix, instructionSize, name, noop, opcodeName, pc, prevInstr, prevInstrCode, r, regName, runningPower, sr, sregName, stall, stallCount |
| Fields inherited from class com.cmpware.cmp.Memory |
|---|
BIG, LITTLE |
| Constructor Summary | |
|---|---|
PowerPC64()
The constructor |
|
| Method Summary | |
|---|---|
static long |
addCarry(long result,
long src1,
long src2)
This method is used to determine if an add carry has occurred. |
static long |
addOverflow(long result,
long src1,
long src2)
This method is used to determine if an add overflow has occurred. |
int[] |
getDebugRegisters()
This method returns the current values of all of the general purpose registers as they are used by a debugger. |
int |
getRegister(int i)
This method returns a general purpose register. |
int[] |
getRegisters()
This method returns the current values of all of the general purpose registers. |
static void |
main(java.lang.String[] args)
This enables the stand-alone assembler and disassembler. |
void |
postLoad()
This method it used to perform any operations that may be required after a file is loaded. |
void |
preExecute(int instr)
This method is called immediately before execution and may be overloaded to do things like save instruction field values to locals. |
void |
reset()
This method resets the processor. |
static long |
rotateLeft(int a,
int r)
This method rotates the value a left by r. |
static long |
rotateLeft(long a,
int r)
This method rotates the value a left by r. |
static long |
sign(long a)
This method returns the sign bit for 64 bit value. |
static long |
subCarry(long result,
long src1,
long src2)
This method is used to determine if a sub carry has occurred. |
static long |
subOverflow(long result,
long src1,
long src2)
This method is used to determine if a sub overflow has occurred. |
| Methods inherited from class com.cmpware.tools.AutoModel |
|---|
advancePC, asmFixup, bitsToBytes, concatenate, dasm, dasm, dasmFixup, decode, defineInstructions, execute, fetch, fetch, getInstruction, getInstructions, getInstructionSizes, getPC, getSymbolNames, instrMatch, main, postExecute, setPC, signExtend, signExtend, toHexString, toHexString, toLong, traceOff, traceOn |
| Methods inherited from class com.cmpware.cmp.Memory |
|---|
addInput, addMemory, addOutput, getEndian, getLocalMemory, getMemoryManager, getMmio, getProfile, hexDump, hexDump, isReadable, isValidAddress, isWriteable, profile, read, read, read16, read24, read32, read64, removeMemory, resize, setEndian, size, toInt, toShort, write, write, write16, write24, write32, write64 |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String copyright
public static final PowerPC_fp fp
public long[] r64
public long[] sr64
boolean reserve
long reserveAddr
public static final java.lang.String[] reg64Names
public static final AutoModel.Symbol[] regSymbols
public static final AutoModel.Symbol[] sregSymbols
| Constructor Detail |
|---|
public PowerPC64()
| Method Detail |
|---|
public static void main(java.lang.String[] args)
args - the command line arguments.public void reset()
reset in class Processorpublic int[] getRegisters()
Processor
getRegisters in class Processorpublic int getRegister(int i)
Processor
getRegister in class Processori - The index of the general purpose register
to get.public int[] getDebugRegisters()
Processor
getDebugRegisters in class Processorpublic void postLoad()
Processor
postLoad in class Processorpublic void preExecute(int instr)
AutoModel
preExecute in class AutoModelinstr - The instruction
public static long addOverflow(long result,
long src1,
long src2)
result - The result of the operation on
the src1 and src2 parameters.src1 - The first source operand.src2 - The second source operand.
public static long subOverflow(long result,
long src1,
long src2)
result - The result of the operation on
the src1 and src2 parameters.src1 - The first source operand.src2 - The second source operand.
public static long addCarry(long result,
long src1,
long src2)
result - The result of the operation on
the src1 and src2 parameters.src1 - The first source operand.src2 - The second source operand.
public static long subCarry(long result,
long src1,
long src2)
result - The result of the operation on
the src1 and src2 parameters.src1 - The first source operand.src2 - The second source operand.
public static long sign(long a)
a - The 64 bit value.
public static long rotateLeft(int a,
int r)
a - the value to be rotated left.r - The number of bits to left rotate.
public static long rotateLeft(long a,
int r)
a - the value to be rotated left.r - The number of bits to left rotate.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||