Menu

#620 Bogus inline asm syntax in m_fixed.h (%cc)

Always occurs!
closed-fixed
None
5
2016-06-14
2015-03-15
No

While gcc accepts (used to accept?) %cc and %memory words, the syntax is wrong, since % prefix is only used for registers. Clang correctly rejects these bogus constructs. Trivial patch for m_fixed.h is attached.

Similar fix was applied to NSS by Mozilla team before.

1 Attachments

Discussion

  • Wesley Johnson

    Wesley Johnson - 2016-01-07

    It may be a change that works for Clang but breaks some other assembler. Going to take a while before I know what to do with this bug.

     
  • Alexey Dokuchaev

    This is about GCC-style, inline assembly syntax; I don't see how standalone assemblers are relevant here.

    You certainly might take all the time you need, but this change is not about Clang (it just did us a favor exposing original bug, being more strict). GCC works because it accepts wrong syntax; any compiler that understands GCC-like inline assembly should follow specification.

     
  • Wesley Johnson

    Wesley Johnson - 2016-06-14

    *** W105_asm
    patchfile = w105_5_asm_cc.patch
    - commit revision 1208
    In asm, Clang does not accept "%cc", as it is not a register.
    Gcc used to accept "%cc", and probably still does.
    In the asm clobbered section, cc and memory should not use %.
    Fixes bug #0620.

     
  • Wesley Johnson

    Wesley Johnson - 2016-06-14
    • status: open --> closed-fixed
    • assigned_to: Wesley Johnson
     

Log in to post a comment.