diff options
| author | Bernard Xiong <[email protected]> | 2022-01-14 22:36:14 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2022-01-14 22:36:14 +0800 |
| commit | 5decbb5170002bd9a7c425b29520644ee092497c (patch) | |
| tree | 676029e9a17e770182fafe0d95e0c5c207be2bcc /libcpu | |
| parent | 16806a1496f7bac2fffaf3cd7c17b27824cb190b (diff) | |
| parent | 433e5f81473f71e36fbfb2a4ca5fcbb6b28f57b2 (diff) | |
Merge pull request #5345 from jiladahe1997/master
[bugfix] libcpu/arm/cortex-m/context_gcc: 修复thumb指令集汇编语法错误
Diffstat (limited to 'libcpu')
| -rw-r--r-- | libcpu/arm/cortex-m33/context_gcc.S | 2 | ||||
| -rw-r--r-- | libcpu/arm/cortex-m4/context_gcc.S | 4 | ||||
| -rw-r--r-- | libcpu/arm/cortex-m7/context_gcc.S | 4 |
3 files changed, 10 insertions, 0 deletions
diff --git a/libcpu/arm/cortex-m33/context_gcc.S b/libcpu/arm/cortex-m33/context_gcc.S index 27596bf787..3c4ac8a236 100644 --- a/libcpu/arm/cortex-m33/context_gcc.S +++ b/libcpu/arm/cortex-m33/context_gcc.S @@ -143,6 +143,7 @@ contex_ns_store: #if defined (__VFP_FP__) && !defined(__SOFTFP__) TST lr, #0x10 /* if(!EXC_RETURN[4]) */ + IT EQ VSTMDBEQ r1!, {d8 - d15} /* push FPU register s16~s31 */ #endif @@ -187,6 +188,7 @@ contex_ns_load: #if defined (__VFP_FP__) && !defined(__SOFTFP__) TST lr, #0x10 /* if(!EXC_RETURN[4]) */ + IT EQ VLDMIAEQ r1!, {d8 - d15} /* pop FPU register s16~s31 */ #endif diff --git a/libcpu/arm/cortex-m4/context_gcc.S b/libcpu/arm/cortex-m4/context_gcc.S index f569a35863..0c69b4d4dd 100644 --- a/libcpu/arm/cortex-m4/context_gcc.S +++ b/libcpu/arm/cortex-m4/context_gcc.S @@ -107,6 +107,7 @@ PendSV_Handler: #if defined (__VFP_FP__) && !defined(__SOFTFP__) TST lr, #0x10 /* if(!EXC_RETURN[4]) */ + IT EQ VSTMDBEQ r1!, {d8 - d15} /* push FPU register s16~s31 */ #endif @@ -116,6 +117,7 @@ PendSV_Handler: MOV r4, #0x00 /* flag = 0 */ TST lr, #0x10 /* if(!EXC_RETURN[4]) */ + IT EQ MOVEQ r4, #0x01 /* flag = 1 */ STMFD r1!, {r4} /* push flag */ @@ -137,6 +139,7 @@ switch_to_thread: #if defined (__VFP_FP__) && !defined(__SOFTFP__) CMP r3, #0 /* if(flag_r3 != 0) */ + IT NE VLDMIANE r1!, {d8 - d15} /* pop FPU register s16~s31 */ #endif @@ -145,6 +148,7 @@ switch_to_thread: #if defined (__VFP_FP__) && !defined(__SOFTFP__) ORR lr, lr, #0x10 /* lr |= (1 << 4), clean FPCA. */ CMP r3, #0 /* if(flag_r3 != 0) */ + IT NE BICNE lr, lr, #0x10 /* lr &= ~(1 << 4), set FPCA. */ #endif diff --git a/libcpu/arm/cortex-m7/context_gcc.S b/libcpu/arm/cortex-m7/context_gcc.S index f569a35863..0c69b4d4dd 100644 --- a/libcpu/arm/cortex-m7/context_gcc.S +++ b/libcpu/arm/cortex-m7/context_gcc.S @@ -107,6 +107,7 @@ PendSV_Handler: #if defined (__VFP_FP__) && !defined(__SOFTFP__) TST lr, #0x10 /* if(!EXC_RETURN[4]) */ + IT EQ VSTMDBEQ r1!, {d8 - d15} /* push FPU register s16~s31 */ #endif @@ -116,6 +117,7 @@ PendSV_Handler: MOV r4, #0x00 /* flag = 0 */ TST lr, #0x10 /* if(!EXC_RETURN[4]) */ + IT EQ MOVEQ r4, #0x01 /* flag = 1 */ STMFD r1!, {r4} /* push flag */ @@ -137,6 +139,7 @@ switch_to_thread: #if defined (__VFP_FP__) && !defined(__SOFTFP__) CMP r3, #0 /* if(flag_r3 != 0) */ + IT NE VLDMIANE r1!, {d8 - d15} /* pop FPU register s16~s31 */ #endif @@ -145,6 +148,7 @@ switch_to_thread: #if defined (__VFP_FP__) && !defined(__SOFTFP__) ORR lr, lr, #0x10 /* lr |= (1 << 4), clean FPCA. */ CMP r3, #0 /* if(flag_r3 != 0) */ + IT NE BICNE lr, lr, #0x10 /* lr &= ~(1 << 4), set FPCA. */ #endif |
