ROSE
0.9.6a
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
ROSE
ROSE Web Reference
Available ROSE Documentation
Member Function getParent() Documentation
Default Constructor Destructor Documentation Page
Rose Attribute Mechanism Page
ROSE AST Copy Mechanism
AST Construction Documentation Experiment
Doxygen Bugs
ROSE Fortran Support
Instructions On How To Document ROSE
ROSE Project ToDo List
ROSE Project Publications
Related Work
ROSE Project Download Page
Shared vs. Nonshared IR Nodes within Sage III
ROSE Project Talks
Description of AST Diagnostics within ROSE
Test List
Todo List
Deprecated List
Bug List
Modules
Namespaces
Classes
Files
File List
3rdPartyLibraries.docs
abiStuff.h
action.h
actionchanger.h
adaptor_statistics.h
advanced_preprocessing_hooks.h
affineInequality.h
analysis.h
analysisCommon.h
AnalysisDebuggingUtils.h
analyze.h
ann.h
annotations.h
annvariable.h
arrIndexLabeler.h
Assembler.h
AssemblerX86.h
AssemblerX86Init.h
Ast.h
AST_FILE_IO.docs
AST_FILE_IO.h
AstAttributeMechanism.h
AstClearVisitFlags.h
AstCombinedProcessing.h
AstCombinedProcessingImpl.h
AstCombinedSimpleProcessing.h
AstCopyMechanism.docs
AstDiagnostics.docs
AstDOTGeneration.h
AstFromString.h
AstNodePtrs.h
AstNodeVisitMapping.h
AstPDFGeneration.h
AstProcessing.docs
AstProcessing.h
AstQueryMemoryPool.h
AstRestructure.h
AstReverseProcessing.h
AstReverseSimpleProcessing.h
AstSharedMemoryParallelProcessing.h
AstSharedMemoryParallelProcessingImpl.h
AstSharedMemoryParallelSimpleProcessing.h
AstSimpleProcessing.docs
AstSimpleProcessing.h
AstSuccessorsSelectors.h
AstTextAttributesHandling.h
AstTraversal.h
AstTraverseToRoot.h
attach_all_info.h
attachPreprocessingInfo.h
attachPreprocessingInfoTraversal.h
attributeListMap.h
AvailableDocumentation.docs
backend.docs
baseCFGIterator.h
BasicBlockLocalIndex.h
bdwy_liveness.h
binaryInstruction.C
BinaryLoader.h
BinaryLoaderElf.h
BinaryLoaderElfObj.h
BinaryLoaderPe.h
boostGraphCFG.h
BottomUpTraversalLiveness.h
broadway.h
broadway_expr.h
ByteOrder.h
C++_include_files.h
callbacks.h
Callgraph.h
CallGraph.h
CallGraphAnalysis.h
CallGraphTraverse.h
callingcontext.h
cfgNodeFilter.h
CFGRewrite.h
cfgToDot.h
cfgUtils.h
checkIsModifiedFlag.C
CheckWhichAreMarked.h
Classhierarchy.h
ClassHierarchyGraph.h
Combinatorics.h
commandline_processing.h
commandlineProcessingDocumentation.docs
cong_staticCFG.h
constantprop.h
ConstrGraph.h
ConstrGraphAnalysis.h
controlDependence.h
dominatorTreesAndDominanceFrontiers/ControlFlowGraph.h
staticInterproceduralSlicing/ControlFlowGraph.h
coverage_funcsC.h
cpattern.h
CreateSlice.h
CreateSliceSet.h
customFilteredCFG.h
Cxx_Grammar.h
Cxx_GrammarMemoryPoolSupport.h
Cxx_GrammarTreeTraversalAccessEnums.h
DataConversion.C
DataConversion.h
dataflow.h
DataFlowAnalysis.h
DataflowCFG.h
dataflowCfgFilter.h
DebugTool.h
defsAndUsesTraversal.h
defsAndUsesUnfilteredCfg.h
DefUseAnalysis.h
DefUseAnalysis_perFunction.h
DefUseAnalysisAbstract.h
DefUseChain.h
defUseChains.h
DefUseExtension.h
DependenceGraph.h
DFAFilter.h
DFAnalysis.h
dfaToDot.h
diagnostic.h
Disassembler.C
Disassembler.h
DisassemblerArm.C
DisassemblerArm.h
DisassemblerMips.h
DisassemblerPowerpc.h
DisassemblerX86.C
DisassemblerX86.h
DistributedMemoryAnalysis.h
DistributedMemoryAnalysisImplementation.h
divAnalysis.h
doc_example1.docs
midend/programTransformation/documentation.docs
backend/unparser/languageIndependenceSupport/documentation.docs
backend/unparser/CxxCodeGeneration/documentation.docs
backend/unparser/FortranCodeGeneration/documentation.docs
dominatorTreesAndDominanceFrontiers/DominanceFrontier.h
dominanceAnalysis/DominanceFrontier.h
dominatorAnalysis.h
dominatorTreesAndDominanceFrontiers/DominatorTree.h
dominanceAnalysis/DominatorTree.h
DominatorTreeImpl.h
doxygenBugs.docs
dwarfSupport.h
EDefUse.h
ElfDynamicLinking.C
ElfErrorFrame.C
ElfFileHeader.C
ElfNote.C
ElfRelocation.C
ElfSection.C
ElfSectionTable.C
ElfSegmentTable.C
ElfStringTable.C
ElfSymbolTable.C
ElfSymbolVersion.C
enum_property.h
escape.h
ExecDOS.C
ExecGeneric.C
ExecLE.C
ExecNE.C
Expressions.C
ExtentMap.C
extra.docs
ExtractFunctionArguments.h
ExtraRelatedPages.docs
fake_EDG.h
fileoffsetbits.h
frontend/SageIII/virtualCFG/filteredCFG.h
midend/programAnalysis/dominanceAnalysis/filteredCFG.h
filteredCFGImpl.h
FindStatements.h
fixupCopy.h
FormatRestorer.h
FortranSupport.docs
frontend.docs
functionEvaluationOrderTraversal.h
functionLevelTraversal.h
functionNames.h
functionState.h
general_token_defs.h
genericDataflowCommon.h
GenericDynamicLinking.C
GenericFile.C
GenericFormat.C
GenericHeader.C
GenericSection.C
GenericString.C
genUID.h
GlobalIndexing.h
GlobalVarAnalysis.h
grammarBaseClass.h
graphProcessing.h
graphProcessingSgIncGraph.h
graphTemplate.h
Hexdump.C
HowToDocumentROSE.docs
IncludeDirective.h
inputCode_collectComments.h
InsertPragma.h
InstructionEnumsMips.h
InstructionEnumsX86.h
intArithLogical.h
integerOps.h
IntelPinSupport.C
IntelPinSupport.h
InterProcDataFlowAnalysis.h
interproceduralCFG.h
InterproceduralInfo.h
IntraProcAliasAnalysis.h
IntraProcDataFlowAnalysis.h
iteratedDominanceFrontier.h
JeremiahContribution.h
KeepAttribute.h
lattice.h
latticeFull.h
libgomp_g.h
libompc.h
libxomp.h
libxompf.h
LinearCongruentialGenerator.h
liveDeadVarAnalysis.h
LivenessAnalysis.h
localstl.h
LogicalCond.h
manglingSupport.h
MarkingNodes.h
MemoryMap.C
MemoryMap.h
midend.docs
MSTL.docs
NEW_CreateSliceSet.h
NEW_DependenceGraph.h
NEW_EDefUse.h
newCDG.h
newDDG.h
nodeConstAnalysis.h
nodeState.h
omp.h
omp_lib.h
omp_lib_kinds.h
omp_lowering.h
ompAstConstruction.h
OmpAttribute.h
ompparser.h
ompparser.hh
optionDeclaration.h
partitionedAnalysis.h
Partitioner.C
Partitioner.h
PDG.h
PeExport.C
PeFileHeader.C
PeImportDirectory.C
PeImportItem.C
PeImportSection.C
PeRvaSizePair.C
PeSection.C
PeSectionTable.C
PeStringTable.C
PeSymbolTable.C
placeUIDs.h
pointerrule.h
printAnalysisStates.h
procedure.h
programVerification.h
projects.docs
ProjectToDoList.docs
property.h
PtrAliasAnalysis.h
PtrAnal.h
Publications.docs
QueryLib.docs
rangemap.h
reachingDef.h
ReachingDefinition.h
bitvectorDataflow/ReachingDefinitionFacade.h
dataflowAnalysis/ReachingDefinitionFacade.h
reachingDefUnfilteredCfg.h
Registers.C
Registers.h
RelatedWork.docs
RemovalOfNodes.h
report.h
rose.docs
rose_attributes_list.h
ROSE_DownloadPage.docs
RoseBin_DotGraph.h
RoseBin_GmlGraph.h
RoseBin_Graph.h
rosedefs.h
rosedll.h
RoseSrc_CallGraphAnalysis.h
roseTranslators.h
rtiHelpers.h
rule.h
Rva.C
rwAccessLabeler.h
sage.docs
sage3.h
sage3basic.h
sageBuilder.h
sageBuilderAsm.h
sageFunctors.h
sageGeneric.h
sageInterface.h
sageInterfaceAsm.h
saveDotAnalysis.h
SB_Graph.h
SDG.h
SDGLibraryExtender.h
sequenceStructAnalysis.h
set_property.h
SgAggregateInitializer.docs
SgAsmArmInstruction.C
SgAsmBlock.C
SgAsmFunction.C
SgAsmGenericSection.docs
SgAsmInstruction.C
SgAsmInterpretation.C
SgAsmMipsInstruction.C
SgAsmPowerpcInstruction.C
SgAsmStmt.docs
SgAsmX86Instruction.C
SgAssignInitializer.docs
SgBasicBlock.docs
SgBinaryNode.docs
SgBinaryOp.docs
SgBoolValExp.docs
SgBreakStatement.docs
SgCallExpression.docs
SgCaseOptionStmt.docs
SgCatchOptionStmt.docs
SgCatchStatementSeq.docs
SgClassDeclaration.docs
SgClassDefinition.docs
SgClassNameRefExp.docs
SgClassSymbol.docs
SgClinkageStartStatement.docs
SgConditionalExp.docs
SgConstructorInitializer.docs
SgContinueStmt.docs
SgCtorInitializerList.docs
SgDeclarationModifier.docs
SgDeclarationStatement.docs
SgDefaultOptionStmt.docs
SgDeleteExp.docs
SgDirectory.docs
SgDoubleVal.docs
SgDoWhileStmt.docs
SgEnumDeclaration.docs
SgExecStatement.docs
SgExpression.docs
SgExprListExp.docs
SgExprStatement.docs
SgFile.docs
SgFileInfo.docs
SgFloatVal.docs
SgForInitStatement.docs
SgForStatement.docs
SgFunctionCallExp.docs
SgFunctionDeclaration.docs
SgFunctionDefinition.docs
SgFunctionParameterList.docs
SgFunctionRefExp.docs
SgFunctionType.docs
SgFunctionTypeTable.docs
SgGlobal.docs
SgGotoStatement.docs
SgGraphTemplate.h
SgIfStmt.docs
SgInitializedName.docs
SgInitializer.docs
SgIsNotOp.docs
SgIsOp.docs
SgLabelStatement.docs
SgLambdaRefExp.docs
SgListExp.docs
SgLocatedNode.docs
SgLongDoubleVal.docs
SgMemberFunctionDeclaration.docs
SgMemberFunctionRefExp.docs
SgMinusOp.docs
SgModifier.docs
SgModifierNodes.docs
SgName.docs
SgNamespaceAliasDeclarationStatement.docs
SgNamespaceDeclarationStatement.docs
SgNamespaceDefinitionStatement.docs
SgNamespaceSymbol.docs
sgnAnalysis.h
SgNaryBooleanOp.docs
SgNaryComparisonOp.docs
SgNaryOp.docs
SgNewExp.docs
SgNode.docs
SgOptions.docs
SgPointerAssignOp.docs
SgPragmaDeclaration.docs
SgProject.docs
SgPythonGlobalStmt.docs
SgQualifiedName.docs
SgRefExp.docs
SgReturnStmt.docs
SgScopeOp.docs
SgScopeStatement.docs
SgSizeOfOp.docs
SgSpawnStmt.docs
SgStatement.docs
SgStatementExpression.docs
SgStmtDeclarationStmt.docs
SgStorageModifier.docs
SgStringConversion.docs
SgSupport.docs
SgSwitchStatement.docs
SgSymbol.docs
SgSymbolTable.docs
SgTemplateArgument.docs
SgTemplateDeclaration.docs
SgTemplateInstantiationDecl.docs
SgTemplateInstantiationDefn.docs
SgTemplateInstantiationDirectiveStatement.docs
SgTemplateInstantiationFunctionDecl.docs
SgTemplateInstantiationMemberFunctionDecl.docs
SgThisExp.docs
SgThrowOp.docs
SgTryStmt.docs
SgTupleExp.docs
SgType.docs
SgTypeComplex.docs
SgTypeDefault.docs
SgTypedefDeclaration.docs
SgTypedefSeq.docs
SgTypeImaginary.docs
SgTypeString.docs
SgUnaryOp.docs
SgUsingDeclarationStatement.docs
SgUsingDirectiveStatement.docs
SgValueExp.docs
SgVariableDeclaration.docs
SgVariableDefinition.docs
SgVariableSymbol.docs
SgVarRefExp.docs
SgWhileStmt.docs
SharedNodes.docs
sideEffect.h
dominatorTreesAndDominanceFrontiers/SimpleDirectedGraph.h
staticInterproceduralSlicing/SimpleDirectedGraph.h
sla.h
Slicing.h
SlicingCriterion.h
SlicingInfo.h
sourceLocationInheritedAttribute.h
SqlDatabase.h
SqliteDatabaseGraph.h
ssaUnfilteredCfg.h
StackFrameVector.h
staticCFG.h
staticSingleAssignment.h
steensgaard.h
SteensgaardPtrAnal.h
string_functions.h
stringify.C
stringSupportDocumentation.docs
StringUtility.h
structure.h
support.h
taintAnalysis.h
Talks.docs
templateSupport.h
threadSupport.h
transformationSupport.h
unification_ann.h
uniqueNameTraversal.h
unparser.docs
Utf8.h
util.h
utilDocumentation.docs
utility_functions.h
ValueAnnot.h
ValuePropagate.h
VariableRenaming.h
variables.h
VariableStateTransfer.h
varSets.h
virtualBinCFG.C
virtualBinCFG.h
virtualCFG.h
VirtualCFGIterator.h
VirtualFunctionAnalysis.h
WorkLists.h
yicesParserLib.h
File Members
Examples
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
SgAsmPowerpcInstruction.C
Go to the documentation of this file.
1
/* SgAsmPowerpcInstruction member definitions. Do not move them to src/ROSETTA/Grammar/BinaryInstruction.code (or any *.code
2
* file) because then they won't get indexed/formatted/etc. by C-aware tools. */
3
4
#include "
sage3basic.h
"
5
#include "
Disassembler.h
"
6
7
// Return control flow successors. See base class for full documentation.
8
Disassembler::AddressSet
9
SgAsmPowerpcInstruction::get_successors
(
bool
*complete) {
10
Disassembler::AddressSet
retval;
11
*complete =
true
;
/*assume retval is the complete set of successors for now*/
12
13
switch
(
get_kind
()) {
14
case
powerpc_bc:
15
case
powerpc_bca:
16
case
powerpc_bcl:
17
case
powerpc_bcla: {
18
/* Conditional branches: bcX BO,BI,TARGET */
19
const
std::vector<SgAsmExpression*> &
exprs
=
get_operandList
()->
get_operands
();
20
ROSE_ASSERT(exprs.size()==3);
21
ROSE_ASSERT(
isSgAsmValueExpression
(exprs[2]));
22
SgAsmValueExpression
*ve =
isSgAsmValueExpression
(exprs[2]);
23
assert(ve!=NULL);
24
rose_addr_t
target =
SageInterface::getAsmConstant
(ve);
25
retval.insert(target);
26
retval.insert(
get_address
()+
get_size
());
27
break
;
28
}
29
30
case
powerpc_bcctr:
31
case
powerpc_bcctrl:
32
case
powerpc_bclr:
33
case
powerpc_bclrl:
34
/* Conditional branches to count register; target is unknown */
35
*complete =
false
;
36
retval.insert(
get_address
()+
get_size
());
37
break
;
38
39
case
powerpc_b:
40
case
powerpc_ba:
41
case
powerpc_bl:
42
case
powerpc_bla: {
43
/* Unconditional branches */
44
const
std::vector<SgAsmExpression*> &
exprs
=
get_operandList
()->
get_operands
();
45
ROSE_ASSERT(exprs.size()==1);
46
ROSE_ASSERT(
isSgAsmValueExpression
(exprs[0]));
47
SgAsmValueExpression
*ve =
isSgAsmValueExpression
(exprs[0]);
48
assert(ve!=NULL);
49
rose_addr_t
target =
SageInterface::getAsmConstant
(ve);
50
retval.insert(target);
51
break
;
52
}
53
54
case
powerpc_unknown_instruction:
55
case
powerpc_tw:
56
case
powerpc_twi:
57
case
powerpc_rfi:
58
case
powerpc_sc:
59
/* No known successors */
60
*complete =
false
;
61
break
;
62
63
default
:
64
/* All others fall through to next instruction */
65
retval.insert(
get_address
()+
get_size
());
66
break
;
67
}
68
return
retval;
69
}
70
71
// Does instruction terminate basic block? See base class for full documentation.
72
bool
73
SgAsmPowerpcInstruction::terminates_basic_block
() {
74
switch
(
get_kind
()) {
75
case
powerpc_unknown_instruction:
76
case
powerpc_b:
/* branch instructions... */
77
case
powerpc_ba:
78
case
powerpc_bl:
79
case
powerpc_bla:
80
case
powerpc_bc:
81
case
powerpc_bca:
82
case
powerpc_bcl:
83
case
powerpc_bcla:
84
case
powerpc_bcctr:
85
case
powerpc_bcctrl:
86
case
powerpc_bclr:
87
case
powerpc_bclrl:
88
case
powerpc_tw:
/* trap instructions... */
89
case
powerpc_twi:
90
case
powerpc_sc:
/* system call */
91
case
powerpc_rfi:
/* return from interrupt */
92
return
true
;
93
94
default
:
95
return
false
;
96
}
97
}
98
99
// Determines whether this is the special PowerPC "unknown" instruction.
100
bool
101
SgAsmPowerpcInstruction::is_unknown
()
const
102
{
103
return
powerpc_unknown_instruction ==
get_kind
();
104
}
105
rose-edg4x
src
frontend
Disassemblers
SgAsmPowerpcInstruction.C
Generated on Mon May 5 2014 17:29:27 for ROSE by
1.8.4