From a60bfaa1e7df0465a96195a619d6a398363347a9 Mon Sep 17 00:00:00 2001 From: tecodev Date: Mon, 27 Apr 2009 21:05:49 +0000 Subject: [PATCH] * src/pic16/gen.c (genNearPointerGet): fix double indirect access to bitfields (#2782405) git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@5439 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- ChangeLog | 9 ++++++--- src/pic16/gen.c | 6 +++--- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5db8a84e..f4db0784 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-04-27 Raphael Neider + + * src/pic16/gen.c (genNearPointerGet): fix double indirect + access to bitfields (#2782405) + 2009-04-27 Borut Razem * 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 * 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 diff --git a/src/pic16/gen.c b/src/pic16/gen.c index fa1d7a01..461b8b2d 100644 --- a/src/pic16/gen.c +++ b/src/pic16/gen.c @@ -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); -- 2.30.2