Bugs item #1786213, was opened at 2007-09-01 11:41
Message generated for change (Comment added) made by maartenbrock
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100599&aid=1786213&group_id=599
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: peephole optimizer
>Group: fixed
>Status: Closed
>Resolution: Fixed
Priority: 5
Private: No
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Maarten Brock (maartenbrock)
Summary: peephole optimizer optimizes out the code banking parameters
Initial Comment:
I have a banked function
void led_set( unsigned char state ) banked;
void led_set( unsigned char state ) banked
{
....
}
The generated code look like this:
; main.c:10: led_set( cnt );
; genCall
mov dpl,r2
push ar2
; Peephole 301 mov r0,#_led_set removed
; Peephole 301 mov r1,#(_led_set >> 8) removed
; Peephole 301 mov r2,#(_led_set >> 16) removed
lcall __sdcc_banked_call
the MOVs are for passing the function address to code banking function
it works ok with --no-peep option
----------------------------------------------------------------------
>Comment By: Maarten Brock (maartenbrock)
Date: 2007-09-04 10:41
Message:
Logged In: YES
user_id=888171
Originator: NO
Fixed in SDCC 2.7.3 #4908.
----------------------------------------------------------------------
Comment By: pkuhar (pkuhar)
Date: 2007-09-01 12:00
Message:
Logged In: YES
user_id=1690353
Originator: NO
Sorry I didn't login when submiting.
The asm code in the bug report was generated by calling the banked
function.
unsigned char cnt = 1;
led_set( cnt );
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100599&aid=1786213&group_id=599
|