1 ; Copyright (C) 2012-2024 Free Software Foundation, Inc.
2 ; Contributed by Red Hat.
4 ; This file is free software; you can redistribute it and/or modify it
5 ; under the terms of the GNU General Public License as published by the
6 ; Free Software Foundation; either version 3, or (at your option) any
9 ; This file is distributed in the hope that it will be useful, but
10 ; WITHOUT ANY WARRANTY; without even the implied warranty of
11 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 ; General Public License for more details.
14 ; Under Section 7 of GPL version 3, you are granted additional
15 ; permissions described in the GCC Runtime Library Exception, version
16 ; 3.1, as published by the Free Software Foundation.
18 ; You should have received a copy of the GNU General Public License and
19 ; a copy of the GCC Runtime Library Exception along with this program;
20 ; see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
21 ; <http://www.gnu.org/licenses/>.
25 .section .text.__mspabi_srli_n
27 .global __mspabi_srli_\n
33 /* Logical Right Shift - R12 -> R12. */
49 #ifdef __MSP430X_LARGE__
55 .section .text.__mspabi_srli
63 #ifdef __MSP430X_LARGE__
70 .section .text.__gnu_mspabi_srlp
74 .global __gnu_mspabi_srlp
78 #ifdef __MSP430X_LARGE__
82 #endif /* __MSP430X_LARGE__ */
83 #endif /* __MSP430X__ */
85 /* Logical Right Shift - R12:R13 -> R12:R13. */
87 .section .text.__mspabi_srll_n
89 .global __mspabi_srll_\n
111 #ifdef __MSP430X_LARGE__
117 .section .text.__mspabi_srll
122 .global __mspabi_srll
126 #ifdef __MSP430X_LARGE__
132 /* Logical Right Shift - R8:R11 -> R12:R15
133 A 64-bit argument would normally be passed in R12:R15, but __mspabi_srlll has
134 special conventions, so the 64-bit value to shift is passed in R8:R11.
135 According to the MSPABI, the shift amount is a 64-bit value in R12:R15, but
136 we only use the low word in R12. */
138 .section .text.__mspabi_srlll
139 .global __mspabi_srlll
141 MOV R11, R15 ; Free up R11 first
142 MOV R12, R11 ; Save the shift amount in R11
148 #ifdef __MSP430X_LARGE__
161 #ifdef __MSP430X_LARGE__