Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#818 buggy banksel-directive generation

closed-fixed
5
2013-05-25
2004-09-25
Raphael Neider
No

Unfortunately the banksel-generation fails if two
skip-statements follow each other in the assembler file:

BTFSC STATUS,0
INCFSZ (var1),W,B
ADDWF (var2),F,B

is turned into

BTFSS STATUS,0
GOTO label_1
BANKSEL (var1)
INCFSNZ (var1),W,B
label_1:
GOTO label_2
BANKSEL (var2)
ADDWF (var2),F,B
label_2:

I fixed this by inserting the GOTO after the (new,
inverted) SKIP-statement, but inserting the banksel (as
before) after pc->prev.
This leeps the GOTO statement before the label
perceeding pc's instruction while inserting the BANKSEL
instruction after the label.

The change has to be done in pcode.c, line 6121, patch
attached.

Raphael Neider

Discussion

  • Raphael Neider
    Raphael Neider
    2004-09-25

    fix for banksel generation

     
    Attachments
  • Vangelis Rokas
    Vangelis Rokas
    2004-10-01

    Logged In: YES
    user_id=770505

    Patch applied and bug fixed in
    SDCC v.2.4.5 #851

     
  • Vangelis Rokas
    Vangelis Rokas
    2004-10-01

    • milestone: --> fixed
    • assigned_to: nobody --> vrokas
    • status: open --> closed-fixed