From 2805d315bd4c3800f7d72f7e77a2538ab4c4ba6b Mon Sep 17 00:00:00 2001 From: Grissiom Date: Sun, 26 May 2013 21:49:26 +0800 Subject: [PATCH] rm48x50: fix bug in reg_test from FreeRTOS It does not satisfy AAPCS. --- bsp/rm48x50/application/reg_test.asm | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/bsp/rm48x50/application/reg_test.asm b/bsp/rm48x50/application/reg_test.asm index 1e75a60f9e..0eeb94ad68 100644 --- a/bsp/rm48x50/application/reg_test.asm +++ b/bsp/rm48x50/application/reg_test.asm @@ -122,13 +122,15 @@ vRegTestTask1: vRegTestLoop1: + STMFD sp!, {r0-r3, r12} ; Force yeild BL rt_thread_yield + LDMFD sp!, {r0-r3, r12} .if (__TI_VFP_SUPPORT__) ; Check all the VFP registers still contain the values set above. ; First save registers that are clobbered by the test. - push { r0-r1 } + STMFD sp!, { r0-r1 } vmov r0, r1, d0 cmp r0, #0xFF @@ -212,7 +214,7 @@ vRegTestLoop1: bne reg1_error_loopf ; Restore the registers that were clobbered by the test. - pop {r0-r1} + LDMFD sp!, {r0-r1} ; VFP register test passed. Jump to the core register test. b reg1_loopf_pass @@ -255,8 +257,6 @@ reg1_loopf_pass: bne vRegTestError1 cmp r12, #0xCC bne vRegTestError1 - cmp r14, #0xEE - bne vRegTestError1 ; This task is still running without jumping to vRegTestError1, so increment ; the loop counter so the check task knows the task is running error free. @@ -331,7 +331,7 @@ vRegTestLoop2: .if (__TI_VFP_SUPPORT__) ; Check all the VFP registers still contain the values set above. ; First save registers that are clobbered by the test. - push { r0-r1 } + STMFD sp!, { r0-r1 } vmov r0, r1, d0 cmp r0, #0xFF000000 @@ -415,7 +415,7 @@ vRegTestLoop2: bne reg2_error_loopf ; Restore the registers that were clobbered by the test. - pop {r0-r1} + LDMFD sp!, {r0-r1} ; VFP register test passed. Jump to the core register test. b reg2_loopf_pass