summaryrefslogtreecommitdiff
path: root/arch/sparc/isa/formats
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2006-03-28 19:36:34 -0500
committerGabe Black <gblack@eecs.umich.edu>2006-03-28 19:36:34 -0500
commit818f3ae22f324601742801b166350691cddf3a2a (patch)
treeb3b6f7fa63b2908371e20f943e94b50d7de1b33c /arch/sparc/isa/formats
parent1507bfb20a4053abb9f8eb1a97bafc800a9c934f (diff)
downloadgem5-818f3ae22f324601742801b166350691cddf3a2a.tar.xz
SPARC compiles for SE!
arch/sparc/isa/decoder.isa: Replaced register number munging with RdLow and RdHigh operands. arch/sparc/isa/formats/mem.isa: Fixed how the address calculation code is dealt with. arch/sparc/isa/operands.isa: Changed the tabbing so that the whole oeprands block was consistent, and added RdLow and RdHigh operands. These registers are used when Rd is meant to refer to a pair of registers, rather than just one. arch/sparc/isa_traits.hh: Moved some functions to the new (to SPARC) utility.hh file. Also, dummy Fpcr_DepTag and Uniq_DepTag DepTags were added to pacify Tru64. These need to be removed, and Tru64 needs to not be compiled in if it isn't appropriate. arch/sparc/regfile.hh: Changed regSpace to have the correct size. arch/sparc/utility.hh: A new file for sparc to match the one for alpha. --HG-- extra : convert_revision : ff6b529093d15f327ec11f067ad533bacdba9932
Diffstat (limited to 'arch/sparc/isa/formats')
-rw-r--r--arch/sparc/isa/formats/mem.isa13
1 files changed, 9 insertions, 4 deletions
diff --git a/arch/sparc/isa/formats/mem.isa b/arch/sparc/isa/formats/mem.isa
index cf6e7d95b..f1162e24b 100644
--- a/arch/sparc/isa/formats/mem.isa
+++ b/arch/sparc/isa/formats/mem.isa
@@ -52,10 +52,15 @@ def template MemExecute {{
// Primary format for integer operate instructions:
def format Mem(code, *opt_flags) {{
- orig_code = code
- cblk = CodeBlock(code)
- iop = InstObjParams(name, Name, 'SparcStaticInst', cblk, opt_flags)
- iop.ea_code = CodeBlock('EA = I ? (R1 + SIMM13) : R1 + R2;').code
+ addrCalc = 'EA = I ? (Rs1 + SIMM13) : Rs1 + Rs2;'
+ composite = code + '\n' + addrCalc
+ origCodeBlk = CodeBlock(code)
+ compositeBlk = CodeBlock(composite)
+ addrCalcBlk = CodeBlock(addrCalc)
+ iop = InstObjParams(name, Name, 'SparcStaticInst', compositeBlk, opt_flags)
+ iop.code = origCodeBlk.code
+ iop.orig_code = origCodeBlk.orig_code
+ iop.ea_code = addrCalcBlk.code
header_output = BasicDeclare.subst(iop)
decoder_output = BasicConstructor.subst(iop)
decode_block = BasicDecode.subst(iop)