static int
_reg_parm (sym_link * l)
{
- if (regParmFlg == 2)
- return 0;
-
- regParmFlg++;
- return 1;
+ if (options.noRegParams)
+ {
+ return FALSE;
+ }
+ else
+ {
+ if (regParmFlg == 2)
+ {
+ return FALSE;
+ }
+ else
+ {
+ regParmFlg++;
+ return TRUE;
+ }
+ }
}
static bool
options.mainreturn = 1;
/* first the options part */
options.intlong_rent = 1;
-
+ options.noRegParams = 1;
/* Default code and data locations. */
options.code_loc = 0x200;
options.data_loc = 0x8000;
optimize.loopInduction = 0;
}
+/* Mangaling format:
+ _fun_policy_params
+ where:
+ policy is the function policy
+ params is the parameter format
+
+ policy format:
+ rsp
+ where:
+ r is 'r' for reentrant, 's' for static functions
+ s is 'c' for callee saves, 'r' for caller saves
+ p is 'p' for profiling on, 'x' for profiling off
+ examples:
+ rr - reentrant, caller saves
+ params format:
+ A combination of register short names and s to signify stack variables.
+ examples:
+ bds - first two args appear in BC and DE, the rest on the stack
+ s - all arguments are on the stack.
+*/
+static char *
+_mangleSupportFunctionName(char *original)
+{
+ char buffer[128];
+
+ if (TARGET_IS_Z80)
+ {
+ sprintf(buffer, "%s_rr%s_%s", original,
+ options.profile ? "f" : "x",
+ options.noRegParams ? "s" : "bds"
+ );
+ }
+ else
+ {
+ strcpy(buffer, original);
+ }
+
+ return gc_strdup(buffer);
+}
+
static const char *
_getRegName (struct regs *reg)
{
_reset_regparm,
_reg_parm,
_process_pragma,
+ _mangleSupportFunctionName,
TRUE,
0, /* leave lt */
0, /* leave gt */
_reset_regparm,
_reg_parm,
_process_pragma,
+ NULL,
TRUE,
0, /* leave lt */
0, /* leave gt */