summaryrefslogtreecommitdiff
path: root/bcc
diff options
context:
space:
mode:
authorRobert de Bath <rdebath@poboxes.com>1999-01-23 13:29:22 +0100
committerLubomir Rintel <lkundrak@v3.sk>2013-10-23 23:40:39 +0200
commite62b35169cdcd13632ae353b1e5ffde7dec44201 (patch)
tree2646548ca84edb365354a6e68459f92943532cee /bcc
parent2233d47f9d89c107b6c425626d6eb2669363b055 (diff)
downloaddev86-e62b35169cdcd13632ae353b1e5ffde7dec44201.tar.gz
Import Dev86src-0.14.7.tar.gzv0.14.7
Diffstat (limited to 'bcc')
-rw-r--r--bcc/assign.c2
-rw-r--r--bcc/const.h2
-rw-r--r--bcc/exptree.c9
-rw-r--r--bcc/function.c4
-rw-r--r--bcc/genloads.c6
-rw-r--r--bcc/preproc.c10
6 files changed, 30 insertions, 3 deletions
diff --git a/bcc/assign.c b/bcc/assign.c
index 73a9883..5f25cc0 100644
--- a/bcc/assign.c
+++ b/bcc/assign.c
@@ -83,12 +83,14 @@ struct symstruct *target;
storereg(i, target);
}
}
+#ifdef I8088
else if (tscalar & FLOAT)
{
target->indcount = 1; /* XXX outnnadr clobbers this */
target->offset.offi += accregsize;
storereg(DATREG2, target);
}
+#endif
target->storage = source->storage;
target->offset.offi = 0;
}
diff --git a/bcc/const.h b/bcc/const.h
index cd1f16e..2383a30 100644
--- a/bcc/const.h
+++ b/bcc/const.h
@@ -43,9 +43,11 @@
typedef long no_hope;
#else
+#ifndef NO_I80386
# define I80386 /* Little BCC doesn't need 386 */
#endif
#endif
+#endif
#ifdef MC6809
# define DYNAMIC_LONG_ORDER 0 /* have to define it so it works in #if's */
diff --git a/bcc/exptree.c b/bcc/exptree.c
index 0f95439..d3e6386 100644
--- a/bcc/exptree.c
+++ b/bcc/exptree.c
@@ -940,8 +940,13 @@ struct nodestruct *nodeptr;
}
nodeptr->left.nodeptr = left = unconvert(left);
nodeptr->right = right = unconvert(right);
- if ((targtype = left->nodetype) == right->nodetype)
- return targtype; /* XXX - reduced from promote(targtype) */
+ if (
+#ifdef I80386
+ i386_32 ||
+#endif
+ ((targtype = left->nodetype)->scalar & FLOAT ) == 0)
+ if (targtype == right->nodetype)
+ return targtype; /* XXX - reduced from promote(targtype) */
if ((lscalar = targtype->scalar) != 0 &&
(rscalar = right->nodetype->scalar) != 0)
{
diff --git a/bcc/function.c b/bcc/function.c
index db2745d..0407028 100644
--- a/bcc/function.c
+++ b/bcc/function.c
@@ -98,8 +98,10 @@ struct symstruct *source;
{
if (source->type->scalar & DOUBLE)
source->storage = doublreturnregs;
+#ifdef I8088
else if (source->type->scalar & FLOAT)
source->storage = RETURNREG|DATREG2;
+#endif
else
source->storage = RETURNREG;
}
@@ -210,8 +212,10 @@ PUBLIC void loadretexpression()
{
if (returntype->scalar & DOUBLE)
loadexpression(doublreturnregs, returntype);
+#ifdef I8088
else if (returntype->scalar & FLOAT)
loadexpression(/* REURNREG|*/ DATREG2, returntype);
+#endif
else
loadexpression(RETURNREG, returntype);
}
diff --git a/bcc/genloads.c b/bcc/genloads.c
index b39856e..9aff996 100644
--- a/bcc/genloads.c
+++ b/bcc/genloads.c
@@ -348,12 +348,14 @@ store_pt targreg;
return;
if (source->storage == CONSTANT)
{
+#ifdef I80386
if (i386_32)
{
loadconst(((offset_T *) source->offset.offd)[0], DREG);
loadconst(((offset_T *) source->offset.offd)[1], targreg&~DREG);
}
else /* XXX - more for non-386 */
+#endif
{
int regs, i, off=1;
loadconst(((unsigned short *) source->offset.offd)[0], DREG);
@@ -394,7 +396,11 @@ store_pt targreg;
loadconst(((unsigned short *) &val)[1], targreg&~DREG);
}
}
+#ifdef I80386
else if (!i386_32 && source->type->scalar & FLOAT)
+#else
+ else if (source->type->scalar & FLOAT)
+#endif
{
/* Treat a float just like a long ... */
if (source->indcount == 0)
diff --git a/bcc/preproc.c b/bcc/preproc.c
index 507591f..84262e6 100644
--- a/bcc/preproc.c
+++ b/bcc/preproc.c
@@ -323,7 +323,8 @@ ts_s_macstring += 2;
{
gch1();
skipcomment();
- ch = *--lineptr = ' '; /* comment is space in modern cpp's */
+ /* comment is space in modern cpp's but they have '##' too */
+ ch = *--lineptr = ' ';
}
}
#ifdef TS
@@ -547,7 +548,14 @@ ts_s_macparam_tot += sizeof *paramlist * nparleft;
blanks();
}
if (ch != '(')
+ {
+ if (nparleft > 0) /* macro has params, doesn't match bare word */
+ {
+ outstr(symptr->name.namea);
+ return;
+ }
error("missing '('");
+ }
else
{
gch1();