Cortex-M23 assembly instrutions not accepted

Bug #1939689 reported by Lyn Mervyn Roberts
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
GNU Arm Embedded Toolchain
New
Undecided
Unassigned

Bug Description

asm.c

void vRaisePrivilege( void ) __attribute__( ( naked ) );
void vResetPrivilege( void ) __attribute__( ( naked ) );

void vRaisePrivilege( void )
{
    __asm volatile
    (
        " mrs r0, control \n"
        " movs r1, #1 \n"
        " bics r0, r1 \n"
        " msr control, r0 \n"
        " bx lr \n"
        ::: "r0", "r1", "memory"
    );
}
/*-----------------------------------------------------------*/

void vResetPrivilege( void )
{
    __asm volatile
    (
        " mrs r0, control \n"
        " movs r1, #1 \n"
        " orrs r0, r1 \n"
        " msr control, r0 \n"
        " bx lr \n"
        ::: "r0", "r1", "memory"
    );
}

arm-none-eabi-gcc -mthumb -march="armv8-m.main" -o asm.o -c asm.c Compiles

arm-none-eabi-gcc -mthumb -march="armv8-m.base" -o asm.o -c asm.c

C:\Users\Lyn.CT\AppData\Local\Temp\ccILqoT0.s: Assembler messages:
C:\Users\Lyn.CT\AppData\Local\Temp\ccILqoT0.s:28: Error: instruction not supported in Thumb16 mode -- `bics r0,r1'
C:\Users\Lyn.CT\AppData\Local\Temp\ccILqoT0.s:52: Error: instruction not supported in Thumb16 mode -- `orrs r0,r1'

Revision history for this message
David Ramunno (ramdav) wrote (last edit ):

cortex m23 has no it instruction... removed comment

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.