diff --git a/src/core.cpp b/src/core.cpp index a0ce92a5..a80f6eda 100644 --- a/src/core.cpp +++ b/src/core.cpp @@ -62,7 +62,7 @@ void Core::step() { if (activeThreads == 0) return; - cout << "in step pc=0x" << hex << pc << '\n'; + //cout << "in step pc=0x" << hex << pc << '\n'; /* Fetch and decode. */ if (wordSize < sizeof(pc)) pc &= ((1ll<<(wordSize*8))-1); @@ -87,9 +87,9 @@ void Core::step() { interrupt(pf.notFound?1:2); } } while (fetchMore); - cout << "Fetched at 0x" << hex << pc << '\n'; + //cout << "Fetched at 0x" << hex << pc << '\n'; //cout << "0x" << hex << pc << ": " << *inst << '\n'; - cout << "sizeof(core)=" << dec << sizeof(*this) << '\n'; + //cout << "sizeof(core)=" << dec << sizeof(*this) << '\n'; #ifdef EMU_INSTRUMENTATION { Addr pcPhys(mem.virtToPhys(pc)); diff --git a/src/enc.cpp b/src/enc.cpp index 49a3e28d..4b44fc32 100644 --- a/src/enc.cpp +++ b/src/enc.cpp @@ -344,7 +344,7 @@ Instruction *WordDecoder::decode(const std::vector &v, Size &idx) { inst.setImmRef(*r); } - cout << "Decoded 0x" << hex << code << " into: " << inst << '\n'; + //cout << "Decoded 0x" << hex << code << " into: " << inst << '\n'; return &inst; } diff --git a/src/mem.cpp b/src/mem.cpp index 68885683..59caef77 100644 --- a/src/mem.cpp +++ b/src/mem.cpp @@ -51,7 +51,8 @@ MemDevice &MemoryUnit::ADecoder::doLookup(Addr a, Size &bit) { if (range == 0 || (a&((1ll<= range) { ADecoder *p(((a>>bit)&1)?oneChild:zeroChild); if (p) { bit--; return p->doLookup(a, bit); } - else {cout << "lookup failed.\n"; throw BadAddress();} + else {cout << "lookup of 0x" << hex << a << " failed.\n"; + throw BadAddress();} } else { return *md; } @@ -138,6 +139,7 @@ void MemoryUnit::write(Addr vAddr, Word w, bool sup) { } void MemoryUnit::tlbAdd(Addr virt, Addr phys, Word flags) { + cout << "tlbAdd(0x" << hex << virt << ", 0x" << phys << ", 0x" << flags << ")\n"; tlb[virt/pageSize] = TLBEntry(phys/pageSize, flags); } diff --git a/src/test/lib.s b/src/test/lib.s index 9878ba30..0e9cedcf 100644 --- a/src/test/lib.s +++ b/src/test/lib.s @@ -15,6 +15,7 @@ printdec: ldi %r8, #1; @p0 ? ldi %r6, #0x2d; @p0 ? st %r6, %r8, #0; @p0 ? neg %r7, %r7; + ldi %r9, #0; printdec_l1: modi %r6, %r7, #10; divi %r7, %r7, #10; addi %r6, %r6, #0x30; @@ -45,6 +46,6 @@ puts_l: ld %r6, %r7, #0; jmpi puts_l; puts_end: jmpr %r5 -.perm rw +.perm rwx .word digstack 0 .word 9