Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

syslog: reslove crash because vmov.i32 instruction is not ready #4226

Merged
merged 1 commit into from
Jul 26, 2021

Conversation

Donny9
Copy link
Contributor

@Donny9 Donny9 commented Jul 26, 2021

Summary

Reslove crash because vmov.i32 instruction is not ready when system boot.
So avoid to use vmov.i32 instruction before FPU is ready.

Before modification:
3c03b35c <nx_vsyslog>:
3c03b35c: f2c00010 vmov.i32 d16, #0 ; 0x00000000
3c03b360: f2c02050 vmov.i32 q9, #0 ; 0x00000000
3c03b364: e92d40f0 push {r4, r5, r6, r7, lr}
3c03b368: e24dd08c sub sp, sp, #140 ; 0x8c
3c03b36c: e28d301c add r3, sp, #28
3c03b370: e2505000 subs r5, r0, #0
3c03b374: edcd0b0f vstr d16, [sp, #60] ; 0x3c
3c03b378: edcd0b01 vstr d16, [sp, #4]

After modification:
3c03b35c <nx_vsyslog>:
3c03b35c: e92d40f0 push {r4, r5, r6, r7, lr}
3c03b360: e2505000 subs r5, r0, #0
3c03b364: e24dd08c sub sp, sp, #140 ; 0x8c
3c03b368: e1a06001 mov r6, r1
3c03b36c: e1a07002 mov r7, r2
3c03b370: e28d000c add r0, sp, #12
3c03b374: 1a00003a bne 3c03b464 <nx_vsyslog+0x108>

Change-Id: I643c19f5416c94a529764fdaa81f3088fcf95355
Signed-off-by: Jiuzhu Dong dongjiuzhu1@xiaomi.com

Impact

Testing

…system boot

So avoid to use vmov.i32 instruction before FPU is ready.

Before modification:
3c03b35c <nx_vsyslog>:
3c03b35c:	f2c00010 	vmov.i32	d16, #0	; 0x00000000
3c03b360:	f2c02050 	vmov.i32	q9, #0	; 0x00000000
3c03b364:	e92d40f0 	push	{r4, r5, r6, r7, lr}
3c03b368:	e24dd08c 	sub	sp, sp, apache#140	; 0x8c
3c03b36c:	e28d301c 	add	r3, sp, apache#28
3c03b370:	e2505000 	subs	r5, r0, #0
3c03b374:	edcd0b0f 	vstr	d16, [sp, apache#60]	; 0x3c
3c03b378:	edcd0b01 	vstr	d16, [sp, apache#4]

After modification:
3c03b35c <nx_vsyslog>:
3c03b35c:       e92d40f0        push    {r4, r5, r6, r7, lr}
3c03b360:       e2505000        subs    r5, r0, #0
3c03b364:       e24dd08c        sub     sp, sp, apache#140    ; 0x8c
3c03b368:       e1a06001        mov     r6, r1
3c03b36c:       e1a07002        mov     r7, r2
3c03b370:       e28d000c        add     r0, sp, apache#12
3c03b374:       1a00003a        bne     3c03b464 <nx_vsyslog+0x108>

Change-Id: I643c19f5416c94a529764fdaa81f3088fcf95355
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
Copy link
Contributor

@xiaoxiang781216 xiaoxiang781216 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@xiaoxiang781216 xiaoxiang781216 merged commit 19cea67 into apache:master Jul 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants