From ddf81917ce9252158b62429867fa04fa6b55e47c Mon Sep 17 00:00:00 2001 From: vrokas Date: Fri, 26 May 2006 22:52:11 +0000 Subject: [PATCH] * src/pic16/gen.c (genFunction, genEndFunction): some beautifications, fixed bug with falsely restoring FSR2 in large stack model, thanks to Beau E. Cox for reporting the bug git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@4191 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- ChangeLog | 6 ++++++ src/pic16/gen.c | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5ca95622..55850b22 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2006-05-28 Vangelis Rokas + + * src/pic16/gen.c (genFunction, genEndFunction): some + beautifications, fixed bug with falsely restoring FSR2 in large + stack model, thanks to Beau E. Cox for reporting the bug + 2006-05-26 Maarten Brock * debugger/mcs51/break.c, diff --git a/src/pic16/gen.c b/src/pic16/gen.c index 14a0af8d..8e10f9c3 100644 --- a/src/pic16/gen.c +++ b/src/pic16/gen.c @@ -3773,9 +3773,9 @@ static void genFunction (iCode *ic) pic16_pushpCodeOp(pic16_popCopyReg(pic16_framepnt_hi)); pic16_pushpCodeOp(pic16_popCopyReg(pic16_framepnt_lo)); - pic16_emitpcode(POC_MOVFF, pic16_popCombine2( pic16_stackpnt_lo, pic16_framepnt_lo, 0)); if(STACK_MODEL_LARGE) pic16_emitpcode(POC_MOVFF, pic16_popCombine2( pic16_stackpnt_hi, pic16_framepnt_hi, 0)); + pic16_emitpcode(POC_MOVFF, pic16_popCombine2( pic16_stackpnt_lo, pic16_framepnt_lo, 0)); } } @@ -3928,9 +3928,9 @@ static void genEndFunction (iCode *ic) || FUNC_HASSTACKPARM(sym->etype) ) { /* restore stack frame */ + pic16_poppCodeOp( pic16_popCopyReg( pic16_framepnt_lo )); if(STACK_MODEL_LARGE) pic16_poppCodeOp( pic16_popCopyReg( pic16_framepnt_hi )); - pic16_poppCodeOp( pic16_popCopyReg( pic16_framepnt_lo )); } } -- 2.30.2