diff options
author | Gabe Black <gblack@eecs.umich.edu> | 2006-03-17 14:23:48 -0500 |
---|---|---|
committer | Gabe Black <gblack@eecs.umich.edu> | 2006-03-17 14:23:48 -0500 |
commit | cf2f7e13bc26b8817f4378701b8fb5f7c67b3da2 (patch) | |
tree | 805f0617a04dd2c265e3ab451f5177c359a169e0 /arch/sparc/isa/formats/priv.isa | |
parent | cf942425393dbd7ac3d05a9c94aab5140d0bf617 (diff) | |
parent | c1a1f8ee95a6ed644838db06474801ba4b7bf124 (diff) | |
download | gem5-cf2f7e13bc26b8817f4378701b8fb5f7c67b3da2.tar.xz |
Merge m5.eecs.umich.edu:/bk/newmem
into ewok.(none):/home/gblack/m5/newmem
arch/sparc/isa/decoder.isa:
Hand merged
--HG--
extra : convert_revision : 5d5338602c48be48978972a091c5e93f9dd775aa
Diffstat (limited to 'arch/sparc/isa/formats/priv.isa')
-rw-r--r-- | arch/sparc/isa/formats/priv.isa | 27 |
1 files changed, 10 insertions, 17 deletions
diff --git a/arch/sparc/isa/formats/priv.isa b/arch/sparc/isa/formats/priv.isa index 7c0d8a985..c89e769b4 100644 --- a/arch/sparc/isa/formats/priv.isa +++ b/arch/sparc/isa/formats/priv.isa @@ -1,6 +1,6 @@ //////////////////////////////////////////////////////////////////// // -// Privelege mode instructions +// Privilege mode instructions // output header {{ @@ -92,8 +92,8 @@ def template PrivExecute {{ %(op_rd)s; //If the processor isn't in privileged mode, fault out right away - if(!pstate_priv) - return new PrivilegedOpCode + if(!PstatePriv) + return new PrivilegedOpcode %(code)s; %(op_wb)s; @@ -108,7 +108,7 @@ def template PrivTickExecute {{ %(op_rd)s; //If the processor isn't in privileged mode, fault out right away - if(!pstate_priv && tick_npt) + if(!PstatePriv && TickNpt) return new PrivilegedAction %(code)s; @@ -116,20 +116,13 @@ def template PrivTickExecute {{ } }}; -def template Rb2OrImm13Decode {{ - { - return (I ? (SparcStaticInst *)(new %(class_name)sImm(machInst)) - : (SparcStaticInst *)(new %(class_name)s(machInst))); - } -}}; - // Primary format for integer operate instructions: def format Priv(code, *opt_flags) {{ uses_imm = (code.find('Rs2_or_imm13') != -1) if uses_imm: orig_code = code - code = re.sub(r'Rs2_or_imm', 'Rs2', orig_code) - imm_code = re.sub(r'Rs2_or_imm(\.\w+)?', 'imm', orig_code) + code = re.sub(r'Rs2_or_imm13', 'Rs2', orig_code) + imm_code = re.sub(r'Rs2_or_imm13(\.\w+)?', 'imm', orig_code) cblk = CodeBlock(code) iop = InstObjParams(name, Name, 'Priv', cblk, opt_flags) header_output = BasicDeclare.subst(iop) @@ -142,7 +135,7 @@ def format Priv(code, *opt_flags) {{ header_output += BasicDeclare.subst(imm_iop) decoder_output += BasicConstructor.subst(imm_iop) exec_output += PrivExecute.subst(imm_iop) - decode_block = Rb2OrImm13Decode.subst(iop) + decode_block = ROrImmDecode.subst(iop) else: decode_block = BasicDecode.subst(iop) }}; @@ -152,8 +145,8 @@ def format PrivTick(code, *opt_flags) {{ uses_imm = (code.find('Rs2_or_imm13') != -1) if uses_imm: orig_code = code - code = re.sub(r'Rs2_or_imm', 'Rs2', orig_code) - imm_code = re.sub(r'Rs2_or_imm(\.\w+)?', 'imm', orig_code) + code = re.sub(r'Rs2_or_imm13', 'Rs2', orig_code) + imm_code = re.sub(r'Rs2_or_imm13(\.\w+)?', 'imm', orig_code) cblk = CodeBlock(code) iop = InstObjParams(name, Name, 'PrivTick', cblk, opt_flags) header_output = BasicDeclare.subst(iop) @@ -166,7 +159,7 @@ def format PrivTick(code, *opt_flags) {{ header_output += BasicDeclare.subst(imm_iop) decoder_output += BasicConstructor.subst(imm_iop) exec_output += PrivTickExecute.subst(imm_iop) - decode_block = Rb2OrImm13Decode.subst(iop) + decode_block = Rb2OrImmDecode.subst(iop) else: decode_block = BasicDecode.subst(iop) }}; |