comitted Bernhard's peephole 182a
authorjohanknol <johanknol@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Sun, 3 Jun 2001 16:33:27 +0000 (16:33 +0000)
committerjohanknol <johanknol@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Sun, 3 Jun 2001 16:33:27 +0000 (16:33 +0000)
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@866 4a8a32a2-be11-0410-ad9d-d568d2c75423

src/mcs51/peeph.def

index fd7f2cf59343472c6ac181bfba4eadbe40a1f140..64bf597ee2009c93302aa1bfc3367c7961fa7b4d 100644 (file)
@@ -1036,6 +1036,16 @@ replace {
         mov  dptr,#0x0000
 }
 
+// saving 3 bytes, 2 cycles
+// provided by Bernhard Held <bernhard.held@de.westinghouse.com>
+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