From: Tetsuma Hoshino Date: Sat, 8 Apr 2023 14:19:53 +0000 (-0600) Subject: PR target/109402: v850 (not v850e) variant of __muldi3() moves sp in reversed directi... X-Git-Tag: basepoints/gcc-14~84 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=79fb2de020c499bd01708e1418965a11166b7d5b;p=thirdparty%2Fgcc.git PR target/109402: v850 (not v850e) variant of __muldi3() moves sp in reversed direction [PR109402] muldi3 will deallocate stack space after the call to __save_r26_r31, then re-allocate the space a short while later. If an interrupt occurs in that window, it can clobber items on the stack. PR target/109402 libgcc/ * config/v850/lib1funcs.S (___muldi3): Remove unnecessary stack manipulations. --- diff --git a/libgcc/config/v850/lib1funcs.S b/libgcc/config/v850/lib1funcs.S index 20fa499fa6d2..35b5ab5f339e 100644 --- a/libgcc/config/v850/lib1funcs.S +++ b/libgcc/config/v850/lib1funcs.S @@ -2211,7 +2211,6 @@ ___ucmpdi2: ___muldi3: #ifdef __v850__ jarl __save_r26_r31, r10 - addi 16, sp, sp mov r6, r28 shr 15, r28 movea lo(32767), r0, r14 @@ -2256,7 +2255,6 @@ ___muldi3: mulh r12, r6 mov r28, r17 mulh r10, r17 - add -16, sp mov r28, r12 mulh r8, r12 add r17, r18