diff options
author | Ali Saidi <Ali.Saidi@ARM.com> | 2012-03-21 10:34:06 -0500 |
---|---|---|
committer | Ali Saidi <Ali.Saidi@ARM.com> | 2012-03-21 10:34:06 -0500 |
commit | ed8ed6e7614057e0c8f7461ea9f7a8f2d59a57ea (patch) | |
tree | 8060e538952556840abf34a9e0fac574eb093194 /src/arch/arm/isa | |
parent | a64319f764cfa8c961696c4fab996a50b45ab09e (diff) | |
download | gem5-ed8ed6e7614057e0c8f7461ea9f7a8f2d59a57ea.tar.xz |
ARM: Clean up condCodes in IT blocks.
Diffstat (limited to 'src/arch/arm/isa')
-rw-r--r-- | src/arch/arm/isa/formats/branch.isa | 25 | ||||
-rw-r--r-- | src/arch/arm/isa/formats/data.isa | 16 |
2 files changed, 5 insertions, 36 deletions
diff --git a/src/arch/arm/isa/formats/branch.isa b/src/arch/arm/isa/formats/branch.isa index fccfe2897..f1b17ec90 100644 --- a/src/arch/arm/isa/formats/branch.isa +++ b/src/arch/arm/isa/formats/branch.isa @@ -236,13 +236,6 @@ def format Thumb32BranchesAndMiscCtrl() {{ } case 0x1: { - ConditionCode condCode; - if(machInst.itstateMask) { - condCode = (ConditionCode)(uint8_t)machInst.itstateCond; - } else { - condCode = COND_UC; - } - const uint32_t s = bits(machInst, 26); const uint32_t i1 = !(bits(machInst, 13) ^ s); const uint32_t i2 = !(bits(machInst, 11) ^ s); @@ -251,19 +244,13 @@ def format Thumb32BranchesAndMiscCtrl() {{ const int32_t imm = sext<25>((s << 24) | (i1 << 23) | (i2 << 22) | (imm10 << 12) | (imm11 << 1)); - return new B(machInst, imm, condCode); + return new B(machInst, imm, COND_UC); } case 0x4: { if (bits(machInst, 0) == 1) { return new Unknown(machInst); } - ConditionCode condCode; - if(machInst.itstateMask) { - condCode = (ConditionCode)(uint8_t)machInst.itstateCond; - } else { - condCode = COND_UC; - } const uint32_t s = bits(machInst, 26); const uint32_t i1 = !(bits(machInst, 13) ^ s); const uint32_t i2 = !(bits(machInst, 11) ^ s); @@ -272,16 +259,10 @@ def format Thumb32BranchesAndMiscCtrl() {{ const int32_t imm = sext<25>((s << 24) | (i1 << 23) | (i2 << 22) | (imm10h << 12) | (imm10l << 2)); - return new BlxImm(machInst, imm, condCode); + return new BlxImm(machInst, imm, COND_UC); } case 0x5: { - ConditionCode condCode; - if(machInst.itstateMask) { - condCode = (ConditionCode)(uint8_t)machInst.itstateCond; - } else { - condCode = COND_UC; - } const uint32_t s = bits(machInst, 26); const uint32_t i1 = !(bits(machInst, 13) ^ s); const uint32_t i2 = !(bits(machInst, 11) ^ s); @@ -290,7 +271,7 @@ def format Thumb32BranchesAndMiscCtrl() {{ const int32_t imm = sext<25>((s << 24) | (i1 << 23) | (i2 << 22) | (imm10 << 12) | (imm11 << 1)); - return new Bl(machInst, imm, condCode); + return new Bl(machInst, imm, COND_UC); } default: break; diff --git a/src/arch/arm/isa/formats/data.isa b/src/arch/arm/isa/formats/data.isa index ffe5f45e3..3ee178f0e 100644 --- a/src/arch/arm/isa/formats/data.isa +++ b/src/arch/arm/isa/formats/data.isa @@ -1040,25 +1040,13 @@ def format Thumb16SpecDataAndBx() {{ return new MovReg(machInst, rdn, INTREG_ZERO, rm, 0, LSL); case 0x3: if (bits(machInst, 7) == 0) { - ConditionCode condCode; - if(machInst.itstateMask) { - condCode = (ConditionCode)(uint8_t)machInst.itstateCond; - } else { - condCode = COND_UC; - } return new BxReg(machInst, (IntRegIndex)(uint32_t)bits(machInst, 6, 3), - condCode); + COND_UC); } else { - ConditionCode condCode; - if(machInst.itstateMask) { - condCode = (ConditionCode)(uint8_t)machInst.itstateCond; - } else { - condCode = COND_UC; - } return new BlxReg(machInst, (IntRegIndex)(uint32_t)bits(machInst, 6, 3), - condCode); + COND_UC); } } } |