NULL
};
-
+static builtins __ds390_builtins[] = {
+ { "__builtin_memcpy_x2x","v",3,{"cx*","cx*","i"}}, /* void __builtin_memcpy_x2x (xdata char *,xdata char *,int) */
+ { "__builtin_memcpy_c2x","v",3,{"cx*","cp*","i"}}, /* void __builtin_memcpy_c2x (xdata char *,code char *,int) */
+ { "__builtin_memset_x","v",3,{"cx*","c","i"}}, /* void __builtin_memset (xdata char *,char,int) */
+ { NULL , NULL,0, {NULL}} /* mark end of table */
+};
void ds390_assignRegisters (eBBlock ** ebbs, int count);
static int regParmFlg = 0; /* determine if we can register a parameter */
port->s.fptr_size = 3;
port->s.gptr_size = 4;
- port->stack.isr_overhead++; /* Will save dpx on ISR entry. */
+ port->stack.isr_overhead += 2; /* Will save dpx on ISR entry. */
- port->stack.call_overhead++; /* This acounts for the extra byte
+ port->stack.call_overhead += 2; /* This acounts for the extra byte
* of return addres on the stack.
* but is ugly. There must be a
* better way.
{
fprintf (stderr,
"*** error: ds390 port only supports the 10 bit stack mode.\n");
+ } else {
+ if (!options.stack_loc) options.stack_loc = 0x400000;
}
/* generate native code 16*16 mul/div */
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;
0, /* leave == */
TRUE, /* we support array initializers. */
cseCostEstimation,
+ __ds390_builtins, /* table of builtin functions */
PORT_MAGIC
};