b24413180f560 (Greg Kroah-Hartman 2017-11-01 15:07:57 +0100 1) ;;; SPDX-License-Identifier: GPL-2.0
a71a29de4c2f9 (Yoshinori Sato 2015-01-28 02:48:15 +0900 2) ;;; abs.S
a71a29de4c2f9 (Yoshinori Sato 2015-01-28 02:48:15 +0900 3)
a71a29de4c2f9 (Yoshinori Sato 2015-01-28 02:48:15 +0900 4) #include <asm/linkage.h>
a71a29de4c2f9 (Yoshinori Sato 2015-01-28 02:48:15 +0900 5)
a71a29de4c2f9 (Yoshinori Sato 2015-01-28 02:48:15 +0900 6) #if defined(CONFIG_CPU_H8300H)
a71a29de4c2f9 (Yoshinori Sato 2015-01-28 02:48:15 +0900 7) .h8300h
a71a29de4c2f9 (Yoshinori Sato 2015-01-28 02:48:15 +0900 8) #endif
a71a29de4c2f9 (Yoshinori Sato 2015-01-28 02:48:15 +0900 9) #if defined(CONFIG_CPU_H8S)
a71a29de4c2f9 (Yoshinori Sato 2015-01-28 02:48:15 +0900 10) .h8300s
a71a29de4c2f9 (Yoshinori Sato 2015-01-28 02:48:15 +0900 11) #endif
a71a29de4c2f9 (Yoshinori Sato 2015-01-28 02:48:15 +0900 12) .text
a71a29de4c2f9 (Yoshinori Sato 2015-01-28 02:48:15 +0900 13) .global _abs
a71a29de4c2f9 (Yoshinori Sato 2015-01-28 02:48:15 +0900 14)
a71a29de4c2f9 (Yoshinori Sato 2015-01-28 02:48:15 +0900 15) ;;; int abs(int n)
a71a29de4c2f9 (Yoshinori Sato 2015-01-28 02:48:15 +0900 16) _abs:
a71a29de4c2f9 (Yoshinori Sato 2015-01-28 02:48:15 +0900 17) mov.l er0,er0
a71a29de4c2f9 (Yoshinori Sato 2015-01-28 02:48:15 +0900 18) bpl 1f
a71a29de4c2f9 (Yoshinori Sato 2015-01-28 02:48:15 +0900 19) neg.l er0
a71a29de4c2f9 (Yoshinori Sato 2015-01-28 02:48:15 +0900 20) 1:
a71a29de4c2f9 (Yoshinori Sato 2015-01-28 02:48:15 +0900 21) rts