PowerPC instruction signal type
This signal correspond to the PowerPC instruction. Such a signal is a good candidate for connecting modules implementing a PowerPC pipeline. This signal is declared as the Instruction class defined in the ppc_instruction.h file of the repository.
As explained in the previous chapter, the fields composing the instruction presented below are filled as the instruction goes along the pipeline.
Signal parameters
As the signal is tied to the instruction defined in the PowerPC ISA, the PowerPC instruction signal is not parametrized.
Signal components
bool predecoded
Becomes true once the instruction is predecoded.bool decoded
Becomes true once the instruction is decoded.ppc_operation_t *operation
The emulator data type corresponding to the instruction.ppc_code_t binary
The binary image of the instruction. (unsigned word corresponding to the instruction)address_t cia
The program counter of the instruction (current instruction address).address_t predicted_nia
The predicted next instruction address, as guessed at fetch.address_t nia
The next instruction address, as known at commit.branch_direction_t predicted_branch_direction
The predicted branch direction (taken, not taken).branch_direction_t branch_direction
The effective branch direction, as known at commit.function_t function
The function category of the instruction, as defined in the PowerPC emulator library.int64_t inum
A Unique id number for the instruction (convenient for ordering instructions).int tag
Tag used by reorder buffers to reorder instructions.uint32_t ea
The effective address of a load/store instruction.int ls_reg_count
The load/store counter for multiple load and multiple store instructions.int ls_byte_count
The number of byte to load/store for load string and store string instructions.int load_reg
The load register for used by multiple and string load / stores.bool emul_executed
Whether the instruction has been executed through the emulator.bool verified
Set to true once the instruction has been verified against the emulator.ppc_cpu_t *cpu
A pointer to the emulator cpu to which the instruction belongs.
Internal types
Function type
This type specify the function performed by the instruction.They are presented below by category of instruction. Check the PowerPC emulator library for more details.
- Integer instructions:
FnIntBasic,FnIntBasicSerial,FnIntExtended. - Floating point instructions:
FnFpCommon,FnFpFPSCR,FnFpFPSCRSerial. - Branch instructions:
FnBranch,FnConditionalBranch,FnBranchCountReg,FnBranchLinkReg,FnCondRegister. - Load instructions:
FnLoadInstruction,FnLoad,FnLoadByteReversed,FnLoadFloat,FnLoadMultiple,FnLoadString,FnLoadStringImm,FnLoadSerial. - Store instructions:
FnStore,FnStoreByteReversed,FnStoreFloat,FnStoreMultiple,FnStoreString,FnStoreStringImm,FnStoreSerial,FnDataCacheBA,FnDataCacheBF,FnDataCacheBI. - Special instructions:
FnInvalid,FnNop,FnCache,FnCacheSerial,FnSysRegister,FnSysRegisterSerial,FnSysCall,FnMac.
Branch direction type
This data type is used to specify if a branch should be taken or not. Possible values are { Taken, NotTaken, DontKnow }.