diff options
Diffstat (limited to 'src/arch/arm/isa/templates')
-rw-r--r-- | src/arch/arm/isa/templates/mem64.isa | 2 | ||||
-rw-r--r-- | src/arch/arm/isa/templates/neon.isa | 6 | ||||
-rw-r--r-- | src/arch/arm/isa/templates/vfp.isa | 30 |
3 files changed, 24 insertions, 14 deletions
diff --git a/src/arch/arm/isa/templates/mem64.isa b/src/arch/arm/isa/templates/mem64.isa index aa5b8f6b8..3d6cadb5d 100644 --- a/src/arch/arm/isa/templates/mem64.isa +++ b/src/arch/arm/isa/templates/mem64.isa @@ -41,7 +41,7 @@ let {{ SPAlignmentCheckCode = ''' if (baseIsSP && bits(XBase, 3, 0) && SPAlignmentCheckEnabled(xc->tcBase())) { - return new SPAlignmentFault(); + return std::make_shared<SPAlignmentFault>(); } ''' }}; diff --git a/src/arch/arm/isa/templates/neon.isa b/src/arch/arm/isa/templates/neon.isa index c437f7e13..45df741e7 100644 --- a/src/arch/arm/isa/templates/neon.isa +++ b/src/arch/arm/isa/templates/neon.isa @@ -49,11 +49,13 @@ let {{ if (trapEnCheck) { CPSR cpsrEnCheck = Cpsr; if (cpsrEnCheck.mode == MODE_HYP) { - return new UndefinedInstruction(machInst, issEnCheck, + return std::make_shared<UndefinedInstruction>( + machInst, issEnCheck, EC_TRAPPED_HCPTR); } else { if (!inSecureState(Scr, Cpsr)) { - return new HypervisorTrap(machInst, issEnCheck, + return std::make_shared<HypervisorTrap>( + machInst, issEnCheck, EC_TRAPPED_HCPTR); } } diff --git a/src/arch/arm/isa/templates/vfp.isa b/src/arch/arm/isa/templates/vfp.isa index 45be8a5f3..4da00e8d5 100644 --- a/src/arch/arm/isa/templates/vfp.isa +++ b/src/arch/arm/isa/templates/vfp.isa @@ -48,11 +48,13 @@ let {{ if (trapEnCheck) { CPSR cpsrEnCheck = Cpsr; if (cpsrEnCheck.mode == MODE_HYP) { - return new UndefinedInstruction(machInst, issEnCheck, + return std::make_shared<UndefinedInstruction>( + machInst, issEnCheck, EC_TRAPPED_HCPTR, mnemonic); } else { if (!inSecureState(Scr, Cpsr)) { - return new HypervisorTrap(machInst, issEnCheck, + return std::make_shared<HypervisorTrap>( + machInst, issEnCheck, EC_TRAPPED_HCPTR); } } @@ -63,20 +65,20 @@ let {{ CPSR cpsrEnCheck = Cpsr; ExceptionLevel el = (ExceptionLevel) (uint8_t) cpsrEnCheck.el; if (!vfpNeon64Enabled(Cpacr64, el)) - return new SupervisorTrap(machInst, 0x1E00000, + return std::make_shared<SupervisorTrap>(machInst, 0x1E00000, EC_TRAPPED_SIMD_FP); if (ArmSystem::haveVirtualization(xc->tcBase()) && el <= EL2) { HCPTR cptrEnCheck = xc->tcBase()->readMiscReg(MISCREG_CPTR_EL2); if (cptrEnCheck.tfp) - return new HypervisorTrap(machInst, 0x1E00000, + return std::make_shared<HypervisorTrap>(machInst, 0x1E00000, EC_TRAPPED_SIMD_FP); } if (ArmSystem::haveSecurity(xc->tcBase())) { HCPTR cptrEnCheck = xc->tcBase()->readMiscReg(MISCREG_CPTR_EL3); if (cptrEnCheck.tfp) - return new SecureMonitorTrap(machInst, 0x1E00000, + return std::make_shared<SecureMonitorTrap>(machInst, 0x1E00000, EC_TRAPPED_SIMD_FP); } ''' @@ -95,11 +97,13 @@ let {{ if (trapEnCheck) { CPSR cpsrEnCheck = Cpsr; if (cpsrEnCheck.mode == MODE_HYP) { - return new UndefinedInstruction(machInst, issEnCheck, + return std::make_shared<UndefinedInstruction>( + machInst, issEnCheck, EC_TRAPPED_HCPTR, mnemonic); } else { if (!inSecureState(Scr, Cpsr)) { - return new HypervisorTrap(machInst, issEnCheck, + return std::make_shared<HypervisorTrap>( + machInst, issEnCheck, EC_TRAPPED_HCPTR); } } @@ -121,11 +125,13 @@ let {{ if (trapEnCheck) { CPSR cpsrEnCheck = Cpsr; if (cpsrEnCheck.mode == MODE_HYP) { - return new UndefinedInstruction(machInst, issEnCheck, + return std::make_shared<UndefinedInstruction>( + machInst, issEnCheck, EC_TRAPPED_HCPTR, mnemonic); } else { if (!inSecureState(Scr, Cpsr)) { - return new HypervisorTrap(machInst, issEnCheck, + return std::make_shared<HypervisorTrap>( + machInst, issEnCheck, EC_TRAPPED_HCPTR); } } @@ -141,11 +147,13 @@ let {{ if (trapEnCheck) { CPSR cpsrEnCheck = Cpsr; if (cpsrEnCheck.mode == MODE_HYP) { - return new UndefinedInstruction(machInst, issEnCheck, + return std::make_shared<UndefinedInstruction>( + machInst, issEnCheck, EC_TRAPPED_HCPTR, mnemonic); } else { if (!inSecureState(Scr, Cpsr)) { - return new HypervisorTrap(machInst, issEnCheck, + return std::make_shared<HypervisorTrap>( + machInst, issEnCheck, EC_TRAPPED_HCPTR); } } |