aboutsummaryrefslogtreecommitdiff
path: root/lib/std
diff options
context:
space:
mode:
authorLemonBoy <thatlemon@gmail.com>2020-01-15 20:03:41 +0100
committerLemonBoy <thatlemon@gmail.com>2020-01-15 20:03:41 +0100
commite8012740b90f9acf286d852755d358eb4c708ab5 (patch)
tree8ea88ec128687e98f48beead6d49482f9a0c0a42 /lib/std
parentede28755b602d1ebaf7f6b37ca10d49e6cc7f0f7 (diff)
downloadzig-e8012740b90f9acf286d852755d358eb4c708ab5.tar.gz
zig-e8012740b90f9acf286d852755d358eb4c708ab5.zip
Fix off-by-one error (and missing store op)
Diffstat (limited to 'lib/std')
-rw-r--r--lib/std/special/compiler_rt/arm.zig10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/std/special/compiler_rt/arm.zig b/lib/std/special/compiler_rt/arm.zig
index 6dab675fc5..9ba423931b 100644
--- a/lib/std/special/compiler_rt/arm.zig
+++ b/lib/std/special/compiler_rt/arm.zig
@@ -78,9 +78,10 @@ pub fn __aeabi_uldivmod() callconv(.Naked) void {
\\ push {r4, lr}
\\ sub sp, #16
\\ add r4, sp, #8
+ \\ str r4, [sp]
\\ bl __udivmoddi4
- \\ ldr r3, [sp, #8]
- \\ ldr r4, [sp, #12]
+ \\ ldr r2, [sp, #8]
+ \\ ldr r3, [sp, #12]
\\ add sp, #16
\\ pop {r4, pc}
:
@@ -113,9 +114,10 @@ pub fn __aeabi_ldivmod() callconv(.Naked) void {
\\ push {r4, lr}
\\ sub sp, #16
\\ add r4, sp, #8
+ \\ str r4, [sp]
\\ bl __divmoddi4
- \\ ldr r3, [sp, #8]
- \\ ldr r4, [sp, #12]
+ \\ ldr r2, [sp, #8]
+ \\ ldr r3, [sp, #12]
\\ add sp, #16
\\ pop {r4, pc}
: