adapted for larger function result area
This commit is contained in:
parent
fb0051c85a
commit
21a8f93bc7
4 changed files with 14 additions and 5 deletions
|
@ -1 +1 @@
|
||||||
static char Version[] = "ACK Modula-2 compiler Version 0.46";
|
static char Version[] = "ACK Modula-2 compiler Version 0.47";
|
||||||
|
|
|
@ -176,6 +176,9 @@ extern arith
|
||||||
pointer_size; /* All from type.c */
|
pointer_size; /* All from type.c */
|
||||||
#endif NOCROSS
|
#endif NOCROSS
|
||||||
|
|
||||||
|
extern arith
|
||||||
|
ret_area_size;
|
||||||
|
|
||||||
extern arith
|
extern arith
|
||||||
align(); /* type.c */
|
align(); /* type.c */
|
||||||
|
|
||||||
|
@ -220,7 +223,7 @@ extern t_type
|
||||||
#define BaseType(tpx) ((tpx)->tp_fund == T_SUBRANGE ? (tpx)->tp_next : \
|
#define BaseType(tpx) ((tpx)->tp_fund == T_SUBRANGE ? (tpx)->tp_next : \
|
||||||
(tpx))
|
(tpx))
|
||||||
#define IsConstructed(tpx) ((tpx)->tp_fund & T_CONSTRUCTED)
|
#define IsConstructed(tpx) ((tpx)->tp_fund & T_CONSTRUCTED)
|
||||||
#define TooBigForReturnArea(tpx) ((tpx)->tp_size > dword_size)
|
#define TooBigForReturnArea(tpx) ((tpx)->tp_size > ret_area_size)
|
||||||
|
|
||||||
extern long full_mask[];
|
extern long full_mask[];
|
||||||
extern long max_int[];
|
extern long max_int[];
|
||||||
|
|
|
@ -52,6 +52,8 @@ arith
|
||||||
pointer_size = SZ_POINTER;
|
pointer_size = SZ_POINTER;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
arith ret_area_size;
|
||||||
|
|
||||||
t_type
|
t_type
|
||||||
*bool_type,
|
*bool_type,
|
||||||
*char_type,
|
*char_type,
|
||||||
|
@ -160,6 +162,9 @@ InitTypes()
|
||||||
fatal("long real size smaller than real size");
|
fatal("long real size smaller than real size");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ret_area_size = (int) double_size > ((int) pointer_size << 1) ?
|
||||||
|
double_size : (pointer_size << 1);
|
||||||
|
|
||||||
/* character type
|
/* character type
|
||||||
*/
|
*/
|
||||||
char_type = standard_type(T_CHAR, 1, (arith) 1);
|
char_type = standard_type(T_CHAR, 1, (arith) 1);
|
||||||
|
|
|
@ -553,13 +553,14 @@ WalkStat(nd, exit_label)
|
||||||
C_lol(tmp2);
|
C_lol(tmp2);
|
||||||
RangeCheck(nd->nd_type, left->nd_left->nd_type);
|
RangeCheck(nd->nd_type, left->nd_left->nd_type);
|
||||||
CodeDStore(nd);
|
CodeDStore(nd);
|
||||||
|
if (left->nd_INT >= 0) {
|
||||||
C_lol(tmp);
|
C_lol(tmp);
|
||||||
ForLoopVarExpr(nd);
|
ForLoopVarExpr(nd);
|
||||||
if (left->nd_INT >= 0) {
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
stepsize = -stepsize;
|
stepsize = -stepsize;
|
||||||
C_exg(int_size);
|
ForLoopVarExpr(nd);
|
||||||
|
C_lol(tmp);
|
||||||
}
|
}
|
||||||
C_sbu(int_size);
|
C_sbu(int_size);
|
||||||
if (stepsize) {
|
if (stepsize) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue