• Steven Rostedt's avatar
    jump label: Add work around to i386 gcc asm goto bug · 45f81b1c
    Steven Rostedt authored
    On i386 (not x86_64) early implementations of gcc would have a bug
    with asm goto causing it to produce code like the following:
    
    (This was noticed by Peter Zijlstra)
    
       56 pushl 0
       67 nopl         jmp 0x6f
          popl
          jmp 0x8c
    
       6f              mov
                       test
                       je 0x8c
    
       8c mov
          call *(%esp)
    
    The jump added in the asm goto skipped over the popl that matched
    the pushl 0, which lead up to a quick crash of the system when
    the jump was enabled. The nopl is defined in the asm goto () statement
    and when tracepoints are enabled, the nop changes to a jump to the label
    that was specified by the asm goto. asm goto is suppose to tell gcc that
    the code in the asm might jump to an external label. Here gcc obviously
    fails to make that work.
    
    The bug report for gcc is here:
    
      http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46226
    
    The bug only appears on x86 when not compiled with
    -maccumulate-outgoing-args. This option is al...
    45f81b1c
Kconfig 4.8 KB