Folks:
I'm using IAR's icc430 C compiler and its inline assembler. I've noticed that this tool flags
the following sorts of instructions as ineligible for "RPT" (repeat) operations because the
tool thinks that the accesses to the Constant Generator registers (R2 and R3) aren't
"Register Mode" operands.
0018 4E53 ADDX.A #0x0, R14 // Src: R3/CG2 in mode 0, Dst: R14 in mode 0
0018 5E53 ADDX.A #0x1, R14 // Src: R3/CG2 in mode 1, Dst: R14 in mode 0
0018 6E53 ADDX.A #0x2, R14 // Src: R3/CG2 in mode 2, Dst: R14 in mode 0
0018 6E52 ADDX.A #0x4, R14 // Src: R2/SR/CG1 in mode 2, Dst: R14 in mode 0
0018 7E52 ADDX.A #0x8, R14 // Src: R2/SR/CG1 in mode 3, Dst: R14 in mode 0
0018 7E53 ADDX.A #0x-1, R14 // Src: R3/CG2 in mode 3, Dst: R14 in mode 0
(The error printout is included below)
Is it really true that using the Constant Generators makes the instruction ineligible
for being repeated or is IAR being excessively restrictive here?
Atlant
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Compiling: hello.cpp --> hello.r43
asm( "ADDX.A #0, R14" ); // :
^
"hello.cpp",543 Error[Og006]: Error in inline assembly: "Error[459]: Repeated instruction must have register mode operand(s)"
asm( "ADDX.A #1, R14" ); // :
^
"hello.cpp",546 Error[Og006]: Error in inline assembly: "Error[459]: Repeated instruction must have register mode operand(s)"
asm( "ADDX.A #2, R14" ); // :
^
"hello.cpp",549 Error[Og006]: Error in inline assembly: "Error[459]: Repeated instruction must have register mode operand(s)"
asm( "ADDX.A #4, R14" ); // :
^
"hello.cpp",552 Error[Og006]: Error in inline assembly: "Error[459]: Repeated instruction must have register mode operand(s)"
asm( "ADDX.A #8, R14" ); // :
^
"hello.cpp",555 Error[Og006]: Error in inline assembly: "Error[459]: Repeated instruction must have register mode operand(s)"
asm( "ADDX.A #-1, R14" ); // :
^
"hello.cpp",558 Error[Og006]: Error in inline assembly: "Error[459]: Repeated instruction must have register mode operand(s)"