1 /* SPDX-License-Identifier: GPL-2.0 */
3 * linux/arch/m32r/lib/ashxdi3.S
5 * Copyright (C) 2001,2002 Hiroyuki Kondo, and Hirokazu Takata
16 #ifdef CONFIG_ISA_DUAL_ISSUE
18 #ifndef __LITTLE_ENDIAN__
24 cmpz r2 || ldi r3, #32
28 mv r1, r0 || srai r0, #31
34 mv r3, r0 || srl r1, r2
35 sra r0, r2 || neg r2, r2
44 cmpz r2 || ldi r3, #32
48 mv r0, r1 || addi r2, #-32
49 sll r0, r2 || ldi r1, #0
53 mv r3, r1 || sll r0, r2
54 sll r1, r2 || neg r2, r2
61 cmpz r2 || ldi r3, #32
65 mv r1, r0 || addi r2, #-32
66 ldi r0, #0 || srl r1, r2
70 mv r3, r0 || srl r1, r2
71 srl r0, r2 || neg r2, r2
75 #else /* LITTLE_ENDIAN */
81 cmpz r2 || ldi r3, #32
85 mv r0, r1 || srai r1, #31
91 mv r3, r1 || srl r0, r2
92 sra r1, r2 || neg r2, r2
101 cmpz r2 || ldi r3, #32
102 jc r14 || cmpu r2, r3
105 mv r1, r0 || addi r2, #-32
106 sll r1, r2 || ldi r0, #0
110 mv r3, r0 || sll r1, r2
111 sll r0, r2 || neg r2, r2
118 cmpz r2 || ldi r3, #32
119 jc r14 || cmpu r2, r3
122 mv r0, r1 || addi r2, #-32
123 ldi r1, #0 || srl r0, r2
127 mv r3, r1 || srl r0, r2
128 srl r1, r2 || neg r2, r2
134 #else /* not CONFIG_ISA_DUAL_ISSUE */
136 #ifndef __LITTLE_ENDIAN__
292 #endif /* not CONFIG_ISA_DUAL_ISSUE */