From: ceriel Date: Fri, 19 Jan 1990 11:30:16 +0000 (+0000) Subject: made allocation chunk size dependant on pointer size X-Git-Tag: release-5-5~1926 X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=f21378d6963271ba4b9836050359f7d0ed7e5d18;p=ack.git made allocation chunk size dependant on pointer size --- diff --git a/lang/cem/libcc/gen/ext_comp.c b/lang/cem/libcc/gen/ext_comp.c index e6b1edc15..ca37b8549 100644 --- a/lang/cem/libcc/gen/ext_comp.c +++ b/lang/cem/libcc/gen/ext_comp.c @@ -185,17 +185,14 @@ static int cmp_ext(e1, e2) struct EXTEND *e1, *e2; { - int sign = e1->sign ? -1 : 1; - - if (e1->sign > e2->sign) return -1; - if (e1->sign < e2->sign) return 1; - if (e1->exp < e2->exp) return -sign; - if (e1->exp > e2->exp) return sign; - if (e1->m1 < e2->m1) return -sign; - if (e1->m1 > e2->m1) return sign; - if (e1->m2 < e2->m2) return -sign; - if (e1->m2 > e2->m2) return sign; - return 0; + struct EXTEND tmp; + + e2->sign = ! e2->sign; + add_ext(e1, e2, &tmp); + e2->sign = ! e2->sign; + if (tmp.m1 == 0 && tmp.m2 == 0) return 0; + if (tmp->sign) return -1; + return 1; } static diff --git a/lang/cem/libcc/gen/malloc.c b/lang/cem/libcc/gen/malloc.c index b422a14e1..f72d08a7d 100644 --- a/lang/cem/libcc/gen/malloc.c +++ b/lang/cem/libcc/gen/malloc.c @@ -14,7 +14,11 @@ #define ptrint long #endif +#if EM_PSIZE == 2 +#define BRKSIZE 1024 +#else #define BRKSIZE 4096 +#endif #define PTRSIZE sizeof(char *) #define Align(x,a) (((x) + (a - 1)) & ~(a - 1)) #define NextSlot(p) (* (char **) ((p) - PTRSIZE))