Menu

#3545 PDK bad peephole rule

closed-fixed
None
other
5
2023-02-04
2023-02-03
Free-PDK
No

With latest sdcc I get this error:

helloworld_2cores.c:103: error 9: FATAL Compiler Internal Error in file 'SDCCpeeph.c' line number '3727' : skip instruction has no target label:
Contact Author with source code

't1sn.io    __pa, #0         '

.C code causing this:

void core2(void) __naked
{
__asm__("                        \n\
        mov a, #0x01             \n\
        mov.io __padier, a       \n\
$1:                              \n\
        t1sn.io __pa, #0         \n\
        set1 _core2_signal, #0   \n\
        goto $1                  \n");
}

Related

Wiki: NGI0-Entrust-SDCC

Discussion

  • Philipp Klaus Krause

    I guess the main problem is that the peephole optimizer gets applied to inline asm here, despite --peep-asm not being specified.

     
  • Philipp Klaus Krause

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

    Fixed in [r13853]. Fortunately, SDCC didn't try to apply the peephole rules to inline asm, it just tried to look for skip instruction target labels even in inline asm.

     

    Related

    Commit: [r13853]


    Last edit: Maarten Brock 2023-02-05

Log in to post a comment.

MongoDB Logo MongoDB