projects
/
fw
/
sdcc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
* src/pic16/gen.c (genSkipc): fixed semantics (execute branch
[fw/sdcc]
/
src
/
pic16
/
gen.c
diff --git
a/src/pic16/gen.c
b/src/pic16/gen.c
index aa092a06e6b7669a9a2ef64a0f5cda6e3925c602..3164667a94c7ea4a162468ce7802475107a2ca28 100644
(file)
--- a/
src/pic16/gen.c
+++ b/
src/pic16/gen.c
@@
-4837,9
+4837,9
@@
static void genSkipc(resolvedIfx *rifx)
return;
if(rifx->condition)
return;
if(rifx->condition)
- emitSKPC;
- else
emitSKPNC;
emitSKPNC;
+ else
+ emitSKPC;
pic16_emitpcode(POC_GOTO, pic16_popGetLabel(rifx->lbl->key));
rifx->generated = 1;
pic16_emitpcode(POC_GOTO, pic16_popGetLabel(rifx->lbl->key));
rifx->generated = 1;
@@
-5040,7
+5040,7
@@
static void genCmp (operand *left,operand *right,
} // if
// This fails for lit = 0xFF (unsigned) AND lit = 0x7F (signed),
} // if
// This fails for lit = 0xFF (unsigned) AND lit = 0x7F (signed),
- // that's we handled it above.
+ // that's w
hy w
e handled it above.
lit++;
dummy = left;
lit++;
dummy = left;
@@
-5144,7
+5144,7
@@
result_in_carry:
* now CARRY contains the result of the comparison: *
* SUBWF sets CARRY iff *
* F-W >= 0 <==> F >= W <==> !(F < W) *
* now CARRY contains the result of the comparison: *
* SUBWF sets CARRY iff *
* F-W >= 0 <==> F >= W <==> !(F < W) *
- * (F=left, W=right)
+ * (F=left, W=right)
*
****************************************************/
if (performedLt) {
****************************************************/
if (performedLt) {
@@
-5170,10
+5170,8
@@
correct_result_in_carry:
} // if (result)
// perform conditional jump
} // if (result)
// perform conditional jump
- // genSkipc branches to rifx->label if (rifx->condition != CARRY)
if (ifx) {
//DEBUGpc ("generate control flow");
if (ifx) {
//DEBUGpc ("generate control flow");
- rIfx.condition ^= 1;
genSkipc (&rIfx);
ifx->generated = 1;
} // if
genSkipc (&rIfx);
ifx->generated = 1;
} // if