1// Copyright (c) 2006 The Regents of The University of Michigan 2// All rights reserved. 3// 4// Redistribution and use in source and binary forms, with or without 5// modification, are permitted provided that the following conditions are 6// met: redistributions of source code must retain the above copyright 7// notice, this list of conditions and the following disclaimer; 8// redistributions in binary form must reproduce the above copyright --- 105 unchanged lines hidden (view full) --- 114 decoder_output += BasicConstructor.subst(imm_iop) 115 exec_output += PrivExecute.subst(imm_iop) 116 decode_block = ROrImmDecode.subst(iop) 117 else: 118 decode_block = BasicDecode.subst(iop) 119 return (header_output, decoder_output, exec_output, decode_block) 120}}; 121 |
122def format Priv(code, *opt_flags) {{ |
123 checkCode = "!(Pstate<2:> || Hpstate<2:>)" |
124 (header_output, decoder_output, 125 exec_output, decode_block) = doPrivFormat(code, |
126 checkCode, name, Name, opt_flags) |
127}}; 128 |
129def format NoPriv(code, *opt_flags) {{ 130 #Instructions which use this format don't really check for 131 #any particular mode, but the disassembly is performed 132 #using the control registers actual name 133 checkCode = "false" 134 (header_output, decoder_output, 135 exec_output, decode_block) = doPrivFormat(code, 136 checkCode, name, Name, opt_flags) 137}}; 138 139def format PrivCheck(code, extraCheckCode, *opt_flags) {{ 140 checkCode = "(%s) && !(Pstate<2:> || Hpstate<2:>)" % extraCheckCode 141 (header_output, decoder_output, 142 exec_output, decode_block) = doPrivFormat(code, 143 checkCode, name, Name, opt_flags) 144}}; 145 |
146def format HPriv(code, *opt_flags) {{ 147 checkCode = "!Hpstate<2:2>" 148 (header_output, decoder_output, 149 exec_output, decode_block) = doPrivFormat(code, |
150 checkCode, name, Name, opt_flags) |
151}}; 152 |