1 /* SPDX-License-Identifier: GPL-2.0 */
2 /* una_asm.S: Kernel unaligned trap assembler helpers.
4 * Copyright (C) 1996,2005,2008 David S. Miller (davem@davemloft.net)
5 * Copyright (C) 1996,1997 Jakub Jelinek (jj@sunsite.mff.cuni.cz)
8 #include <linux/errno.h>
16 /* int __do_int_store(unsigned long *dst_addr, int size,
17 * unsigned long *src_val)
23 * Return '0' on success, -EFAULT on failure.
45 10: stb %g2, [%o0 + 6]
47 11: stb %g7, [%o0 + 7]
51 13: stb %g7, [%o0 + 1]
52 14: stb %g2, [%o0 + 2]
54 15: stb %g1, [%o0 + 3]
57 17: stb %g1, [%o0 + 1]
61 .section __ex_table,#alloc
68 .word 10b, retl_efault
69 .word 11b, retl_efault
70 .word 12b, retl_efault
71 .word 13b, retl_efault
72 .word 14b, retl_efault
73 .word 15b, retl_efault
74 .word 16b, retl_efault
75 .word 17b, retl_efault
78 /* int do_int_load(unsigned long *dest_reg, int size,
79 * unsigned long *saddr, int is_signed)
86 * Return '0' on success, -EFAULT on failure.
95 5: ldub [%o2 + 1], %g2
104 6: ldub [%o2 + 1], %g2
106 7: ldub [%o2 + 2], %g7
108 8: ldub [%o2 + 3], %g3
116 10: ldub [%o2 + 1], %g2
118 11: ldub [%o2 + 2], %g7
120 12: ldub [%o2 + 3], %g3
125 13: ldub [%o2 + 4], %g1
127 14: ldub [%o2 + 5], %g2
129 15: ldub [%o2 + 6], %g7
131 16: ldub [%o2 + 7], %g3
140 .section __ex_table,#alloc
141 .word 4b, retl_efault
142 .word 5b, retl_efault
143 .word 6b, retl_efault
144 .word 7b, retl_efault
145 .word 8b, retl_efault
146 .word 9b, retl_efault
147 .word 10b, retl_efault
148 .word 11b, retl_efault
149 .word 12b, retl_efault
150 .word 13b, retl_efault
151 .word 14b, retl_efault
152 .word 15b, retl_efault
153 .word 16b, retl_efault