5c79eb0410
arch/sparc/isa/base.isa: arch/sparc/isa/decoder.isa: arch/sparc/isa/formats.isa: arch/sparc/isa/formats/branch.isa: arch/sparc/isa/formats/integerop.isa: arch/sparc/isa/formats/mem.isa: arch/sparc/isa/formats/nop.isa: arch/sparc/isa/formats/trap.isa: arch/sparc/isa/formats/unknown.isa: arch/sparc/isa/includes.isa: arch/sparc/isa/operands.isa: Fixes towards running in syscall emulation mode. arch/sparc/linux/process.cc: Fixed the assert and comment to check that the Num_Syscall_Descs is less than or equal to 284. Why does this assert need to exist anyway? base/loader/elf_object.cc: Cleared out comments about resolved issues. cpu/simple/cpu.cc: Use NNPC for both SPARC and MIPS, instead of just MIPS configs/test/hello_sparc: A test program for SPARC which prints "Hello World!" --HG-- rename : arch/sparc/isa/formats/noop.isa => arch/sparc/isa/formats/nop.isa extra : convert_revision : 10b3e3b9f21c215d809cffa930448007102ba698
54 lines
1.4 KiB
Text
54 lines
1.4 KiB
Text
////////////////////////////////////////////////////////////////////
|
|
//
|
|
// Trap instructions
|
|
//
|
|
|
|
output header {{
|
|
/**
|
|
* Base class for trap instructions,
|
|
* or instructions that always fault.
|
|
*/
|
|
class Trap : public SparcStaticInst
|
|
{
|
|
protected:
|
|
|
|
// Constructor
|
|
Trap(const char *mnem, ExtMachInst _machInst, OpClass __opClass) :
|
|
SparcStaticInst(mnem, _machInst, __opClass)
|
|
{
|
|
}
|
|
|
|
std::string generateDisassembly(Addr pc,
|
|
const SymbolTable *symtab) const;
|
|
};
|
|
}};
|
|
|
|
output decoder {{
|
|
std::string Trap::generateDisassembly(Addr pc,
|
|
const SymbolTable *symtab) const
|
|
{
|
|
return "Trap instruction";
|
|
}
|
|
}};
|
|
|
|
def template TrapExecute {{
|
|
Fault %(class_name)s::execute(%(CPU_exec_context)s *xc,
|
|
Trace::InstRecord *traceData) const
|
|
{
|
|
Fault fault = NoFault;
|
|
%(op_decl)s;
|
|
%(op_rd)s;
|
|
%(code)s
|
|
return fault;
|
|
}
|
|
}};
|
|
|
|
def format Trap(code, *opt_flags) {{
|
|
orig_code = code
|
|
cblk = CodeBlock(code)
|
|
iop = InstObjParams(name, Name, 'Trap', cblk, opt_flags)
|
|
header_output = BasicDeclare.subst(iop)
|
|
decoder_output = BasicConstructor.subst(iop)
|
|
decode_block = BasicDecode.subst(iop)
|
|
exec_output = TrapExecute.subst(iop)
|
|
}};
|