summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
715485a)
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@5311
4a8a32a2-be11-0410-ad9d-
d568d2c75423
+2008-12-30 Philipp Klaus Krause <pkk AT spth.de>
+
+ * src/z80/gen.c,
+ src/z80/peeph-z80.def:
+ Minor addition improvement.
+
2008-12-30 Raphael Neider <rneider AT web.de>
* as/link/hc08/lkelf.c, as/link/lkaomf51.c, as/link/lklibr.c,
2008-12-30 Raphael Neider <rneider AT web.de>
* as/link/hc08/lkelf.c, as/link/lkaomf51.c, as/link/lklibr.c,
{
_moveA (aopGet (AOP (IC_LEFT (ic)), offset, FALSE));
if (offset == 0)
{
_moveA (aopGet (AOP (IC_LEFT (ic)), offset, FALSE));
if (offset == 0)
- emit2 ("add a,%s", aopGet (AOP (IC_RIGHT (ic)), offset, FALSE));
+ {
+ if(size == 0 && AOP_TYPE (IC_RIGHT (ic)) == AOP_LIT && ulFromVal (AOP (IC_RIGHT (ic))->aopu.aop_lit) == 1)
+ emit2 ("inc a");
+ else
+ emit2 ("add a,%s", aopGet (AOP (IC_RIGHT (ic)), offset, FALSE));
+ }
else
emit2 ("adc a,%s", aopGet (AOP (IC_RIGHT (ic)), offset, FALSE));
aopPut (AOP (IC_RESULT (ic)), "a", offset++);
else
emit2 ("adc a,%s", aopGet (AOP (IC_RIGHT (ic)), offset, FALSE));
aopPut (AOP (IC_RESULT (ic)), "a", offset++);
+replace restart {
+ ld l,%1 (ix)
+ ld h,%2 (ix)
+ ld a,(hl)
+ inc a
+ ld l,%1 (ix)
+ ld h,%2 (ix)
+ ld (hl),a
+} by {
+ ld l,%1 (ix)
+ ld h,%2 (ix)
+ inc (hl)
+ ; peephole 42c incremented in (hl) instead of going through a.
+} if notUsed('a')
+
+replace restart {
+ ld l,%1 (ix)
+ ld h,%2 (ix)
+ ld a,(hl)
+ dec a
+ ld l,%1 (ix)
+ ld h,%2 (ix)
+ ld (hl),a
+} by {
+ ld l,%1 (ix)
+ ld h,%2 (ix)
+ dec (hl)
+ ; peephole 42d decremented in (hl) instead of going through a.
+} if notUsed('a')
+
replace restart {
ld %1,a
ld a,%2
replace restart {
ld %1,a
ld a,%2