arch/arm/src/stm32l4: STM32L4 has fetchadd and testset

This commit is contained in:
Juha Niskanen 2018-06-18 07:14:52 -06:00 committed by Gregory Nutt
parent 35697ed234
commit d42b6cbb97
4 changed files with 15 additions and 14 deletions

View File

@ -340,9 +340,10 @@ config ARCH_CHIP_STM32L4
bool "STMicro STM32 L4"
select ARCH_CORTEXM4
select ARCH_HAVE_CMNVECTOR
select ARCH_HAVE_MPU
select ARCH_HAVE_FETCHADD
select ARCH_HAVE_I2CRESET
select ARCH_HAVE_HEAPCHECK
select ARCH_HAVE_MPU
select ARCH_HAVE_PROGMEM
select ARCH_HAVE_SPI_BITORDER
select ARCH_HAVE_TICKLESS

View File

@ -76,7 +76,7 @@ up_fetchadd32:
add r2, r2, r1 /* Add the addend */
strex r3, r2, [r0] /* Attempt to save the result */
teq r3, #0 /* r2 will be 1 is strex failed */
teq r3, #0 /* r3 will be 1 if strex failed */
bne 1b /* Failed to lock... try again */
mov r0, r2 /* Return the incremented value */
@ -110,7 +110,7 @@ up_fetchsub32:
sub r2, r2, r1 /* Subtract the subtrahend */
strex r3, r2, [r0] /* Attempt to save the result */
teq r3, #0 /* r2 will be 1 is strex failed */
teq r3, #0 /* r3 will be 1 if strex failed */
bne 1b /* Failed to lock... try again */
mov r0, r2 /* Return the decremented value */
@ -144,7 +144,7 @@ up_fetchadd16:
add r2, r2, r1 /* Add the addend */
strexh r3, r2, [r0] /* Attempt to save the result */
teq r3, #0 /* r2 will be 1 is strexh failed */
teq r3, #0 /* r3 will be 1 if strexh failed */
bne 1b /* Failed to lock... try again */
mov r0, r2 /* Return the incremented value */
@ -180,7 +180,7 @@ up_fetchsub16:
/* Attempt to save the decremented value */
strexh r3, r2, [r0] /* Attempt to save the result */
teq r3, #0 /* r2 will be 1 is strexh failed */
teq r3, #0 /* r3 will be 1 if strexh failed */
bne 1b /* Failed to lock... try again */
mov r0, r2 /* Return the decremented value */
@ -214,7 +214,7 @@ up_fetchadd8:
add r2, r2, r1 /* Add the addend */
strexb r3, r2, [r0] /* Attempt to save the result */
teq r3, #0 /* r2 will be 1 is strexb failed */
teq r3, #0 /* r3 will be 1 if strexb failed */
bne 1b /* Failed to lock... try again */
mov r0, r2 /* Return the incremented value */
@ -248,7 +248,7 @@ up_fetchsub8:
sub r2, r2, r1 /* Subtract the subtrahend */
strexb r3, r2, [r0] /* Attempt to save the result */
teq r3, #0 /* r2 will be 1 is strexb failed */
teq r3, #0 /* r3 will be 1 if strexb failed */
bne 1b /* Failed to lock... try again */
mov r0, r2 /* Return the decremented value */

View File

@ -82,7 +82,7 @@ up_fetchadd32:
add r2, r2, r1 /* Add the addend */
strex r3, r2, [r0] /* Attempt to save the result */
teq r3, #0 /* r2 will be 1 is strex failed */
teq r3, #0 /* r3 will be 1 if strex failed */
bne up_fetchadd32 /* Failed to lock... try again */
mov r0, r2 /* Return the incremented value */
@ -111,7 +111,7 @@ up_fetchsub32:
sub r2, r2, r1 /* Subtract the subtrahend */
strex r3, r2, [r0] /* Attempt to save the result */
teq r3, #0 /* r2 will be 1 is strex failed */
teq r3, #0 /* r3 will be 1 if strex failed */
bne up_fetchsub32 /* Failed to lock... try again */
mov r0, r2 /* Return the decremented value */
@ -140,7 +140,7 @@ up_fetchadd16:
add r2, r2, r1 /* Add the addend */
strexh r3, r2, [r0] /* Attempt to save the result */
teq r3, #0 /* r2 will be 1 is strexh failed */
teq r3, #0 /* r3 will be 1 if strexh failed */
bne up_fetchadd16 /* Failed to lock... try again */
mov r0, r2 /* Return the incremented value */
@ -171,7 +171,7 @@ up_fetchsub16:
/* Attempt to save the decremented value */
strexh r3, r2, [r0] /* Attempt to save the result */
teq r3, #0 /* r2 will be 1 is strexh failed */
teq r3, #0 /* r3 will be 1 if strexh failed */
bne up_fetchsub16 /* Failed to lock... try again */
mov r0, r2 /* Return the decremented value */
@ -200,7 +200,7 @@ up_fetchadd8:
add r2, r2, r1 /* Add the addend */
strexb r3, r2, [r0] /* Attempt to save the result */
teq r3, #0 /* r2 will be 1 is strexb failed */
teq r3, #0 /* r3 will be 1 if strexb failed */
bne up_fetchadd8 /* Failed to lock... try again */
mov r0, r2 /* Return the incremented value */
@ -229,7 +229,7 @@ up_fetchsub8:
sub r2, r2, r1 /* Subtract the subtrahend */
strexb r3, r2, [r0] /* Attempt to save the result */
teq r3, #0 /* r2 will be 1 is strexb failed */
teq r3, #0 /* r3 will be 1 if strexb failed */
bne up_fetchsub8 /* Failed to lock... try again */
mov r0, r2 /* Return the decremented value */

View File

@ -45,7 +45,7 @@ CMN_UASRCS =
CMN_UCSRCS =
CMN_ASRCS = up_saveusercontext.S up_fullcontextrestore.S up_switchcontext.S
CMN_ASRCS += vfork.S
CMN_ASRCS += up_testset.S up_fetchadd.S vfork.S
CMN_CSRCS = up_assert.c up_blocktask.c up_copyfullstate.c
CMN_CSRCS += up_createstack.c up_mdelay.c up_udelay.c up_exit.c