2 Dec 2005 04:42
Unbreak CRIS sim: fix -gen-decode-insn-entry. And why the widened mem fetch?
Hans-Peter Nilsson <hans-peter.nilsson <at> axis.com>
2005-12-02 03:42:35 GMT
2005-12-02 03:42:35 GMT
Dave Brolley's changes broke the CRIS sim in at least two
places: in CGEN (see further below) and by assuming that all
sims also have CGEN disassemblers (film at 11). Tsk tsk.
*Please* regen, cgen-maint-rebuild and test all CGEN simulators
when hacking general changes into the CGEN sim machinery. It's
not like there are too many...
Anyway, I think I unbroke it (clean test-results), but I'm not
sure this is the best change. I don't like these diffs in the
generated sim (this one seemingly unrelated to the breakage,
maybe it's due to Jim Blandy's change on 2005-05-16):
Index: cpuv10.h
<at> <at> -684,9 +684,9 <at> <at> struct scache {
unsigned int length;
#define EXTRACT_IFMT_MOVUCWR_CODE \
length = 4; \
- word_1 = GETIMEMUHI (current_cpu, pc + 2); \
+ word_1 = GETIMEMUSI (current_cpu, pc + 2); \
f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); \
- f_indir_pc__word = (0|(EXTRACT_LSB0_UINT (word_1, 16, 15, 16) << 0)); \
+ f_indir_pc__word = (0|(EXTRACT_LSB0_UINT (word_1, 32, 15, 16) << 0)); \
f_mode = EXTRACT_LSB0_UINT (insn, 16, 11, 2); \
f_opcode = EXTRACT_LSB0_UINT (insn, 16, 9, 4); \
f_size = EXTRACT_LSB0_UINT (insn, 16, 5, 2); \
Why fetch more than needed? Can't that cause spurious invalid
accesses at the end of defined memory? Doesn't it slow down the
simulator? (Hm, I guess I can measure that...) I don't have
the full context of all cases when this can happen, but for the
(Continue reading)
RSS Feed