This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

__byte_peripheral_32 MOVL/MOV32 bug in v16.9.0.LTS


Accessing memory through __byte_peripheral_32 issues an illegal MOVL mnemonic instead of MOV32 when using RnH registers.

Windows platform, v16.9.0.LTS

Example code:

typedef unsigned long u32;
static u32 foo = 123;

void
movl_bug(u32 a, u32 b, u32 c, u32 d)
{
    __byte_peripheral_32((u32 *)0) = 0x12345678;
    __byte_peripheral_32((u32 *)2) = 0xffffffff;
    __byte_peripheral_32((u32 *)4) = a;
    __byte_peripheral_32((u32 *)6) = b;
    __byte_peripheral_32((u32 *)8) = c;
    __byte_peripheral_32((u32 *)10) = d;
    __byte_peripheral_32((u32 *)12) = foo;
}

This results in:

$ ../../c2000/compiler/bin/cl2000.exe --float_support=fpu32 -mt -v28 -O4 --keep_asm movl_bug.c
"movl_bug.asm", ERROR!   at line 165: [E0003] Not expecting FPU RnH operand
                MOVL      *+XAR6[0],R0H         ; [CPU_] |11|

"movl_bug.asm", ERROR!   at line 165: [E0004] Illegal operand combination
                MOVL      *+XAR6[0],R0H         ; [CPU_] |11|

2 Assembly Errors, No Assembly Warnings

Errors in Source - Assembler Aborted

>> Compilation failure

BR

Tore Skjellnes