Hi David,

I am having some trouble using the rpt functionality of the CPUX. While
attempting to assemble some code for the msp430fr5969 I was surprised
with this error:

repeat count cannot be used with rrux

In response to:
rpt r15 { rrux.w r6

Oops - this is definitely a bug.  You should report it ... :-)

The problem is that RRUX is a synthetic instruction, and GAS is incorrectly 
checking it as if it were RRUM, which does not accept a RPT count.

After some fiddling around I was able to
generate code that worked but I had to bang it in using .word
directives. objdump produced:

rpt r15 { rrcx.w        r6

Which is almost but not quite correct because it ignores the little
detail of the extension word having the ZC bit set.

True - this is really the same bug.  GAS is not encoding RRUX correctly, so it 
is not being decoded correctly either.

Which brings up another problem. Not only is the use of rpt not
documented for the GNU assembler,

This is because there is no real documentation from TI describing how the RPT pseudo-instruction ought to work. I assumed that they must have an "assembler programming for the MSP430 " guide somewhere that described this feature, and that I have just not seen it. In my opinion the GNU assembler documentation should not be documenting features that are supposed to be a standard part of the architecture's assembler.

there isn't any hint of how to set the
ZC bit in the extension word.

It has to be through the use of different opcode mnemonics, ie RRUX vs RRCX.

slau367 is a bit thin in describing the repeat feature as well. It
barely gets a mention in the description of the extension word and
appears a few times in examples. Other than that there is nothing.

Agreed - it is very frustrating.

There is also very little documentation on synthetic instructions and how they 
ought to be implemented.

Anyway, please try out the attached patch and let me know if it works for you.


Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
Mspgcc-users mailing list

Reply via email to