Menu

#3712 void f4(__bit b, unsigned long long l) __reentrant

closed-fixed
MCS51
5
2026-01-12
2024-02-29
No

In [r14692], [bugs:#3711] has been fixed. However one assertion (currently disabled) in that tests fails for mcs51, the one in function f4. Apparently the parameter l is not passed correctly on mcs51 for the medium memory model (from the asm it looks like the peephole optimizer incorrectly thinks that the some of register parameter writes are dead stores and optimizes them out).

void f4(__bit b, unsigned long long l) __reentrant

Related

Bugs: #3711
Commit: [r14692]

Discussion

  • Philipp Klaus Krause

    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1,7 +1,6 @@
    -With https://sourceforge.net/p/sdcc/bugs/3711/ fixed, parameters to a function
    +In [r14692], [bugs:#3711] has been fixed. However one assertion (currently disabled) in that tests fails for mcs51, the one in function f4. Apparently the parameter l is not passed correctly on mcs51 for the medium memory model (from the asm it looks like the peephole optimizer incorrectly thinks that the some of register parameter writes  are dead stores and optimizes them out).
    
     ~~~~
     void f4(__bit b, unsigned long long l) __reentrant
     ~~~~
    
    -are not passed correctly.
    
     

    Related

    Bugs: #3711
    Commit: [r14692]

  • Philipp Klaus Krause

    • labels: --> mcs51, peephole optimizer, codegen
    • status: open --> closed-fixed
    • assigned_to: Philipp Klaus Krause
     
  • Philipp Klaus Krause

    Fixed in [r16058]; there was both a peephole optimizer bug affecting the caller, and a codegen bug affecting the callee.

     

    Related

    Commit: [r16058]


Log in to post a comment.

MongoDB Logo MongoDB