arch-arm: Change casting type from reinterpret to static
authorGiacomo Travaglini <giacomo.travaglini@arm.com>
Fri, 15 Dec 2017 15:56:03 +0000 (15:56 +0000)
committerGiacomo Travaglini <giacomo.travaglini@arm.com>
Tue, 19 Dec 2017 16:28:09 +0000 (16:28 +0000)
Cosmetic fix: prefer static_cast rather than reinterpret_cast in
hierarchy.

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

src/arch/arm/faults.cc

index 0293ee10073acb4ff719bfcf7491e513d32845dc..8d019d58ac13c42f70049257dd1983db130756fb 100644 (file)
@@ -482,7 +482,7 @@ ArmFault::invoke(ThreadContext *tc, const StaticInstPtr &inst)
     // extra information. This is used to generate the correct fault syndrome
     // information
     if (inst) {
-        ArmStaticInst *armInst = reinterpret_cast<ArmStaticInst *>(inst.get());
+        ArmStaticInst *armInst = static_cast<ArmStaticInst *>(inst.get());
         armInst->annotateFault(this);
     }
 
@@ -672,7 +672,7 @@ ArmFault::invoke64(ThreadContext *tc, const StaticInstPtr &inst)
     // extra information. This is used to generate the correct fault syndrome
     // information
     if (inst)
-        reinterpret_cast<ArmStaticInst *>(inst.get())->annotateFault(this);
+        static_cast<ArmStaticInst *>(inst.get())->annotateFault(this);
     // Save exception syndrome
     if ((nextMode() != MODE_IRQ) && (nextMode() != MODE_FIQ))
         setSyndrome(tc, getSyndromeReg64());