{
int size, offset = 0;
+#if 0
aopOp (IC_LEFT (sic), sic, FALSE, FALSE);
size = AOP_SIZE (IC_LEFT (sic));
fReturn[size], regs390[size].name);
}
}
+#else
+ // we know that dpl(hxb) is the result, so
+ _startLazyDPSEvaluation ();
+ size=getSize(operandType(IC_LEFT(sic)));
+ if (size>1) {
+ aopOp (IC_LEFT (sic), sic, FALSE, TRUE);
+ } else {
+ aopOp (IC_LEFT (sic), sic, FALSE, FALSE);
+ }
+ while (size--)
+ {
+ char *l = aopGet (AOP (IC_LEFT (sic)), offset,
+ FALSE, FALSE, TRUE);
+ if (strcmp (l, fReturn[offset]))
+ {
+ emitcode ("mov", "%s,%s",
+ fReturn[offset],
+ l);
+ }
+ offset++;
+ }
+ _endLazyDPSEvaluation ();
+#endif
freeAsmop (IC_LEFT (sic), NULL, sic, TRUE);
}
_G.sendSet = NULL;
{
int size, offset = 0;
- aopOp (IC_LEFT (sic), sic, FALSE, FALSE);
- size = AOP_SIZE (IC_LEFT (sic));
+ // we know that dpl(hxb) is the result, so
_startLazyDPSEvaluation ();
+ size=getSize(operandType(IC_LEFT(sic)));
+ if (size>1) {
+ aopOp (IC_LEFT (sic), sic, FALSE, TRUE);
+ } else {
+ aopOp (IC_LEFT (sic), sic, FALSE, FALSE);
+ }
while (size--)
{
char *l = aopGet (AOP (IC_LEFT (sic)), offset,
fputs ("mb = 0xD4\t\t; mb register unknown to assembler\n", of);
fputs ("mc = 0xD5\t\t; mc register unknown to assembler\n", of);
fputs ("F1 = 0xD1\t\t; F1 user flag unknown to assembler\n", of);
+ fputs ("_ESP = 0x9B\t\t; ESP user flag unknown to assembler\n", of);
}
/* Generate interrupt vector table. */
static bool cseCostEstimation (iCode *ic, iCode *pdic)
{
operand *result = IC_RESULT(ic);
- operand *right = IC_RIGHT(ic);
- operand *left = IC_LEFT(ic);
+ //operand *right = IC_RIGHT(ic);
+ //operand *left = IC_LEFT(ic);
sym_link *result_type = operandType(result);
- sym_link *right_type = (right ? operandType(right) : 0);
- sym_link *left_type = (left ? operandType(left) : 0);
+ //sym_link *right_type = (right ? operandType(right) : 0);
+ //sym_link *left_type = (left ? operandType(left) : 0);
/* if it is a pointer then return ok for now */
if (IC_RESULT(ic) && IS_PTR(result_type)) return 1;
%$(OBJEXT): %.c
$(SDCC) $(SDCCFLAGS) -c $<
-# run simulator with 5 seconds timeout
+# run simulator with 10 seconds timeout
%.out: %$(EXEEXT) fwk/lib/timeout
mkdir -p `dirname $@`
- -fwk/lib/timeout 5 $(S51) -tds390f -S in=/dev/null,out=$@ $< < $(PORTS_DIR)/ds390/uCsim.cmd >/dev/null || \
+ -fwk/lib/timeout 10 $(S51) -tds390f -S in=/dev/null,out=$@ $< < $(PORTS_DIR)/ds390/uCsim.cmd >/dev/null || \
echo -e --- FAIL: \"timeout, simulation killed\" in $(<:.ihx=.c)"\n"--- Summary: 1/1/1: timeout >> $@
-grep -n FAIL $@ /dev/null || true
%$(OBJEXT): %.c
$(SDCC) $(SDCCFLAGS) -c $<
-# run simulator with 5 seconds timeout
+# run simulator with 10 seconds timeout
%.out: %$(EXEEXT) fwk/lib/timeout
mkdir -p `dirname $@`
- -fwk/lib/timeout 6 $(S51) -t32 -S in=/dev/null,out=$@ $< < $(PORTS_DIR)/mcs51/uCsim.cmd >/dev/null \
+ -fwk/lib/timeout 10 $(S51) -t32 -S in=/dev/null,out=$@ $< < $(PORTS_DIR)/mcs51/uCsim.cmd >/dev/null \
|| echo -e --- FAIL: \"timeout, simulation killed\" in $(<:.ihx=.c)"\n"--- Summary: 1/1/1: timeout >> $@
-grep -n FAIL $@ /dev/null || true
/** Function pointer tests.
+
+ type: char, int, long
*/
#include <testfwk.h>
on the z80.
*/
typedef void (*NOARGFUNPTR)(void);
-typedef void (*ONEARGFUNPTR)(int) REENTRANT;
+typedef void (*ONEARGFUNPTR)({type}) REENTRANT;
int count;
}
void
-incBy(int a) REENTRANT
+incBy({type} a) REENTRANT
{
count += a;
}
}
void
-callViaPtr2(ONEARGFUNPTR fptr, int arg)
+callViaPtr2(ONEARGFUNPTR fptr, {type} arg)
{
(*fptr)(arg);
}