mirror of
https://github.com/vortexgpgpu/vortex.git
synced 2025-04-24 05:47:35 -04:00
Fixed a bug in the decimal print assembly routine.
git-svn-id: http://www.cdkersey.com/harp/harptool@110 0246edb2-e076-4747-b392-db732a341fa2
This commit is contained in:
parent
bd2c5724f8
commit
7e5d60d883
4 changed files with 9 additions and 6 deletions
|
@ -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));
|
||||
|
|
|
@ -344,7 +344,7 @@ Instruction *WordDecoder::decode(const std::vector<Byte> &v, Size &idx) {
|
|||
inst.setImmRef(*r);
|
||||
}
|
||||
|
||||
cout << "Decoded 0x" << hex << code << " into: " << inst << '\n';
|
||||
//cout << "Decoded 0x" << hex << code << " into: " << inst << '\n';
|
||||
|
||||
return &inst;
|
||||
}
|
||||
|
|
|
@ -51,7 +51,8 @@ MemDevice &MemoryUnit::ADecoder::doLookup(Addr a, Size &bit) {
|
|||
if (range == 0 || (a&((1ll<<bit)-1)) >= 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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue