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
62 lines
1.8 KiB
Text
62 lines
1.8 KiB
Text
////////////////////////////////////////////////////////////////////
|
|
//
|
|
// Nop instruction
|
|
//
|
|
|
|
output header {{
|
|
/**
|
|
* Nop class.
|
|
*/
|
|
class Nop : public SparcStaticInst
|
|
{
|
|
public:
|
|
// Constructor
|
|
Nop(const char *mnem, ExtMachInst _machInst, OpClass __opClass) :
|
|
SparcStaticInst(mnem, _machInst, __opClass)
|
|
{
|
|
}
|
|
|
|
// All Nop instructions do the same thing, so this can be
|
|
// defined here. Nops can be defined directly, so there needs
|
|
// to be a default implementation
|
|
Fault execute(%(CPU_exec_context)s *xc,
|
|
Trace::InstRecord *traceData) const
|
|
{
|
|
//Nothing to see here, move along
|
|
return NoFault;
|
|
}
|
|
|
|
std::string generateDisassembly(Addr pc,
|
|
const SymbolTable *symtab) const;
|
|
};
|
|
}};
|
|
|
|
output decoder {{
|
|
std::string Nop::generateDisassembly(Addr pc,
|
|
const SymbolTable *symtab) const
|
|
{
|
|
std::stringstream response;
|
|
printMnemonic(response, mnemonic);
|
|
return response.str();
|
|
}
|
|
}};
|
|
|
|
def template NopExecute {{
|
|
Fault %(class_name)s::execute(%(CPU_exec_context)s *xc,
|
|
Trace::InstRecord *traceData) const
|
|
{
|
|
//Nothing to see here, move along
|
|
return NoFault;
|
|
}
|
|
}};
|
|
|
|
// Primary format for integer operate instructions:
|
|
def format Nop(code, *opt_flags) {{
|
|
orig_code = code
|
|
cblk = CodeBlock(code)
|
|
iop = InstObjParams(name, Name, 'Nop', cblk, opt_flags)
|
|
header_output = BasicDeclare.subst(iop)
|
|
decoder_output = BasicConstructor.subst(iop)
|
|
decode_block = BasicDecode.subst(iop)
|
|
exec_output = NopExecute.subst(iop)
|
|
}};
|