Check-in [cbe4b90bbd]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Comment out fprintfs.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:cbe4b90bbdf44b40ecd8a546f9b0e8fecc726ec7
User & Date: stephanie.gawroriski 2019-06-16 17:12:12
Context
2019-06-16
17:12
Remove include of mmap for Linux. check-in: f6ccaace32 user: stephanie.gawroriski tags: trunk
17:12
Comment out fprintfs. check-in: cbe4b90bbd user: stephanie.gawroriski tags: trunk
17:11
Add virtual pointers for 64-bit RatufaCoat which virtualizes some memory. check-in: f612155ba9 user: stephanie.gawroriski tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to ratufacoat/sjmerc.c.

641
642
643
644
645
646
647
648

649

650
651
652
653
654
655
656
....
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
....
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
	/* Within ROM region? */
	else if (vptr >= jvm->rombase && vptr < jvm->rombase + jvm->romsize)
		ptr = SJME_POINTER_OFFSET_LONG(jvm->rom, (vptr - jvm->rombase));
	
	/* No mapping found, pass through. */
	else
		ptr = oldptr;
	

	fprintf(stderr, "VPtr %p -> %p\n", oldptr, ptr);

	
	return ptr;
}
#endif

/**
 * Reads a value from memory.
................................................................................
		nextpc = cpu->pc;
		
		/* Read operation and determine encoding. */
		op = (sjme_memjreadp(jvm, 1, &nextpc) & SJME_JINT_C(0xFF));
		enc = ((op >= SJME_ENC_SPECIAL_A) ? op : (op & SJME_ENC_MASK));
		
		/* Temporary debug. */
#if 1
		fprintf(stderr,
			"ti=%d pc=%p op=%X cl=%s mn=%s mt=%s ln=%d jo=%x ja=%d\n",
			jvm->totalinstructions,
			cpu->pc,
			(unsigned int)op,
			(cpu->debugclassname == NULL ? NULL :
				SJME_POINTER_OFFSET_LONG(cpu->debugclassname, 2)),
................................................................................
					/* Get pointers to the real values. */
					ia = sjme_memread(jvm, 4, tempp,
						sjme_opdecodeui(jvm, &nextpc) * SJME_JINT_C(4));
					ib = sjme_memread(jvm, 4, tempp,
						sjme_opdecodeui(jvm, &nextpc) * SJME_JINT_C(4));
					ic = sjme_memread(jvm, 4, tempp,
						sjme_opdecodeui(jvm, &nextpc) * SJME_JINT_C(4));

					fprintf(stderr, "pool=%08x\n", r[SJME_POOL_REGISTER]);
					fprintf(stderr, "%08x %08x %08x\n", ia, ib, ic); 
#if defined(SJME_VIRTUAL_MEM)
					/* Map to real memory addresses. */
					cpu->debugclassname = sjme_realptr(jvm,
						SJME_JINT_TO_POINTER(ia));
					cpu->debugmethodname = sjme_realptr(jvm,
						SJME_JINT_TO_POINTER(ib));
					cpu->debugmethodtype = sjme_realptr(jvm,







|
>

>







 







|







 







|
<
<







641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
....
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
....
1502
1503
1504
1505
1506
1507
1508
1509


1510
1511
1512
1513
1514
1515
1516
	/* Within ROM region? */
	else if (vptr >= jvm->rombase && vptr < jvm->rombase + jvm->romsize)
		ptr = SJME_POINTER_OFFSET_LONG(jvm->rom, (vptr - jvm->rombase));
	
	/* No mapping found, pass through. */
	else
		ptr = oldptr;

#if 0
	fprintf(stderr, "VPtr %p -> %p\n", oldptr, ptr);
#endif
	
	return ptr;
}
#endif

/**
 * Reads a value from memory.
................................................................................
		nextpc = cpu->pc;
		
		/* Read operation and determine encoding. */
		op = (sjme_memjreadp(jvm, 1, &nextpc) & SJME_JINT_C(0xFF));
		enc = ((op >= SJME_ENC_SPECIAL_A) ? op : (op & SJME_ENC_MASK));
		
		/* Temporary debug. */
#if 0
		fprintf(stderr,
			"ti=%d pc=%p op=%X cl=%s mn=%s mt=%s ln=%d jo=%x ja=%d\n",
			jvm->totalinstructions,
			cpu->pc,
			(unsigned int)op,
			(cpu->debugclassname == NULL ? NULL :
				SJME_POINTER_OFFSET_LONG(cpu->debugclassname, 2)),
................................................................................
					/* Get pointers to the real values. */
					ia = sjme_memread(jvm, 4, tempp,
						sjme_opdecodeui(jvm, &nextpc) * SJME_JINT_C(4));
					ib = sjme_memread(jvm, 4, tempp,
						sjme_opdecodeui(jvm, &nextpc) * SJME_JINT_C(4));
					ic = sjme_memread(jvm, 4, tempp,
						sjme_opdecodeui(jvm, &nextpc) * SJME_JINT_C(4));
					


#if defined(SJME_VIRTUAL_MEM)
					/* Map to real memory addresses. */
					cpu->debugclassname = sjme_realptr(jvm,
						SJME_JINT_TO_POINTER(ia));
					cpu->debugmethodname = sjme_realptr(jvm,
						SJME_JINT_TO_POINTER(ib));
					cpu->debugmethodtype = sjme_realptr(jvm,