summaryrefslogtreecommitdiff
path: root/core/nds32/__udivdi3.S
diff options
context:
space:
mode:
authorDino Li <Dino.Li@ite.com.tw>2018-10-29 11:14:00 +0800
committerchrome-bot <chrome-bot@chromium.org>2018-10-31 00:54:24 -0700
commit8a617f05b98c0d5bac6bb373751df937a249bdb8 (patch)
tree8b08f367244bb08bc5e7627e9de4da6dfecffa3a /core/nds32/__udivdi3.S
parent42199efde3735743a03846cc905aa4fb5fb1d470 (diff)
downloadchrome-ec-8a617f05b98c0d5bac6bb373751df937a249bdb8.tar.gz
nds32: Add 64-bit divide library routines for N8 CPU
Taken from NDS32 CPU's library routines. Signed-off-by: Dino Li <dino.li@ite.com.tw> BRANCH=none BUG=b:115501243 TEST=Add a debug console command to see if 64-bit division works as expected. Change-Id: I3ba47a24a1bb60fd7fb57321b177e603a0e7712b Reviewed-on: https://chromium-review.googlesource.com/1296430 Commit-Ready: Dino Li <Dino.Li@ite.com.tw> Tested-by: Dino Li <Dino.Li@ite.com.tw> Reviewed-by: Jonathan Brandmeyer <jbrandmeyer@chromium.org>
Diffstat (limited to 'core/nds32/__udivdi3.S')
-rw-r--r--core/nds32/__udivdi3.S15
1 files changed, 15 insertions, 0 deletions
diff --git a/core/nds32/__udivdi3.S b/core/nds32/__udivdi3.S
new file mode 100644
index 0000000000..4cb3b058fe
--- /dev/null
+++ b/core/nds32/__udivdi3.S
@@ -0,0 +1,15 @@
+/* Copyright 2018 The Chromium OS Authors. All rights reserved.
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ *
+ * __udivdi3.S: unsigned 64 bit division
+ */
+
+ .text
+ .align 2
+ .globl __udivdi3
+ .type __udivdi3, @function
+__udivdi3:
+ movi $r4, 0 ! ignore remainder
+ b __udivmoddi4
+ .size __udivdi3, .-__udivdi3