misc64.isa (12543:cd851ca42177) misc64.isa (13362:ecfc76db437f)
1// -*- mode:c++ -*-
2
3// Copyright (c) 2011-2013, 2016-2018 ARM Limited
4// All rights reserved
5//
6// The license below extends only to copyright in the software and shall
7// not be construed as granting a license to any other intellectual
8// property including but not limited to intellectual property relating

--- 37 unchanged lines hidden (view full) ---

46 svcCode, ["IsSyscall", "IsNonSpeculative",
47 "IsSerializeAfter"])
48 header_output = ImmOp64Declare.subst(svcIop)
49 decoder_output = ImmOp64Constructor.subst(svcIop)
50 exec_output = BasicExecute.subst(svcIop)
51
52 hvcCode = '''
53 SCR scr = Scr64;
1// -*- mode:c++ -*-
2
3// Copyright (c) 2011-2013, 2016-2018 ARM Limited
4// All rights reserved
5//
6// The license below extends only to copyright in the software and shall
7// not be construed as granting a license to any other intellectual
8// property including but not limited to intellectual property relating

--- 37 unchanged lines hidden (view full) ---

46 svcCode, ["IsSyscall", "IsNonSpeculative",
47 "IsSerializeAfter"])
48 header_output = ImmOp64Declare.subst(svcIop)
49 decoder_output = ImmOp64Constructor.subst(svcIop)
50 exec_output = BasicExecute.subst(svcIop)
51
52 hvcCode = '''
53 SCR scr = Scr64;
54 HCR hcr = Hcr64;
55 CPSR cpsr = Cpsr;
54
56
55 if (!ArmSystem::haveVirtualization(xc->tcBase()) ||
56 (ArmSystem::haveSecurity(xc->tcBase()) && (!scr.ns || !scr.hce))) {
57 fault = disabledFault();
57 auto tc = xc->tcBase();
58 ExceptionLevel pstate_EL = (ExceptionLevel)(uint8_t)(cpsr.el);
59
60 bool unalloc_encod = !ArmSystem::haveEL(tc, EL2) || pstate_EL == EL0 ||
61 (pstate_EL == EL1 && inSecureState(tc));
62
63 bool hvc_enable = ArmSystem::haveEL(tc, EL3) ?
64 scr.hce : !hcr.hcd;
65
66 if (unalloc_encod || !hvc_enable) {
67 fault = undefinedFault64(tc, pstate_EL);
58 } else {
59 fault = std::make_shared<HypervisorCall>(machInst, bits(machInst, 20, 5));
60 }
61 '''
62
63 hvcIop = InstObjParams("hvc", "Hvc64", "ImmOp64",
64 hvcCode, ["IsSyscall", "IsNonSpeculative",
65 "IsSerializeAfter"])

--- 131 unchanged lines hidden ---
68 } else {
69 fault = std::make_shared<HypervisorCall>(machInst, bits(machInst, 20, 5));
70 }
71 '''
72
73 hvcIop = InstObjParams("hvc", "Hvc64", "ImmOp64",
74 hvcCode, ["IsSyscall", "IsNonSpeculative",
75 "IsSerializeAfter"])

--- 131 unchanged lines hidden ---