summaryrefslogtreecommitdiffstats
path: root/arch/h8300/lib/abs.S
diff options
context:
space:
mode:
authorYoshinori Sato <ysato@users.sourceforge.jp>2015-01-28 02:48:15 +0900
committerYoshinori Sato <ysato@users.sourceforge.jp>2015-06-23 13:35:54 +0900
commita71a29de4c2f95563220a472f265f0bd74701d52 (patch)
tree2e0b84cdc079ce9dc038d7bf3f86ebdd0315cb2e /arch/h8300/lib/abs.S
parentbbeb79acb3b44f727f6267e1f6db9b3fdf791c24 (diff)
downloadlinux-stable-a71a29de4c2f95563220a472f265f0bd74701d52.tar.gz
linux-stable-a71a29de4c2f95563220a472f265f0bd74701d52.tar.bz2
linux-stable-a71a29de4c2f95563220a472f265f0bd74701d52.zip
h8300: library functions
Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
Diffstat (limited to 'arch/h8300/lib/abs.S')
-rw-r--r--arch/h8300/lib/abs.S20
1 files changed, 20 insertions, 0 deletions
diff --git a/arch/h8300/lib/abs.S b/arch/h8300/lib/abs.S
new file mode 100644
index 000000000000..efda749db03e
--- /dev/null
+++ b/arch/h8300/lib/abs.S
@@ -0,0 +1,20 @@
+;;; abs.S
+
+#include <asm/linkage.h>
+
+#if defined(CONFIG_CPU_H8300H)
+ .h8300h
+#endif
+#if defined(CONFIG_CPU_H8S)
+ .h8300s
+#endif
+ .text
+.global _abs
+
+;;; int abs(int n)
+_abs:
+ mov.l er0,er0
+ bpl 1f
+ neg.l er0
+1:
+ rts