From 029560ea7ae706a4fee8ad11db1585d5e19a4120 Mon Sep 17 00:00:00 2001 From: tecodev Date: Fri, 5 Aug 2005 09:29:01 +0000 Subject: [PATCH] * src/pic16/gen.c (pic16_aopGet): fixed handling of offsets in AOP_PCODE operands, fixes multibyte union-bitfield-accesses git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@3831 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- ChangeLog | 5 +++++ src/pic16/gen.c | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 24e2a802..1e512744 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2005-08-05 Raphael Neider + + * src/pic16/gen.c (pic16_aopGet): fixed handling of offsets in + AOP_PCODE operands, fixes multibyte union-bitfield-accesses + 2005-08-04 Jesus Calvino-Fraga * device/include/mcs51/at89c51ed2.h, device/include/mcs51/p89v51rd2.h, diff --git a/src/pic16/gen.c b/src/pic16/gen.c index b3fd8105..75b9b3a7 100644 --- a/src/pic16/gen.c +++ b/src/pic16/gen.c @@ -1584,9 +1584,9 @@ char *pic16_aopGet (asmop *aop, int offset, bool bit16, bool dname) DEBUGpic16_emitcode(";","%s offset %d",pcop->name,PCOI(pcop)->offset); //sprintf(s,"(%s+0x%02x)", pcop->name,PCOI(aop->aopu.pcop)->offset); if (offset) { - sprintf(s,"(%s + %d)", pcop->name, offset); + sprintf(s,"(%s + %d)", pic16_get_op (pcop, NULL, 0), offset); } else { - sprintf(s,"%s", pcop->name); + sprintf(s,"%s", pic16_get_op (pcop, NULL, 0)); } } else sprintf(s,"0x%02x", PCOI(aop->aopu.pcop)->offset); @@ -7471,7 +7471,7 @@ static void genAnd (iCode *ic, iCode *ifx) bp -= 8; ofs++; } - + pic16_emitpcode(((rIfx.condition) ? POC_BTFSC : POC_BTFSS), pic16_newpCodeOpBit(pic16_aopGet(AOP(left),ofs,FALSE,FALSE),bp,0, PO_GPR_REGISTER)); -- 2.47.2