arch-arm: Change ArmFault cast from reinterpret to static
authorGiacomo Travaglini <giacomo.travaglini@arm.com>
Fri, 9 Feb 2018 11:07:53 +0000 (11:07 +0000)
committerGiacomo Travaglini <giacomo.travaglini@arm.com>
Fri, 16 Feb 2018 09:26:43 +0000 (09:26 +0000)
Changing casting type in src/arch/arm/isa.cc

Change-Id: Ia19b30a1bf8b1b25df149b52613a3533eaced03a
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/8241
Reviewed-by: Brandon Potter <Brandon.Potter@amd.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>

src/arch/arm/isa.cc

index 5d34e188a08da90f79b86b51e9367a7f87ad65b3..f6677323e057147a7f1291ff2052e90b60081b58 100644 (file)
@@ -1476,7 +1476,7 @@ ISA::setMiscReg(int misc_reg, const MiscReg &val, ThreadContext *tc)
                           "MISCREG: Translated addr 0x%08x: PAR: 0x%08x\n",
                           val, newVal);
               } else {
-                  ArmFault *armFault = reinterpret_cast<ArmFault *>(fault.get());
+                  ArmFault *armFault = static_cast<ArmFault *>(fault.get());
                   // Set fault bit and FSR
                   FSR fsr = armFault->getFsr(tc);
 
@@ -1725,7 +1725,7 @@ ISA::setMiscReg(int misc_reg, const MiscReg &val, ThreadContext *tc)
                           "MISCREG: Translated addr %#x: PAR_EL1: %#xx\n",
                           val, newVal);
                 } else {
-                    ArmFault *armFault = reinterpret_cast<ArmFault *>(fault.get());
+                    ArmFault *armFault = static_cast<ArmFault *>(fault.get());
                     // Set fault bit and FSR
                     FSR fsr = armFault->getFsr(tc);