Skip to main content
ivan239955_stm1_st
Associate II
March 25, 2008
Question

GCC assembler bug: bit reverse RBIT not compiled properly

  • March 25, 2008
  • 2 replies
  • 860 views
Posted on March 25, 2008 at 17:53

GCC assembler bug: bit reverse RBIT not compiled properly

    This topic has been closed for replies.

    2 replies

    ivan239955_stm1_st
    Associate II
    May 17, 2011
    Posted on May 17, 2011 at 12:27

    FYI,

    I've noticed that there is bug in GCC suite (Code sourcery 2007q3-53 and older) when generating THUMB2 code.

    RBIT Rd,Rs that is supposed to reverse bits works only for RBIT Rd,R0

    (Rs is encoded twice in opcode, GCC assembler sets second encoding of Rs always to 0)

    This bug affects CodeSourcery Sourcery G++, Rowley Crossworks , Raisonance RIDE and other tools based on GCC.

    I've worked around this bug by directly generating opcode

    .word 0xFxAyFA9y //RBIT Rx,Ry //Rx = bit reverse Ry ;x,y= 0 to F

    Anybody knows how to report this bug to GCC folks so it is fixed in next release?

    Ivan

    lanchon
    Associate III
    May 17, 2011
    Posted on May 17, 2011 at 12:27

    yes. use the -save-temps option to generate a preprocessed version of source file that exhibits the problem. then post the file + bug description to the

    http://www.codesourcery.com/archives/arm-gnu/maillist.html

    by sending an email to:

    arm-gnu (at) codesourcery REMOVE THIS (dot) com