OBJ = $(COBJ) $(LOBJ) Lpars.o
GENH= errout.h\
- idfsize.h numsize.h strsize.h target_sizes.h \
+ idfsize.h numsize.h strsize.h target_sizes.h bigparam.h bigresult.h \
inputtype.h density.h squeeze.h nocross.h nostrict.h \
def.h debugcst.h type.h Lpars.h node.h desig.h strict3rd.h
HFILES= LLlex.h\
#AUTOAUTOAUTOAUTOAUTOAUTOAUTOAUTO
LLlex.o: LLlex.h
LLlex.o: Lpars.h
+LLlex.o: bigparam.h
LLlex.o: class.h
LLlex.o: const.h
LLlex.o: debug.h
main.o: LLlex.h
main.o: Lpars.h
main.o: SYSTEM.h
+main.o: bigparam.h
main.o: debug.h
main.o: debugcst.h
main.o: def.h
input.o: input.h
input.o: inputtype.h
type.o: LLlex.h
+type.o: bigparam.h
type.o: chk_expr.h
type.o: const.h
type.o: debug.h
type.o: warning.h
def.o: LLlex.h
def.o: Lpars.h
+def.o: bigparam.h
def.o: debug.h
def.o: debugcst.h
def.o: def.h
misc.o: misc.h
misc.o: node.h
enter.o: LLlex.h
+enter.o: bigparam.h
enter.o: debug.h
enter.o: debugcst.h
enter.o: def.h
enter.o: type.h
defmodule.o: LLlex.h
defmodule.o: Lpars.h
+defmodule.o: bigparam.h
defmodule.o: debug.h
defmodule.o: debugcst.h
defmodule.o: def.h
defmodule.o: target_sizes.h
defmodule.o: type.h
typequiv.o: LLlex.h
+typequiv.o: bigparam.h
typequiv.o: debug.h
typequiv.o: debugcst.h
typequiv.o: def.h
typequiv.o: type.h
typequiv.o: warning.h
node.o: LLlex.h
+node.o: bigparam.h
node.o: debug.h
node.o: debugcst.h
node.o: def.h
node.o: type.h
cstoper.o: LLlex.h
cstoper.o: Lpars.h
+cstoper.o: bigparam.h
cstoper.o: debug.h
cstoper.o: debugcst.h
cstoper.o: idf.h
cstoper.o: warning.h
chk_expr.o: LLlex.h
chk_expr.o: Lpars.h
+chk_expr.o: bigparam.h
chk_expr.o: chk_expr.h
chk_expr.o: const.h
chk_expr.o: debug.h
chk_expr.o: target_sizes.h
chk_expr.o: type.h
chk_expr.o: warning.h
+options.o: bigparam.h
options.o: class.h
options.o: idfsize.h
options.o: main.h
options.o: warning.h
walk.o: LLlex.h
walk.o: Lpars.h
+walk.o: bigparam.h
+walk.o: bigresult.h
walk.o: chk_expr.h
walk.o: debug.h
walk.o: debugcst.h
walk.o: walk.h
walk.o: warning.h
desig.o: LLlex.h
+desig.o: bigparam.h
desig.o: debug.h
desig.o: debugcst.h
desig.o: def.h
desig.o: warning.h
code.o: LLlex.h
code.o: Lpars.h
+code.o: bigparam.h
+code.o: bigresult.h
code.o: debug.h
code.o: debugcst.h
code.o: def.h
code.o: type.h
code.o: walk.h
lookup.o: LLlex.h
+lookup.o: bigparam.h
lookup.o: debug.h
lookup.o: debugcst.h
lookup.o: def.h
tokenfile.o: Lpars.h
program.o: LLlex.h
program.o: Lpars.h
+program.o: bigparam.h
program.o: debug.h
program.o: debugcst.h
program.o: def.h
program.o: warning.h
declar.o: LLlex.h
declar.o: Lpars.h
+declar.o: bigparam.h
declar.o: chk_expr.h
declar.o: debug.h
declar.o: debugcst.h
declar.o: warning.h
expression.o: LLlex.h
expression.o: Lpars.h
+expression.o: bigparam.h
expression.o: chk_expr.h
expression.o: const.h
expression.o: debug.h
expression.o: warning.h
statement.o: LLlex.h
statement.o: Lpars.h
+statement.o: bigparam.h
statement.o: def.h
statement.o: idf.h
statement.o: nocross.h
Lpars.o: Lpars.h
casestat.o: LLlex.h
casestat.o: Lpars.h
+casestat.o: bigparam.h
casestat.o: chk_expr.h
casestat.o: debug.h
casestat.o: debugcst.h
casestat.o: type.h
casestat.o: walk.h
tmpvar.o: LLlex.h
+tmpvar.o: bigparam.h
tmpvar.o: debug.h
tmpvar.o: debugcst.h
tmpvar.o: def.h
tmpvar.o: target_sizes.h
tmpvar.o: type.h
scope.o: LLlex.h
+scope.o: bigparam.h
scope.o: debug.h
scope.o: debugcst.h
scope.o: def.h
#include "Lpars.h"
#include "standards.h"
#include "walk.h"
+#include "bigresult.h"
extern char *long2str();
extern char *symbol2str();
assert(IsProc(left));
- if (result_tp = ResultType(left->nd_type)) {
- if (TooBigForReturnArea(result_tp)) {
- C_asp(-WA(result_tp->tp_size));
- }
+ result_tp = ResultType(left->nd_type);
+#ifdef BIG_RESULT_ON_STACK
+ if (result_tp && TooBigForReturnArea(result_tp)) {
+ C_asp(-WA(result_tp->tp_size));
}
+#endif
if (nd->nd_right) {
CodeParameters(ParamList(left->nd_type), nd->nd_right);
}
C_asp(left->nd_type->prc_nbpar);
if (result_tp) {
+ arith sz = WA(result_tp->tp_size);
if (TooBigForReturnArea(result_tp)) {
+#ifndef BIG_RESULT_ON_STACK
+ C_lfr(pointer_size);
+ C_loi(sz);
+#endif
}
- else C_lfr(WA(result_tp->tp_size));
+ else C_lfr(sz);
}
DoFilename(needs_fn);
DoLineno(nd);
#include "walk.h"
#include "misc.h"
#include "warning.h"
+#include "bigresult.h"
extern arith NewPtr();
extern arith NewInt();
register t_scope *procscope = procedure->prc_vis->sc_scope;
register t_type *tp;
register t_param *param;
- int too_big = 0; /* returnsize larger than returnarea */
+ label too_big = 0; /* returnsize larger than returnarea */
arith StackAdjustment = 0; /* space for conformant arrays */
arith retsav = 0; /* temporary space for return value */
arith func_res_size = 0;
if (tp) {
func_res_size = WA(tp->tp_size);
if (TooBigForReturnArea(tp)) {
- /* The result type of this procedure is constructed.
+#ifdef BIG_RESULT_ON_STACK
+ /* The result type of this procedure is too big.
The caller will have reserved space on its stack,
above the parameters, to store the result.
*/
too_big = 1;
+#else
+ /* The result type of this procedure is too big.
+ The actual procedure will return a pointer to a
+ global data area in which the function result is
+ stored.
+ Notice that this makes the code non-reentrant.
+ Here, we create the data area for the function
+ result.
+ */
+ too_big = ++data_label;
+ C_df_dlb(too_big);
+ C_bss_cst(func_res_size, (arith)0, 0);
+#endif BIG_RESULT_ON_STACK
}
}
/* Fill the data area reserved for the function result
with the result
*/
+#ifdef BIG_RESULT_ON_STACK
C_lal(procedure->df_type->prc_nbpar);
+#else
+ c_lae_dlb(too_big);
+#endif BIG_RESULT_ON_STACK
C_sti(func_res_size);
if (StackAdjustment) {
/* Remove copies of conformant arrays
LOL(StackAdjustment, pointer_size);
C_str((arith) 1);
}
+#ifdef BIG_RESULT_ON_STACK
func_res_size = 0;
+#else
+ c_lae_dlb(too_big);
+ func_res_size = pointer_size;
+#endif BIG_RESULT_ON_STACK
}
else if (StackAdjustment) {
/* First save the function result in a safe place.
C_ret(func_res_size);
C_beginpart(partno2);
C_pro(procscope->sc_name, -procscope->sc_off);
- C_ms_par(procedure->df_type->prc_nbpar +
- (too_big ? func_res_size : 0));
+ C_ms_par(procedure->df_type->prc_nbpar
+#ifdef BIG_RESULT_ON_STACK
+ + (too_big ? func_res_size : 0)
+#endif
+ );
if (! options['n']) WalkDefList(procscope->sc_def, RegisterMessage);
C_endpart(partno2);
C_end(-procscope->sc_off);
warning = "never used/assigned";
break;
case D_USED|D_VARPAR:
+#ifdef PASS_BIG_VAL_AS_VAR
if (df->df_type->tp_fund != T_EQUAL) {
warning = "never assigned, could be value parameter";
}
+#endif
break;
case D_USED:
warning = "never assigned";