summaryrefslogtreecommitdiff
path: root/core/nds32/__muldi3.S
diff options
context:
space:
mode:
authorJack Rosenthal <jrosenth@chromium.org>2021-11-04 12:11:58 -0600
committerCommit Bot <commit-bot@chromium.org>2021-11-05 04:22:34 +0000
commit252457d4b21f46889eebad61d4c0a65331919cec (patch)
tree01856c4d31d710b20e85a74c8d7b5836e35c3b98 /core/nds32/__muldi3.S
parent08f5a1e6fc2c9467230444ac9b582dcf4d9f0068 (diff)
downloadchrome-ec-stabilize-14333.B-ish.tar.gz
In the interest of making long-term branch maintenance incur as little technical debt on us as possible, we should not maintain any files on the branch we are not actually using. This has the added effect of making it extremely clear when merging CLs from the main branch when changes have the possibility to affect us. The follow-on CL adds a convenience script to actually pull updates from the main branch and generate a CL for the update. BUG=b:204206272 BRANCH=ish TEST=make BOARD=arcada_ish && make BOARD=drallion_ish Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Change-Id: I17e4694c38219b5a0823e0a3e55a28d1348f4b18 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3262038 Reviewed-by: Jett Rink <jettrink@chromium.org> Reviewed-by: Tom Hughes <tomhughes@chromium.org>
Diffstat (limited to 'core/nds32/__muldi3.S')
-rw-r--r--core/nds32/__muldi3.S40
1 files changed, 0 insertions, 40 deletions
diff --git a/core/nds32/__muldi3.S b/core/nds32/__muldi3.S
deleted file mode 100644
index ef4a491183..0000000000
--- a/core/nds32/__muldi3.S
+++ /dev/null
@@ -1,40 +0,0 @@
-/* Copyright 2015 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.
- *
- * __muldi3.S: signed 64 bit multiplication
- */
-
-#define P1H $r1
-#define P1L $r0
-#define P2H $r3
-#define P2L $r2
-
- .text
- .align 2
- .globl __muldi3
- .type __muldi3, @function
-__muldi3:
- mul $r5, P1H, P2L ! (ah=a>>31)*(bl=b&0xffffffff)
- srli P1H, P1L, 16 ! alh=al>>16
- maddr32 $r5, P1L, P2H ! ah*bl+(bh=b>>31)*(al=a&0xffffffff)
- zeh P1L, P1L ! all=al&0xffff
- srli P2H, P2L, 16 ! blh=bl>>16
- zeh P2L, P2L ! bll=bl&0xffff
-
- mul $ta, P1L, P2H ! zA=all*blh
- mul $r4, P1L, P2L ! zl=all*bll
- mul P2L, P1H, P2L ! zB=alh*bll
- add P1L, $ta, P2L ! zA+=zB
- slt $ta, P1L, P2L ! zA<zB
- slli $ta, $ta, 16 ! (zA<zB)<<16
- slli P2L, P1L, 16 ! zA<<16
- maddr32 $ta, P1H, P2H ! zh=alh*blh+((zA<zB)<<16)
- srli P1H, P1L, 16 ! zA>>16
- add P1H, P1H, $ta ! zh+=(zA>>16)
- add P1L, $r4, P2L ! zl+=(zA<<16)
- slt $ta, P1L, $r4 ! zl<zA
- add P1H, P1H, $ta ! zh+=(zl<zA)
- add P1H, P1H, $r5 ! zh+=ah*bl+bh*al
- ret
- .size __muldi3, .-__muldi3