Started removing "CodeBlock" objects from the mips isa description.

--HG--
extra : convert_revision : 2e174ecfce8c86732e1addfc23e961429b86a570
This commit is contained in:
Gabe Black 2006-12-17 10:54:17 -05:00
parent 220e99a29b
commit c299c2562b
9 changed files with 20 additions and 22 deletions

View file

@ -88,7 +88,7 @@ def template BasicDecodeWithMnemonic {{
// The most basic instruction format... // The most basic instruction format...
def format BasicOp(code, *flags) {{ def format BasicOp(code, *flags) {{
iop = InstObjParams(name, Name, 'MipsStaticInst', CodeBlock(code), flags) iop = InstObjParams(name, Name, 'MipsStaticInst', code, flags)
header_output = BasicDeclare.subst(iop) header_output = BasicDeclare.subst(iop)
decoder_output = BasicConstructor.subst(iop) decoder_output = BasicConstructor.subst(iop)
decode_block = BasicDecode.subst(iop) decode_block = BasicDecode.subst(iop)

View file

@ -247,7 +247,7 @@ def format Branch(code,*opt_flags) {{
code += '} else {\n' code += '} else {\n'
code += not_taken_code code += not_taken_code
iop = InstObjParams(name, Name, 'Branch', CodeBlock(code), inst_flags) iop = InstObjParams(name, Name, 'Branch', code, inst_flags)
header_output = BasicDeclare.subst(iop) header_output = BasicDeclare.subst(iop)
decoder_output = BasicConstructor.subst(iop) decoder_output = BasicConstructor.subst(iop)
decode_block = BasicDecode.subst(iop) decode_block = BasicDecode.subst(iop)
@ -266,7 +266,7 @@ def format Jump(code, *opt_flags) {{
else: else:
inst_flags += (x, ) inst_flags += (x, )
iop = InstObjParams(name, Name, 'Jump', CodeBlock(code), inst_flags) iop = InstObjParams(name, Name, 'Jump', code, inst_flags)
header_output = BasicDeclare.subst(iop) header_output = BasicDeclare.subst(iop)
decoder_output = BasicConstructor.subst(iop) decoder_output = BasicConstructor.subst(iop)
decode_block = BasicDecode.subst(iop) decode_block = BasicDecode.subst(iop)

View file

@ -130,7 +130,7 @@ output decoder {{
}}; }};
def format System(code, *flags) {{ def format System(code, *flags) {{
iop = InstObjParams(name, Name, 'Control', CodeBlock(code), flags) iop = InstObjParams(name, Name, 'Control', code, flags)
header_output = BasicDeclare.subst(iop) header_output = BasicDeclare.subst(iop)
decoder_output = BasicConstructor.subst(iop) decoder_output = BasicConstructor.subst(iop)
decode_block = BasicDecode.subst(iop) decode_block = BasicDecode.subst(iop)
@ -138,7 +138,7 @@ def format System(code, *flags) {{
}}; }};
def format CP0Control(code, *flags) {{ def format CP0Control(code, *flags) {{
iop = InstObjParams(name, Name, 'CP0Control', CodeBlock(code), flags) iop = InstObjParams(name, Name, 'CP0Control', code, flags)
header_output = BasicDeclare.subst(iop) header_output = BasicDeclare.subst(iop)
decoder_output = BasicConstructor.subst(iop) decoder_output = BasicConstructor.subst(iop)
decode_block = BasicDecode.subst(iop) decode_block = BasicDecode.subst(iop)
@ -146,7 +146,7 @@ def format CP0Control(code, *flags) {{
}}; }};
def format CP1Control(code, *flags) {{ def format CP1Control(code, *flags) {{
iop = InstObjParams(name, Name, 'CP1Control', CodeBlock(code), flags) iop = InstObjParams(name, Name, 'CP1Control', code, flags)
header_output = BasicDeclare.subst(iop) header_output = BasicDeclare.subst(iop)
decoder_output = BasicConstructor.subst(iop) decoder_output = BasicConstructor.subst(iop)
decode_block = BasicDecode.subst(iop) decode_block = BasicDecode.subst(iop)

View file

@ -209,7 +209,7 @@ def template FloatingPointExecute {{
// Primary format for float point operate instructions: // Primary format for float point operate instructions:
def format FloatOp(code, *flags) {{ def format FloatOp(code, *flags) {{
iop = InstObjParams(name, Name, 'FPOp', CodeBlock(code), flags) iop = InstObjParams(name, Name, 'FPOp', code, flags)
header_output = BasicDeclare.subst(iop) header_output = BasicDeclare.subst(iop)
decoder_output = BasicConstructor.subst(iop) decoder_output = BasicConstructor.subst(iop)
decode_block = BasicDecode.subst(iop) decode_block = BasicDecode.subst(iop)
@ -248,7 +248,7 @@ def format FloatCompareOp(cond_code, *flags) {{
code += cond_code + '}' code += cond_code + '}'
code += 'FCSR = genCCVector(FCSR, CC, cond);\n' code += 'FCSR = genCCVector(FCSR, CC, cond);\n'
iop = InstObjParams(name, Name, 'FPCompareOp', CodeBlock(code)) iop = InstObjParams(name, Name, 'FPCompareOp', code)
header_output = BasicDeclare.subst(iop) header_output = BasicDeclare.subst(iop)
decoder_output = BasicConstructor.subst(iop) decoder_output = BasicConstructor.subst(iop)
decode_block = BasicDecode.subst(iop) decode_block = BasicDecode.subst(iop)
@ -299,7 +299,7 @@ def format FloatConvertOp(code, *flags) {{
else: else:
code += 'val); ' code += 'val); '
iop = InstObjParams(name, Name, 'FPOp', CodeBlock(code)) iop = InstObjParams(name, Name, 'FPOp', code)
header_output = BasicDeclare.subst(iop) header_output = BasicDeclare.subst(iop)
decoder_output = BasicConstructor.subst(iop) decoder_output = BasicConstructor.subst(iop)
decode_block = BasicDecode.subst(iop) decode_block = BasicDecode.subst(iop)
@ -307,7 +307,7 @@ def format FloatConvertOp(code, *flags) {{
}}; }};
def format FloatAccOp(code, *flags) {{ def format FloatAccOp(code, *flags) {{
iop = InstObjParams(name, Name, 'FPOp', CodeBlock(code), flags) iop = InstObjParams(name, Name, 'FPOp', code, flags)
header_output = BasicDeclare.subst(iop) header_output = BasicDeclare.subst(iop)
decoder_output = BasicConstructor.subst(iop) decoder_output = BasicConstructor.subst(iop)
decode_block = BasicDecode.subst(iop) decode_block = BasicDecode.subst(iop)
@ -316,7 +316,7 @@ def format FloatAccOp(code, *flags) {{
// Primary format for float64 operate instructions: // Primary format for float64 operate instructions:
def format Float64Op(code, *flags) {{ def format Float64Op(code, *flags) {{
iop = InstObjParams(name, Name, 'MipsStaticInst', CodeBlock(code), flags) iop = InstObjParams(name, Name, 'MipsStaticInst', code, flags)
header_output = BasicDeclare.subst(iop) header_output = BasicDeclare.subst(iop)
decoder_output = BasicConstructor.subst(iop) decoder_output = BasicConstructor.subst(iop)
decode_block = BasicDecode.subst(iop) decode_block = BasicDecode.subst(iop)
@ -364,7 +364,7 @@ def format FloatPSCompareOp(cond_code1, cond_code2, *flags) {{
code += cond_code2 code += cond_code2
code += 'FCSR = genCCVector(FCSR, CC, cond2);}\n}' code += 'FCSR = genCCVector(FCSR, CC, cond2);}\n}'
iop = InstObjParams(name, Name, 'FPCompareOp', CodeBlock(code)) iop = InstObjParams(name, Name, 'FPCompareOp', code)
header_output = BasicDeclare.subst(iop) header_output = BasicDeclare.subst(iop)
decoder_output = BasicConstructor.subst(iop) decoder_output = BasicConstructor.subst(iop)
decode_block = BasicDecode.subst(iop) decode_block = BasicDecode.subst(iop)

View file

@ -224,7 +224,7 @@ output decoder {{
}}; }};
def format IntOp(code, *opt_flags) {{ def format IntOp(code, *opt_flags) {{
iop = InstObjParams(name, Name, 'IntOp', CodeBlock(code), opt_flags) iop = InstObjParams(name, Name, 'IntOp', code, opt_flags)
header_output = BasicDeclare.subst(iop) header_output = BasicDeclare.subst(iop)
decoder_output = BasicConstructor.subst(iop) decoder_output = BasicConstructor.subst(iop)
decode_block = RegNopCheckDecode.subst(iop) decode_block = RegNopCheckDecode.subst(iop)
@ -232,7 +232,7 @@ def format IntOp(code, *opt_flags) {{
}}; }};
def format IntImmOp(code, *opt_flags) {{ def format IntImmOp(code, *opt_flags) {{
iop = InstObjParams(name, Name, 'IntImmOp', CodeBlock(code), opt_flags) iop = InstObjParams(name, Name, 'IntImmOp', code, opt_flags)
header_output = BasicDeclare.subst(iop) header_output = BasicDeclare.subst(iop)
decoder_output = BasicConstructor.subst(iop) decoder_output = BasicConstructor.subst(iop)
decode_block = ImmNopCheckDecode.subst(iop) decode_block = ImmNopCheckDecode.subst(iop)
@ -248,7 +248,7 @@ def format HiLoOp(code, *opt_flags) {{
code += 'HI = val<63:32>;\n' code += 'HI = val<63:32>;\n'
code += 'LO = val<31:0>;\n' code += 'LO = val<31:0>;\n'
iop = InstObjParams(name, Name, 'HiLoOp', CodeBlock(code), opt_flags) iop = InstObjParams(name, Name, 'HiLoOp', code, opt_flags)
header_output = BasicDeclare.subst(iop) header_output = BasicDeclare.subst(iop)
decoder_output = BasicConstructor.subst(iop) decoder_output = BasicConstructor.subst(iop)
decode_block = BasicDecode.subst(iop) decode_block = BasicDecode.subst(iop)
@ -256,7 +256,7 @@ def format HiLoOp(code, *opt_flags) {{
}}; }};
def format HiLoMiscOp(code, *opt_flags) {{ def format HiLoMiscOp(code, *opt_flags) {{
iop = InstObjParams(name, Name, 'HiLoMiscOp', CodeBlock(code), opt_flags) iop = InstObjParams(name, Name, 'HiLoMiscOp', code, opt_flags)
header_output = BasicDeclare.subst(iop) header_output = BasicDeclare.subst(iop)
decoder_output = BasicConstructor.subst(iop) decoder_output = BasicConstructor.subst(iop)
decode_block = BasicDecode.subst(iop) decode_block = BasicDecode.subst(iop)

View file

@ -74,7 +74,7 @@ def template MTExecute {{
// Primary format for integer operate instructions: // Primary format for integer operate instructions:
def format MipsMT() {{ def format MipsMT() {{
code = 'panic(\"Mips MT Is Currently Unimplemented.\");\n' code = 'panic(\"Mips MT Is Currently Unimplemented.\");\n'
iop = InstObjParams(name, Name, 'MT', CodeBlock(code)) iop = InstObjParams(name, Name, 'MT', code)
header_output = BasicDeclare.subst(iop) header_output = BasicDeclare.subst(iop)
decoder_output = BasicConstructor.subst(iop) decoder_output = BasicConstructor.subst(iop)
decode_block = BasicDecode.subst(iop) decode_block = BasicDecode.subst(iop)

View file

@ -125,7 +125,7 @@ def template ImmNopCheckDecode {{
// Like BasicOperate format, but generates NOP if RC/FC == 31 // Like BasicOperate format, but generates NOP if RC/FC == 31
def format BasicOperateWithNopCheck(code, *opt_args) {{ def format BasicOperateWithNopCheck(code, *opt_args) {{
iop = InstObjParams(name, Name, 'MipsStaticInst', CodeBlock(code), iop = InstObjParams(name, Name, 'MipsStaticInst', code,
opt_args) opt_args)
header_output = BasicDeclare.subst(iop) header_output = BasicDeclare.subst(iop)
decoder_output = BasicConstructor.subst(iop) decoder_output = BasicConstructor.subst(iop)

View file

@ -70,9 +70,7 @@ def template TlbOpExecute {{
// Primary format for integer operate instructions: // Primary format for integer operate instructions:
def format TlbOp(code, *opt_flags) {{ def format TlbOp(code, *opt_flags) {{
orig_code = code iop = InstObjParams(name, Name, 'MipsStaticInst', code, opt_flags)
cblk = CodeBlock(code)
iop = InstObjParams(name, Name, 'MipsStaticInst', cblk, opt_flags)
header_output = BasicDeclare.subst(iop) header_output = BasicDeclare.subst(iop)
decoder_output = BasicConstructor.subst(iop) decoder_output = BasicConstructor.subst(iop)
decode_block = BasicDecodeWithMnemonic.subst(iop) decode_block = BasicDecodeWithMnemonic.subst(iop)

View file

@ -73,7 +73,7 @@ def format Trap(code, *flags) {{
code = 'warn(\"' code = 'warn(\"'
code += 'Trap Exception Handler Is Currently Not Implemented.' code += 'Trap Exception Handler Is Currently Not Implemented.'
code += '\");' code += '\");'
iop = InstObjParams(name, Name, 'MipsStaticInst', CodeBlock(code), flags) iop = InstObjParams(name, Name, 'MipsStaticInst', code, flags)
header_output = BasicDeclare.subst(iop) header_output = BasicDeclare.subst(iop)
decoder_output = BasicConstructor.subst(iop) decoder_output = BasicConstructor.subst(iop)
decode_block = BasicDecode.subst(iop) decode_block = BasicDecode.subst(iop)