#include <CommonMethods.h>
Inheritance diagram for CommonMethods:
Public Member Functions | |
virtual | ~CommonMethods () |
BasicBlock * | findTerminationBlock () |
uint32_t | getNumOfSharedLibFuncs () |
uint32_t | byteCountForSharedLibFuncWrappers () |
void | setAddrOfSharedLibFuncWrapper (uint32_t i, uint64_t addr) |
uint32_t | generateSharedLibFuncWrapper (uint32_t libFuncIdx, uint64_t funcCallAddr, uint32_t genBufferOffset, BaseGen *gen) |
uint64_t | getSharedLibFuncAddrLocation (uint32_t i) |
int32_t | getDataOffsetForInst (uint32_t idx) |
int32_t | getCommentAddressOffset () |
void | verify (uint32_t written) |
int32_t | getGPRSaveOffset (uint32_t reg) |
int32_t | getFPRSaveOffset (uint32_t reg) |
int32_t | getCRSaveOffset () |
int32_t | getFPSCRSaveOffset () |
int32_t | getEXRSaveOffset () |
int32_t | getCTRSaveOffset () |
int32_t | getLNKSaveOffset () |
BasicBlock ** | getInstBlocks () |
void | printInstrumentationPoints () |
void | reserveDataForInstrumentation () |
virtual uint32_t | bytesPerBufferEntry () |
virtual uint32_t | howManyBufferEntry () |
virtual bool | filterBlockForInst (BasicBlock *bb) |
virtual uint32_t | spaceForBlockInfo () |
void | updateTOCRegister (Instruction *insnBuffer, uint32_t *insnIndex) |
void | saveCTRRegister (Instruction *insnBuffer, uint32_t *insnIndex, uint32_t reg) |
void | restCTRRegister (Instruction *insnBuffer, uint32_t *insnIndex, uint32_t reg) |
void | saveEXRRegister (Instruction *insnBuffer, uint32_t *insnIndex, uint32_t reg) |
void | restEXRRegister (Instruction *insnBuffer, uint32_t *insnIndex, uint32_t reg) |
void | saveFPSCRRegister (Instruction *insnBuffer, uint32_t *insnIndex, uint32_t reg) |
void | restFPSCRRegister (Instruction *insnBuffer, uint32_t *insnIndex, uint32_t reg) |
void | saveCRRegister (Instruction *insnBuffer, uint32_t *insnIndex, uint32_t reg) |
void | restCRRegister (Instruction *insnBuffer, uint32_t *insnIndex, uint32_t reg) |
void | saveLNKRegister (Instruction *insnBuffer, uint32_t *insnIndex, uint32_t reg) |
void | restLNKRegister (Instruction *insnBuffer, uint32_t *insnIndex, uint32_t reg) |
void | generateFuncCallFull (Instruction *insnBuffer, uint32_t *insnIndex, uint32_t reg, uint64_t stubAddr, uint64_t funcAddr) |
virtual char * | additionalInfoToPrint () |
void | setExtendedPrint (bool flg) |
bool | isExtendedPrint () |
Protected Member Functions | |
CommonMethods (XCoffFile *xcoff, char *extension, uint32_t phaseNo, uint32_t callCount, char *inpFile) | |
Protected Attributes | |
uint32_t | libraryFunctionCount |
BasicBlock ** | blocksToInstrument |
BasicBlock * | terminationBlock |
uint32_t | numOfBlocksFiltered |
uint64_t | extendedBeginAddr |
uint64_t | execTOCAddress |
uint32_t | tocXorUpdateVal |
uint32_t | tocDistUpdateVal |
uint64_t | libraryFunctionStubAddrLocs [4] |
uint64_t | libraryFuncStubAddrs [4] |
uint64_t | saveAddressCondReg |
uint64_t | saveAddressFPCondReg |
uint64_t | saveAddressLinkReg |
uint64_t | saveAddressCtrReg |
uint64_t | saveAddressExpReg |
uint64_t | saveAddressGprRegs |
uint64_t | saveAddressFprRegs |
uint64_t | dataBufferAddress |
uint64_t | commentAddress |
char * | sharedLibraryInfoStr |
uint64_t | extraBlockInfoAddress |
char * | sharedLibraryPath |
bool | enableExtendedPrint |
Static Protected Attributes | |
char * | staticPrintExtension = "static" |
|
Definition at line 14 of file CommonMethods.C. |
|
Definition at line 52 of file CommonMethods.h. |
|
Reimplemented in CacheSimulator. Definition at line 120 of file CommonMethods.h. Referenced by printInstrumentationPoints(). |
|
Reimplemented from XCoffFileGen. Definition at line 57 of file CommonMethods.h. References getNumOfSharedLibFuncs(). Referenced by generateSharedLibFuncWrapper(), and BasicBlockTracer::generateSharedLibFuncWrapper(). |
|
Reimplemented in BasicBlockCounter, and CacheSimulator. Definition at line 101 of file CommonMethods.h. References __SHOULD_NOT_ARRIVE. Referenced by getDataOffsetForInst(), and reserveDataForInstrumentation(). |
|
Reimplemented in BasicBlockCounter, BasicBlockTracer, and CacheSimulator. Definition at line 103 of file CommonMethods.h. References __SHOULD_NOT_ARRIVE. |
|
|
Definition at line 351 of file CommonMethods.C. References Instruction::generateCallToImmediate(), restCRRegister(), restLNKRegister(), saveCRRegister(), saveLNKRegister(), and updateTOCRegister(). Referenced by BasicBlockTracer::generateCodeForInst(), and BasicBlockCounter::generateCodeForInst(). |
|
|
Definition at line 70 of file CommonMethods.h. References commentAddress, execTOCAddress, and tocDistUpdateVal. Referenced by generateSharedLibFuncWrapper(). |
|
Definition at line 81 of file CommonMethods.h. References execTOCAddress, saveAddressCondReg, and tocDistUpdateVal. Referenced by restCRRegister(), and saveCRRegister(). |
|
Definition at line 90 of file CommonMethods.h. References execTOCAddress, saveAddressCtrReg, and tocDistUpdateVal. Referenced by restCTRRegister(), and saveCTRRegister(). |
|
Reimplemented from XCoffFileGen. Definition at line 67 of file CommonMethods.h. References bytesPerBufferEntry(), dataBufferAddress, execTOCAddress, and tocDistUpdateVal. Referenced by CacheSimulator::byteCountForInst(), BasicBlockCounter::byteCountForInst(), CacheSimulator::generateCodeForInst(), BasicBlockCounter::generateCodeForInst(), and generateSharedLibFuncWrapper(). |
|
Definition at line 87 of file CommonMethods.h. References execTOCAddress, saveAddressExpReg, and tocDistUpdateVal. Referenced by restEXRRegister(), and saveEXRRegister(). |
|
Definition at line 78 of file CommonMethods.h. References execTOCAddress, saveAddressFprRegs, and tocDistUpdateVal. Referenced by generateSharedLibFuncWrapper(), and BasicBlockTracer::generateSharedLibFuncWrapper(). |
|
Definition at line 84 of file CommonMethods.h. References execTOCAddress, saveAddressFPCondReg, and tocDistUpdateVal. Referenced by restFPSCRRegister(), and saveFPSCRRegister(). |
|
Definition at line 75 of file CommonMethods.h. References execTOCAddress, saveAddressGprRegs, and tocDistUpdateVal. Referenced by CacheSimulator::generateCodeForInst(), BasicBlockTracer::generateCodeForInst(), BasicBlockCounter::generateCodeForInst(), generateSharedLibFuncWrapper(), and BasicBlockTracer::generateSharedLibFuncWrapper(). |
|
Definition at line 96 of file CommonMethods.h. References blocksToInstrument. |
|
Definition at line 93 of file CommonMethods.h. References execTOCAddress, saveAddressLinkReg, and tocDistUpdateVal. Referenced by restLNKRegister(), and saveLNKRegister(). |
|
Reimplemented from XCoffFileGen. Definition at line 56 of file CommonMethods.h. References libraryFunctionCount. Referenced by byteCountForSharedLibFuncWrappers(), getSharedLibFuncAddrLocation(), CacheSimulator::getSharedLibFuncName(), BasicBlockTracer::getSharedLibFuncName(), BasicBlockCounter::getSharedLibFuncName(), reserveDataForInstrumentation(), and BasicBlockTracer::reserveDataForInstrumentation(). |
|
Reimplemented from XCoffFileGen. Definition at line 63 of file CommonMethods.h. References ASSERT, getNumOfSharedLibFuncs(), and libraryFunctionStubAddrLocs. |
|
Reimplemented in BasicBlockCounter, BasicBlockTracer, and CacheSimulator. Definition at line 102 of file CommonMethods.h. References __SHOULD_NOT_ARRIVE. Referenced by printInstrumentationPoints(), and reserveDataForInstrumentation(). |
|
Definition at line 123 of file CommonMethods.h. References enableExtendedPrint. Referenced by printInstrumentationPoints(). |
|
|
|
Definition at line 334 of file CommonMethods.C. References Instruction::generateLoadWord(), Instruction::generateMoveToCR(), getCRSaveOffset(), and REG_TOC. Referenced by CacheSimulator::generateCodeForInst(), and generateFuncCallFull(). |
|
Definition at line 304 of file CommonMethods.C. References Instruction::generateLoadDouble(), Instruction::generateMoveToSPR(), getCTRSaveOffset(), REG_CTR, and REG_TOC. Referenced by generateSharedLibFuncWrapper(), and BasicBlockTracer::generateSharedLibFuncWrapper(). |
|
Definition at line 314 of file CommonMethods.C. References Instruction::generateLoadDouble(), Instruction::generateMoveToSPR(), getEXRSaveOffset(), REG_TOC, and REG_XER. Referenced by generateSharedLibFuncWrapper(), and BasicBlockTracer::generateSharedLibFuncWrapper(). |
|
Definition at line 324 of file CommonMethods.C. References Instruction::generateLoadWordFloat(), Instruction::generateMoveToFPSCR(), getFPSCRSaveOffset(), and REG_TOC. Referenced by generateSharedLibFuncWrapper(), and BasicBlockTracer::generateSharedLibFuncWrapper(). |
|
Definition at line 344 of file CommonMethods.C. References Instruction::generateLoadDouble(), Instruction::generateMoveToSPR(), getLNKSaveOffset(), REG_LNK, and REG_TOC. Referenced by CacheSimulator::generateCodeForInst(), and generateFuncCallFull(). |
|
Definition at line 329 of file CommonMethods.C. References Instruction::generateMoveFromCR(), Instruction::generateStoreWord(), getCRSaveOffset(), and REG_TOC. Referenced by CacheSimulator::generateCodeForInst(), and generateFuncCallFull(). |
|
Definition at line 299 of file CommonMethods.C. References Instruction::generateMoveFromSPR(), Instruction::generateStoreDouble(), getCTRSaveOffset(), REG_CTR, and REG_TOC. Referenced by generateSharedLibFuncWrapper(), and BasicBlockTracer::generateSharedLibFuncWrapper(). |
|
Definition at line 309 of file CommonMethods.C. References Instruction::generateMoveFromSPR(), Instruction::generateStoreDouble(), getEXRSaveOffset(), REG_TOC, and REG_XER. Referenced by generateSharedLibFuncWrapper(), and BasicBlockTracer::generateSharedLibFuncWrapper(). |
|
Definition at line 319 of file CommonMethods.C. References Instruction::generateMoveFromFPSCR(), Instruction::generateStoreWordFloat(), getFPSCRSaveOffset(), and REG_TOC. Referenced by generateSharedLibFuncWrapper(), and BasicBlockTracer::generateSharedLibFuncWrapper(). |
|
Definition at line 339 of file CommonMethods.C. References Instruction::generateMoveFromSPR(), Instruction::generateStoreDouble(), getLNKSaveOffset(), REG_LNK, and REG_TOC. Referenced by CacheSimulator::generateCodeForInst(), and generateFuncCallFull(). |
|
Reimplemented from XCoffFileGen. Definition at line 58 of file CommonMethods.h. References ASSERT, libraryFuncStubAddrs, and libraryFunctionCount. |
|
Definition at line 122 of file CommonMethods.h. References enableExtendedPrint. |
|
Reimplemented in BasicBlockCounter, and CacheSimulator. Definition at line 104 of file CommonMethods.h. References __SHOULD_NOT_ARRIVE. Referenced by reserveDataForInstrumentation(). |
|
|
Reimplemented from XCoffFileGen. Definition at line 73 of file CommonMethods.h. |
|
Definition at line 11 of file CommonMethods.h. Referenced by getInstBlocks(), and printInstrumentationPoints(). |
|
Definition at line 38 of file CommonMethods.h. Referenced by getCommentAddressOffset(), and reserveDataForInstrumentation(). |
|
Definition at line 36 of file CommonMethods.h. Referenced by getDataOffsetForInst(), and reserveDataForInstrumentation(). |
|
Definition at line 47 of file CommonMethods.h. Referenced by isExtendedPrint(), and setExtendedPrint(). |
|
Definition at line 19 of file CommonMethods.h. Referenced by generateSharedLibFuncWrapper(), getCommentAddressOffset(), getCRSaveOffset(), getCTRSaveOffset(), getDataOffsetForInst(), getEXRSaveOffset(), getFPRSaveOffset(), getFPSCRSaveOffset(), getGPRSaveOffset(), getLNKSaveOffset(), and reserveDataForInstrumentation(). |
|
Definition at line 17 of file CommonMethods.h. Referenced by reserveDataForInstrumentation(). |
|
Definition at line 41 of file CommonMethods.h. Referenced by reserveDataForInstrumentation(). |
|
Definition at line 24 of file CommonMethods.h. Referenced by setAddrOfSharedLibFuncWrapper(). |
|
Definition at line 9 of file CommonMethods.h. Referenced by getNumOfSharedLibFuncs(), and setAddrOfSharedLibFuncWrapper(). |
|
Definition at line 23 of file CommonMethods.h. Referenced by getSharedLibFuncAddrLocation(), and reserveDataForInstrumentation(). |
|
Definition at line 13 of file CommonMethods.h. |
|
Definition at line 26 of file CommonMethods.h. Referenced by getCRSaveOffset(), and reserveDataForInstrumentation(). |
|
Definition at line 30 of file CommonMethods.h. Referenced by getCTRSaveOffset(), and reserveDataForInstrumentation(). |
|
Definition at line 31 of file CommonMethods.h. Referenced by getEXRSaveOffset(), and reserveDataForInstrumentation(). |
|
Definition at line 27 of file CommonMethods.h. Referenced by getFPSCRSaveOffset(), and reserveDataForInstrumentation(). |
|
Definition at line 34 of file CommonMethods.h. Referenced by getFPRSaveOffset(), and reserveDataForInstrumentation(). |
|
Definition at line 33 of file CommonMethods.h. Referenced by getGPRSaveOffset(), and reserveDataForInstrumentation(). |
|
Definition at line 29 of file CommonMethods.h. Referenced by getLNKSaveOffset(), and reserveDataForInstrumentation(). |
|
Definition at line 39 of file CommonMethods.h. Referenced by reserveDataForInstrumentation(). |
|
Definition at line 45 of file CommonMethods.h. |
|
Definition at line 12 of file CommonMethods.C. Referenced by printInstrumentationPoints(). |
|
Definition at line 12 of file CommonMethods.h. |
|
Definition at line 21 of file CommonMethods.h. Referenced by generateSharedLibFuncWrapper(), getCommentAddressOffset(), getCRSaveOffset(), getCTRSaveOffset(), getDataOffsetForInst(), getEXRSaveOffset(), getFPRSaveOffset(), getFPSCRSaveOffset(), getGPRSaveOffset(), getLNKSaveOffset(), and reserveDataForInstrumentation(). |
|
Definition at line 20 of file CommonMethods.h. Referenced by reserveDataForInstrumentation(), and updateTOCRegister(). |