aboutsummaryrefslogtreecommitdiff
path: root/arch/m32r/lib/strlen.S
diff options
context:
space:
mode:
authorArnd Bergmann <[email protected]>2018-03-07 21:36:19 +0100
committerArnd Bergmann <[email protected]>2018-03-09 23:20:00 +0100
commit553b085c2075f6a4a2591108554f830fa61e881f (patch)
tree68d63911f2c12e0fb9fa23498df9300442a88f92 /arch/m32r/lib/strlen.S
parentfd8773f9f544955f6f47dc2ac3ab85ad64376b7f (diff)
arch: remove m32r port
The Mitsubishi/Renesas m32r architecture has been around for many years, but the Linux port has been obsolete for a very long time as well, with the last significant updates done for linux-2.6.14. While some m32r microcontrollers are still being marketed by Renesas, those are apparently no longer possible to support, mainly due to the lack of an external memory interface. Hirokazu Takata was the maintainer until the architecture got marked Orphaned in 2014. Link: http://www.linux-m32r.org/ Link: https://www.renesas.com/en-eu/products/microcontrollers-microprocessors/m32r.html Cc: Hirokazu Takata <[email protected]> Signed-off-by: Arnd Bergmann <[email protected]>
Diffstat (limited to 'arch/m32r/lib/strlen.S')
-rw-r--r--arch/m32r/lib/strlen.S118
1 files changed, 0 insertions, 118 deletions
diff --git a/arch/m32r/lib/strlen.S b/arch/m32r/lib/strlen.S
deleted file mode 100644
index 41c77e387593..000000000000
--- a/arch/m32r/lib/strlen.S
+++ /dev/null
@@ -1,118 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-/*
- * linux/arch/m32r/strlen.S -- strlen code.
- *
- * Copyright (C) 2001 Hirokazu Takata
- *
- * size_t strlen(const char *s);
- *
- */
-
-#include <linux/linkage.h>
-#include <asm/assembler.h>
-
-#ifdef CONFIG_ISA_DUAL_ISSUE
-
- .text
-ENTRY(strlen)
- mv r6, r0 || ldi r2, #0
- and3 r0, r0, #3
- bnez r0, strlen_byte
-;
-strlen_word:
- ld r0, @r6+
-;
- seth r5, #high(0x01010101)
- or3 r5, r5, #low(0x01010101)
- sll3 r7, r5, #7
-strlen_word_loop:
- ld r1, @r6+ || not r4, r0
- sub r0, r5 || and r4, r7
- and r4, r0
- bnez r4, strlen_last_bytes
- ld r0, @r6+ || not r4, r1
- sub r1, r5 || and r4, r7
- and r4, r1 || addi r2, #4
- bnez r4, strlen_last_bytes
- addi r2, #4 || bra.s strlen_word_loop
-
- ; NOTE: If a null char. exists, return 0.
- ; if ((x - 0x01010101) & ~x & 0x80808080)
- ; return 0;
-;
-strlen_byte:
- ldb r1, @r6 || addi r6, #1
- beqz r1, strlen_exit
- addi r2, #1 || bra.s strlen_byte
-;
-strlen_last_bytes:
- ldi r0, #4 || addi r6, #-8
-;
-strlen_byte_loop:
- ldb r1, @r6 || addi r6, #1
- addi r0, #-1 || cmpz r1
- bc.s strlen_exit || cmpz r0
- addi r2, #1 || bnc.s strlen_byte_loop
-;
-strlen_exit:
- mv r0, r2 || jmp r14
-
-#else /* not CONFIG_ISA_DUAL_ISSUE */
-
- .text
-ENTRY(strlen)
- mv r6, r0
- ldi r2, #0
- and3 r0, r0, #3
- bnez r0, strlen_byte
-;
-strlen_word:
- ld r0, @r6+
-;
- seth r5, #high(0x01010101)
- or3 r5, r5, #low(0x01010101)
- sll3 r7, r5, #7
-strlen_word_loop:
- ld r1, @r6+
- not r4, r0 ; NOTE: If a null char. exists, return 0.
- sub r0, r5 ; if ((x - 0x01010101) & ~x & 0x80808080)
- and r4, r7 ; return 0;
- and r4, r0
- bnez r4, strlen_last_bytes
- addi r2, #4
-;
- ld r0, @r6+
- not r4, r1 ; NOTE: If a null char. exists, return 0.
- sub r1, r5 ; if ((x - 0x01010101) & ~x & 0x80808080)
- and r4, r7 ; return 0;
- and r4, r1
- bnez r4, strlen_last_bytes
- addi r2, #4
- bra strlen_word_loop
-;
-strlen_byte:
- ldb r1, @r6
- addi r6, #1
- beqz r1, strlen_exit
- addi r2, #1
- bra strlen_byte
-;
-strlen_last_bytes:
- ldi r0, #4
- addi r6, #-8
-;
-strlen_byte_loop:
- ldb r1, @r6
- addi r6, #1
- addi r0, #-1
- beqz r1, strlen_exit
- addi r2, #1
- bnez r0, strlen_byte_loop
-;
-strlen_exit:
- mv r0, r2
- jmp r14
-
-#endif /* not CONFIG_ISA_DUAL_ISSUE */
-
- .end