public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "zhangyuan21 at xiaomi dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c/108019] [ARM] D16 float register was used but not saved in integer-dominated code Date: Thu, 08 Dec 2022 07:52:00 +0000 [thread overview] Message-ID: <bug-108019-4-ZaOYeMsMAf@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-108019-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108019 --- Comment #2 from zyfeier <zhangyuan21 at xiaomi dot com> --- C code: int weak_function up_alarm_tick_start(clock_t ticks) { int ret = -EAGAIN; if (g_oneshot_lower != NULL) { clock_t now = 0; clock_t delta; ONESHOT_TICK_CURRENT(g_oneshot_lower, &now); delta = ticks - now; if ((sclock_t)delta < 0) { delta = 0; } ret = ONESHOT_TICK_START(g_oneshot_lower, oneshot_callback, NULL, delta); } return ret; } Part of assembly code: 38020444 <nxsched_resume_timer>: 380204b8: e5920000 ldr r0, [r2] 380204bc: e5932000 ldr r2, [r3] 380204c0: e1540000 cmp r4, r0 380204c4: e5931004 ldr r1, [r3, #4] 380204c8: 21a04000 movcs r4, r0 380204cc: e0940002 adds r0, r4, r2 380204d0: e2a11000 adc r1, r1, #0 380204d4: eb0038da bl 3802e844 <up_alarm_tick_start> 3802e844 <up_alarm_tick_start>: 3802e844: e92d49f0 push {r4, r5, r6, r7, r8, fp, lr} 3802e848: e30e66f8 movw r6, #59128 ; 0xe6f8 3802e84c: e343689c movt r6, #14492 ; 0x389c 3802e850: e28db018 add fp, sp, #24 3802e854: e24dd024 sub sp, sp, #36 ; 0x24 3802e858: e5965000 ldr r5, [r6] 3802e85c: e59f31c0 ldr r3, [pc, #448] ; 3802ea24 <up_alarm_tick_start+0x1e0> 3802e860: e3550000 cmp r5, #0 3802e864: e5933000 ldr r3, [r3] 3802e868: e50b3020 str r3, [fp, #-32] ; 0xffffffe0 3802e86c: e3a03000 mov r3, #0 3802e870: 0a00005e beq 3802e9f0 <up_alarm_tick_start+0x1ac> 3802e874: f2c00010 vmov.i32 d16, #0 ; 0x00000000 3802e878: e1a07000 mov r7, r0 3802e87c: e1a00005 mov r0, r5 3802e880: e1a04001 mov r4, r1 3802e884: ed4b0b0d vstr d16, [fp, #-52] ; 0xffffffcc 3802e888: eb004c98 bl 38041af0 <__asan_load4_noabort> 3802e88c: e5958000 ldr r8, [r5] 3802e890: e288001c add r0, r8, #28 3802e894: eb004c95 bl 38041af0 <__asan_load4_noabort> 3802e898: e598301c ldr r3, [r8, #28] 3802e89c: e3530000 cmp r3, #0 3802e8a0: 0a000021 beq 3802e92c <up_alarm_tick_start+0xe8> 3802e8a4: e24b1034 sub r1, fp, #52 ; 0x34 3802e8a8: e1a00005 mov r0, r5 3802e8ac: e12fff33 blx r3 Problem: At 0x3802e874 d16 was cleared, but the calling function does not save this register.
next prev parent reply other threads:[~2022-12-08 7:52 UTC|newest] Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-12-08 7:33 [Bug c/108019] New: " zhangyuan21 at xiaomi dot com 2022-12-08 7:34 ` [Bug c/108019] " zhangyuan21 at xiaomi dot com 2022-12-08 7:52 ` zhangyuan21 at xiaomi dot com [this message] 2022-12-08 7:56 ` zhangyuan21 at xiaomi dot com 2022-12-08 8:50 ` zhangyuan21 at xiaomi dot com 2022-12-08 8:53 ` zhangyuan21 at xiaomi dot com 2022-12-08 10:44 ` rearnsha at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-108019-4-ZaOYeMsMAf@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).