Deleted Added
sdiff udiff text old ( 2646:c5f20661d9f3 ) new ( 2938:afa2dcabf2ae )
full compact
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

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

82 {
83 %(op_decl)s;
84 %(op_rd)s;
85
86 //If the processor isn't in privileged mode, fault out right away
87 if(%(check)s)
88 return new PrivilegedAction;
89
90 %(code)s;
91 %(op_wb)s;
92 return NoFault;
93 }
94}};
95
96let {{
97 def doPrivFormat(code, checkCode, name, Name, opt_flags):
98 (usesImm, code, immCode,
99 rString, iString) = splitOutImm(code)
100 iop = InstObjParams(name, Name, 'Priv', code,

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

111 decode_block = ROrImmDecode.subst(iop)
112 else:
113 decode_block = BasicDecode.subst(iop)
114 return (header_output, decoder_output, exec_output, decode_block)
115}};
116
117// Primary format for integer operate instructions:
118def format Priv(code, *opt_flags) {{
119 checkCode = "((xc->readMiscReg(PrStart + MISCREG_PSTATE))<2:2>)"
120 (header_output, decoder_output,
121 exec_output, decode_block) = doPrivFormat(code,
122 checkCode, name, Name, opt_flags)
123}};
124
125