cancel
Showing results for 
Search instead for 
Did you mean: 

GCC assembler bug: bit reverse RBIT not compiled properly

ivan239955_stm1_st
Associate II
Posted on March 25, 2008 at 17:53

GCC assembler bug: bit reverse RBIT not compiled properly

2 REPLIES 2
ivan239955_stm1_st
Associate II
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
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