misc64.isa (10037:5cac77888310) | misc64.isa (10474:799c8ee4ecba) |
---|---|
1// -*- mode:c++ -*- 2 3// Copyright (c) 2011-2013 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 --- 25 unchanged lines hidden (view full) --- 34// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 35// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 36// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 37// 38// Authors: Gabe Black 39 40let {{ 41 svcCode = ''' | 1// -*- mode:c++ -*- 2 3// Copyright (c) 2011-2013 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 --- 25 unchanged lines hidden (view full) --- 34// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 35// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 36// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 37// 38// Authors: Gabe Black 39 40let {{ 41 svcCode = ''' |
42 fault = new SupervisorCall(machInst, bits(machInst, 20, 5)); | 42 fault = std::make_shared<SupervisorCall>(machInst, bits(machInst, 20, 5)); |
43 ''' 44 45 svcIop = InstObjParams("svc", "Svc64", "ArmStaticInst", 46 svcCode, ["IsSyscall", "IsNonSpeculative", 47 "IsSerializeAfter"]) 48 header_output = BasicDeclare.subst(svcIop) 49 decoder_output = BasicConstructor64.subst(svcIop) 50 exec_output = BasicExecute.subst(svcIop) 51 52 # @todo: extend to take into account Virtualization. 53 smcCode = ''' 54 SCR scr = Scr64; 55 CPSR cpsr = Cpsr; 56 57 if (!ArmSystem::haveSecurity(xc->tcBase()) || inUserMode(cpsr) || scr.smd) { 58 fault = disabledFault(); 59 } else { | 43 ''' 44 45 svcIop = InstObjParams("svc", "Svc64", "ArmStaticInst", 46 svcCode, ["IsSyscall", "IsNonSpeculative", 47 "IsSerializeAfter"]) 48 header_output = BasicDeclare.subst(svcIop) 49 decoder_output = BasicConstructor64.subst(svcIop) 50 exec_output = BasicExecute.subst(svcIop) 51 52 # @todo: extend to take into account Virtualization. 53 smcCode = ''' 54 SCR scr = Scr64; 55 CPSR cpsr = Cpsr; 56 57 if (!ArmSystem::haveSecurity(xc->tcBase()) || inUserMode(cpsr) || scr.smd) { 58 fault = disabledFault(); 59 } else { |
60 fault = new SecureMonitorCall(machInst); | 60 fault = std::make_shared<SecureMonitorCall>(machInst); |
61 } 62 ''' 63 64 smcIop = InstObjParams("smc", "Smc64", "ArmStaticInst", 65 smcCode, ["IsNonSpeculative", "IsSerializeAfter"]) 66 header_output += BasicDeclare.subst(smcIop) 67 decoder_output += BasicConstructor64.subst(smcIop) 68 exec_output += BasicExecute.subst(smcIop) --- 38 unchanged lines hidden (view full) --- 107 } else { 108 Dest64 = (Op164 << (intWidth - imm)) | (Op264 >> imm); 109 } 110 ''' 111 extrIop = InstObjParams("extr", "Extr64", "RegRegRegImmOp64", extrCode); 112 subst("RegRegRegImmOp64", extrIop); 113 114 unknownCode = ''' | 61 } 62 ''' 63 64 smcIop = InstObjParams("smc", "Smc64", "ArmStaticInst", 65 smcCode, ["IsNonSpeculative", "IsSerializeAfter"]) 66 header_output += BasicDeclare.subst(smcIop) 67 decoder_output += BasicConstructor64.subst(smcIop) 68 exec_output += BasicExecute.subst(smcIop) --- 38 unchanged lines hidden (view full) --- 107 } else { 108 Dest64 = (Op164 << (intWidth - imm)) | (Op264 >> imm); 109 } 110 ''' 111 extrIop = InstObjParams("extr", "Extr64", "RegRegRegImmOp64", extrCode); 112 subst("RegRegRegImmOp64", extrIop); 113 114 unknownCode = ''' |
115 return new UndefinedInstruction(machInst, true); | 115 return std::make_shared<UndefinedInstruction>(machInst, true); |
116 ''' 117 unknown64Iop = InstObjParams("unknown", "Unknown64", "UnknownOp64", 118 unknownCode) 119 header_output += BasicDeclare.subst(unknown64Iop) 120 decoder_output += BasicConstructor64.subst(unknown64Iop) 121 exec_output += BasicExecute.subst(unknown64Iop) 122 123 isbIop = InstObjParams("isb", "Isb64", "ArmStaticInst", | 116 ''' 117 unknown64Iop = InstObjParams("unknown", "Unknown64", "UnknownOp64", 118 unknownCode) 119 header_output += BasicDeclare.subst(unknown64Iop) 120 decoder_output += BasicConstructor64.subst(unknown64Iop) 121 exec_output += BasicExecute.subst(unknown64Iop) 122 123 isbIop = InstObjParams("isb", "Isb64", "ArmStaticInst", |
124 "fault = new FlushPipe;", ['IsSerializeAfter']) | 124 "fault = std::make_shared<FlushPipe>();", 125 ['IsSerializeAfter']) |
125 header_output += BasicDeclare.subst(isbIop) 126 decoder_output += BasicConstructor64.subst(isbIop) 127 exec_output += BasicExecute.subst(isbIop) 128 129 dsbIop = InstObjParams("dsb", "Dsb64", "ArmStaticInst", | 126 header_output += BasicDeclare.subst(isbIop) 127 decoder_output += BasicConstructor64.subst(isbIop) 128 exec_output += BasicExecute.subst(isbIop) 129 130 dsbIop = InstObjParams("dsb", "Dsb64", "ArmStaticInst", |
130 "fault = new FlushPipe;", | 131 "fault = std::make_shared<FlushPipe>();", |
131 ['IsMemBarrier', 'IsSerializeAfter']) 132 header_output += BasicDeclare.subst(dsbIop) 133 decoder_output += BasicConstructor64.subst(dsbIop) 134 exec_output += BasicExecute.subst(dsbIop) 135 136 dmbIop = InstObjParams("dmb", "Dmb64", "ArmStaticInst", "", 137 ['IsMemBarrier']) 138 header_output += BasicDeclare.subst(dmbIop) 139 decoder_output += BasicConstructor64.subst(dmbIop) 140 exec_output += BasicExecute.subst(dmbIop) 141 142 clrexIop = InstObjParams("clrex", "Clrex64", "ArmStaticInst", 143 "LLSCLock = 0;") 144 header_output += BasicDeclare.subst(clrexIop) 145 decoder_output += BasicConstructor64.subst(clrexIop) 146 exec_output += BasicExecute.subst(clrexIop) 147}}; | 132 ['IsMemBarrier', 'IsSerializeAfter']) 133 header_output += BasicDeclare.subst(dsbIop) 134 decoder_output += BasicConstructor64.subst(dsbIop) 135 exec_output += BasicExecute.subst(dsbIop) 136 137 dmbIop = InstObjParams("dmb", "Dmb64", "ArmStaticInst", "", 138 ['IsMemBarrier']) 139 header_output += BasicDeclare.subst(dmbIop) 140 decoder_output += BasicConstructor64.subst(dmbIop) 141 exec_output += BasicExecute.subst(dmbIop) 142 143 clrexIop = InstObjParams("clrex", "Clrex64", "ArmStaticInst", 144 "LLSCLock = 0;") 145 header_output += BasicDeclare.subst(clrexIop) 146 decoder_output += BasicConstructor64.subst(clrexIop) 147 exec_output += BasicExecute.subst(clrexIop) 148}}; |