Forum | Documentation | Website | Blog

Skip to content
Snippets Groups Projects
  • Linus Torvalds's avatar
    work around gcc bugs with 'asm goto' with outputs · 4356e9f8
    Linus Torvalds authored
    We've had issues with gcc and 'asm goto' before, and we created a
    'asm_volatile_goto()' macro for that in the past: see commits
    3f0116c3 ("compiler/gcc4: Add quirk for 'asm goto' miscompilation
    bug") and a9f18034 ("compiler/gcc4: Make quirk for
    asm_volatile_goto() unconditional").
    
    Then, much later, we ended up removing the workaround in commit
    43c249ea ("compiler-gcc.h: remove ancient workaround for gcc PR
    58670") because we no longer supported building the kernel with the
    affected gcc versions, but we left the macro uses around.
    
    Now, Sean Christopherson reports a new version of a very similar
    problem, which is fixed by re-applying that ancient workaround.  But the
    problem in question is limited to only the 'asm goto with outputs'
    cases, so instead of re-introducing the old workaround as-is, let's
    rename and limit the workaround to just that much less common case.
    
    It looks like there are at least two separate issues that all hit in
    this area...
    4356e9f8