diff options
author | Andrew Bardsley <Andrew.Bardsley@arm.com> | 2014-05-09 18:58:47 -0400 |
---|---|---|
committer | Andrew Bardsley <Andrew.Bardsley@arm.com> | 2014-05-09 18:58:47 -0400 |
commit | f7d80348fa6c764da5ec75fb6ed4796d4e88aa0a (patch) | |
tree | 4a2d799c7d3c907e503d61a177c5fed8c7da8190 /src/arch/arm/isa | |
parent | eab00f4966142392322b38c9efaf9d3cbf554b07 (diff) | |
download | gem5-f7d80348fa6c764da5ec75fb6ed4796d4e88aa0a.tar.xz |
arm: Add branch flags onto macroops
Mark branch flags onto macroops to allow branch prediction before
microop decomposition
Diffstat (limited to 'src/arch/arm/isa')
-rw-r--r-- | src/arch/arm/isa/templates/mem.isa | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/arch/arm/isa/templates/mem.isa b/src/arch/arm/isa/templates/mem.isa index 6199c0920..f1d1523f4 100644 --- a/src/arch/arm/isa/templates/mem.isa +++ b/src/arch/arm/isa/templates/mem.isa @@ -1214,12 +1214,21 @@ def template LoadImmConstructor {{ uops[2] = new MicroUopRegMov(machInst, INTREG_PC, INTREG_UREG0); uops[2]->setFlag(StaticInst::IsControl); uops[2]->setFlag(StaticInst::IsIndirectControl); - if (conditional) + /* Also set flags on the macroop so that pre-microop decomposition + branch prediction can work */ + setFlag(StaticInst::IsControl); + setFlag(StaticInst::IsIndirectControl); + if (conditional) { uops[2]->setFlag(StaticInst::IsCondControl); - else + setFlag(StaticInst::IsCondControl); + } else { uops[2]->setFlag(StaticInst::IsUncondControl); - if (_base == INTREG_SP && _add && _imm == 4 && %(is_ras_pop)s) + setFlag(StaticInst::IsUncondControl); + } + if (_base == INTREG_SP && _add && _imm == 4 && %(is_ras_pop)s) { uops[2]->setFlag(StaticInst::IsReturn); + setFlag(StaticInst::IsReturn); + } uops[2]->setLastMicroop(); } else { uops[0] = new %(acc_name)s(machInst, _dest, _base, _add, _imm); |