projects
/
fw
/
sdcc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
added seperate segments for initialized data
[fw/sdcc]
/
src
/
ds390
/
gen.c
diff --git
a/src/ds390/gen.c
b/src/ds390/gen.c
index 9db62c56fb76c3b536565bb9939fa58f8d14976e..10508322f85c5e40cdedb8a8824301277b8851be 100644
(file)
--- a/
src/ds390/gen.c
+++ b/
src/ds390/gen.c
@@
-1842,10
+1842,10
@@
saveRegisters (iCode * lic)
rsave = bitVectSetBit(rsave,i);
}
} else {
rsave = bitVectSetBit(rsave,i);
}
} else {
-
/* find the registers in use at this tim
e
-
and push them away to safety
*/
-
rsave = bitVectCplAnd (bitVectCopy (ic->rMask),
-
ic->rUsed
);
+
/* safe the registers in use at this time but skip th
e
+
ones for the result
*/
+ rsave = bitVectCplAnd (bitVectCopy (ic->rMask),
+
ds390_rUmaskForOp (IC_RESULT(ic))
);
}
ic->regsSaved = 1;
if (options.useXstack)
}
ic->regsSaved = 1;
if (options.useXstack)
@@
-1896,10
+1896,10
@@
unsaveRegisters (iCode * ic)
rsave = bitVectSetBit(rsave,i);
}
} else {
rsave = bitVectSetBit(rsave,i);
}
} else {
-
/* find the registers in use at this tim
e
-
and push them away to safety
*/
- rsave = bitVectCplAnd (bitVectCopy (ic->rMask),
-
ic->rUsed
);
+
/* restore the registers in use at this time but skip th
e
+
ones for the result
*/
+ rsave = bitVectCplAnd (bitVectCopy (ic->rMask),
+
ds390_rUmaskForOp (IC_RESULT(ic))
);
}
if (options.useXstack)
{
}
if (options.useXstack)
{
@@
-3666,7
+3666,7
@@
genPlus (iCode * ic)
while (size--)
{
MOVA (aopGet (AOP (IC_RIGHT (ic)), offset, FALSE, FALSE, TRUE));
while (size--)
{
MOVA (aopGet (AOP (IC_RIGHT (ic)), offset, FALSE, FALSE, TRUE));
- emitcode ("addc", "a,#0
0
");
+ emitcode ("addc", "a,#0");
aopPut (AOP (IC_RESULT (ic)), "a", offset++);
}
_endLazyDPSEvaluation ();
aopPut (AOP (IC_RESULT (ic)), "a", offset++);
}
_endLazyDPSEvaluation ();
@@
-5062,24
+5062,24
@@
genCmp (operand * left, operand * right,
CLRC;
while (size--)
{
CLRC;
while (size--)
{
- emitcode (";", "genCmp #1: %d/%d/%d", size, sign, offset);
+
//
emitcode (";", "genCmp #1: %d/%d/%d", size, sign, offset);
MOVA (aopGet (AOP (left), offset, FALSE, FALSE, TRUE));
MOVA (aopGet (AOP (left), offset, FALSE, FALSE, TRUE));
- emitcode (";", "genCmp #2");
+
//
emitcode (";", "genCmp #2");
if (sign && (size == 0))
{
if (sign && (size == 0))
{
- emitcode (";", "genCmp #3");
+
//
emitcode (";", "genCmp #3");
emitcode ("xrl", "a,#0x80");
if (AOP_TYPE (right) == AOP_LIT)
{
unsigned long lit = (unsigned long)
floatFromVal (AOP (right)->aopu.aop_lit);
emitcode ("xrl", "a,#0x80");
if (AOP_TYPE (right) == AOP_LIT)
{
unsigned long lit = (unsigned long)
floatFromVal (AOP (right)->aopu.aop_lit);
- emitcode (";", "genCmp #3.1");
+
//
emitcode (";", "genCmp #3.1");
emitcode ("subb", "a,#!constbyte",
0x80 ^ (unsigned int) ((lit >> (offset * 8)) & 0x0FFL));
}
else
{
emitcode ("subb", "a,#!constbyte",
0x80 ^ (unsigned int) ((lit >> (offset * 8)) & 0x0FFL));
}
else
{
- emitcode (";", "genCmp #3.2");
+
//
emitcode (";", "genCmp #3.2");
if (AOP_NEEDSACC (right))
{
emitcode ("push", "acc");
if (AOP_NEEDSACC (right))
{
emitcode ("push", "acc");
@@
-5098,11
+5098,11
@@
genCmp (operand * left, operand * right,
{
const char *s;
{
const char *s;
- emitcode (";", "genCmp #4");
+
//
emitcode (";", "genCmp #4");
if (AOP_NEEDSACC (right))
{
/* Yuck!! */
if (AOP_NEEDSACC (right))
{
/* Yuck!! */
- emitcode (";", "genCmp #4.1");
+
//
emitcode (";", "genCmp #4.1");
emitcode ("xch", "a, b");
MOVA (aopGet (AOP (right), offset++, FALSE, FALSE, TRUE));
emitcode ("xch", "a, b");
emitcode ("xch", "a, b");
MOVA (aopGet (AOP (right), offset++, FALSE, FALSE, TRUE));
emitcode ("xch", "a, b");
@@
-5110,7
+5110,7
@@
genCmp (operand * left, operand * right,
}
else
{
}
else
{
- emitcode (";", "genCmp #4.2");
+
//
emitcode (";", "genCmp #4.2");
s = aopGet (AOP (right), offset++, FALSE, FALSE, FALSE);
}
s = aopGet (AOP (right), offset++, FALSE, FALSE, FALSE);
}
@@
-7831,7
+7831,7
@@
genLeftShiftLiteral (operand * left,
aopOp(left, ic, FALSE, FALSE);
aopOp(result, ic, FALSE, (AOP_TYPE(left) == AOP_DPTR));
aopOp(left, ic, FALSE, FALSE);
aopOp(result, ic, FALSE, (AOP_TYPE(left) == AOP_DPTR));
-#if
1
// debug spew
+#if
0
// debug spew
if (IS_SYMOP(left) && OP_SYMBOL(left)->aop)
{
emitcode(";", "left (%s) is %d", OP_SYMBOL(left)->rname, AOP_TYPE(left));
if (IS_SYMOP(left) && OP_SYMBOL(left)->aop)
{
emitcode(";", "left (%s) is %d", OP_SYMBOL(left)->rname, AOP_TYPE(left));