Menu

#3824 Broken peephole rule in z80-related ports

closed-fixed
None
other
5
2025-01-29
2025-01-22
No

Peephole rule 164 is broken (in peeph.def, i.e. the common rules for all z80-related ports). Apparently, this led to a regression observed by gbdk developers using the sm83 port when they were testing SDCC 4.5.0 RC2. I was able to come up with a small code sample to reproduce the issue using the z80 port:

char f(char *c);

void g(void)
{
    char c[4];
    if(f(c))
        return;
    if(f(c))
        return;
}

Discussion

  • Philipp Klaus Krause

    • status: open --> pending-fixed
     
  • Philipp Klaus Krause

    Fixed in the next branch in [r15241].

     

    Related

    Commit: [r15241]

  • Philipp Klaus Krause

    • status: pending-fixed --> closed-fixed
    • assigned_to: Philipp Klaus Krause
     
  • Philipp Klaus Krause

    The fix has been merged to trunk an is in SDCC 4.5.0.

     

Log in to post a comment.

Monday.com Logo