diff --git a/em.c b/em.c index 2f33428..e9713de 100644 --- a/em.c +++ b/em.c @@ -4032,7 +4032,7 @@ static inline arfa(int n, int val) { /* inline function to extract shift count from an instruction */ -static inline unsigned short shiftcount (inst) { +static inline unsigned short shiftcount (short inst) { unsigned short scount; scount = -inst & 077; if (scount == 0) @@ -4046,7 +4046,7 @@ static inline unsigned int lrs(unsigned int val, unsigned short inst) { unsigned short scount; scount = shiftcount(inst); - if (scount <= 32) { + if (scount < 32) { EXPCL(val & (((unsigned int)0x80000000) >> (32-scount))); return (*(int *)&val) >> scount; } else if (val & 0x80000000) { diff --git a/tm.note b/tm.note index d5791c8..dd435f4 100644 --- a/tm.note +++ b/tm.note @@ -67,7 +67,7 @@ Very fast test of HSA (High Speed Arithmetic). Use Ctrl-\ to kill the emulator and the test. Sense switch 14 (value 4) causes the pass to be displayed as the test executes. -$ ../src/em -boot tmrun/cput3 4n +$ ../src/em -boot tmrun/cput3 4 [Prime Emulator ver 104 Aug 8 2011]