From 6c1ca597378b3b0f7b5bcbf3d421528f5a1a7eb9 Mon Sep 17 00:00:00 2001 From: johanknol Date: Sun, 3 Jun 2001 16:33:27 +0000 Subject: [PATCH] comitted Bernhard's peephole 182a git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@866 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- src/mcs51/peeph.def | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/mcs51/peeph.def b/src/mcs51/peeph.def index fd7f2cf5..64bf597e 100644 --- a/src/mcs51/peeph.def +++ b/src/mcs51/peeph.def @@ -1036,6 +1036,16 @@ replace { mov dptr,#0x0000 } +// saving 3 bytes, 2 cycles +// provided by Bernhard Held +replace { + mov dpl,#%1 + mov dph,#(%1 >> 8) +} by { + ; Peephole 182a use 16 bit load of DPTR + mov dptr,#%1 +} + // saving 3 byte, 2 cycles, return(float_constant) profits here replace { mov dpl,#%1 -- 2.47.2