summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorSteve Reinhardt <stever@eecs.umich.edu>2004-02-03 07:19:05 -0800
committerSteve Reinhardt <stever@eecs.umich.edu>2004-02-03 07:19:05 -0800
commit3e5070a3f121d84846de16718575567725129db9 (patch)
tree6cc4194dcdc098f5980735ce5ce0d56991e988b5 /arch
parent2f369ee5d59766750df7466e24a229f96d8faa09 (diff)
downloadgem5-3e5070a3f121d84846de16718575567725129db9.tar.xz
Fix bug: forgot branchTarget() method on indirect branches.
arch/alpha/isa_desc: Add missing branchTarget() method for indirect branches. cpu/static_inst.hh: Add comment clarifying when branchTarget() can be used on indirect branches. --HG-- extra : convert_revision : 0dcfb36a9792a338cefceb3d1501825abace7ac5
Diffstat (limited to 'arch')
-rw-r--r--arch/alpha/isa_desc7
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/alpha/isa_desc b/arch/alpha/isa_desc
index 3533da09f..51bce65c2 100644
--- a/arch/alpha/isa_desc
+++ b/arch/alpha/isa_desc
@@ -1287,6 +1287,13 @@ declare {{
{
}
+ Addr branchTarget(ExecContext *xc)
+ {
+ Addr NPC = xc->readPC() + 4;
+ uint64_t Rb = xc->readIntReg(_srcRegIdx[0]);
+ return (Rb & ~3) | (NPC & 1);
+ }
+
std::string generateDisassembly(Addr pc, const SymbolTable *symtab)
{
std::stringstream ss;