* src/pic16/gen.c (genNearPointerGet): fix double indirect
authortecodev <tecodev@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Mon, 27 Apr 2009 21:05:49 +0000 (21:05 +0000)
committertecodev <tecodev@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Mon, 27 Apr 2009 21:05:49 +0000 (21:05 +0000)
  access to bitfields (#2782405)

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@5439 4a8a32a2-be11-0410-ad9d-d568d2c75423

ChangeLog
src/pic16/gen.c

index 5db8a84ef4b53d5642d8cc73715b37ca1461f15c..f4db078450e8e9c7bdf5d7ce80aa98f380bad2a9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2009-04-27 Raphael Neider <rneider AT web.de>
+
+        * src/pic16/gen.c (genNearPointerGet): fix double indirect
+          access to bitfields (#2782405)
+
 2009-04-27 Borut Razem <borut.razem AT siol.net>
 
        * fixed GCC 4.4.0 mingw compilation:
@@ -13,8 +18,6 @@
          replaced hh printf format specifier with parameter casting to
          unsigned char
 
-support\cpp\sdcpp-opts.c
-
 2009-04-19 Philipp Klaus Krause <pkk AT spth.de>
        * device/lib/z80/shift.s,
          device/lib/z80/memmove.s,
@@ -23,7 +26,7 @@ support\cpp\sdcpp-opts.c
          device/lib/z80/div.s,
          device/lib/z80/mod.s:
          Applied patch #2762516 from Marco Bodrato containing minor
-         improvementsof many Z80 asm routines.
+         improvements of many Z80 asm routines.
 
 2009-04-19 Philipp Klaus Krause <pkk AT spth.de>
 
index fa1d7a014660d3255e42ada3791a871ae15c8aa0..461b8b2d27aa5113f15b541c4f1018a86a75118a 100644 (file)
@@ -8199,7 +8199,7 @@ static void genNearPointerGet (operand *left,
 
 #if 1
     if(IS_BITFIELD( retype )
-      && (SPEC_BLEN(operandType(result))==1)
+      && (SPEC_BLEN(retype)==1)
     ) {
       iCode *nextic;
       pCodeOp *jop;
@@ -8224,8 +8224,8 @@ static void genNearPointerGet (operand *left,
             /* everything is ok then */
             /* find a way to optimize the genIfx iCode */
 
-            bytestrt = SPEC_BSTR(operandType(result))/8;
-            bitstrt = SPEC_BSTR(operandType(result))%8;
+            bytestrt = SPEC_BSTR(retype)/8;
+            bitstrt = SPEC_BSTR(retype)%8;
 
             jop = pic16_popCopyGPR2Bit(pic16_popGet(AOP(left), 0), bitstrt);