Lines Matching +full:4 +full:- +full:temp
1 // SPDX-License-Identifier: GPL-2.0-or-later
2 /* align.c - handle alignment exceptions for the Power PC.
5 * Copyright (c) 1998-1999 TiVo, Inc.
9 * Copyright (c) 2001-2002 PPC64 team, IBM Corp
10 * 64-bit and Power4 support
40 #define SE 2 /* sign-extend value, or FP ld/st as word */
56 { 4, LD }, /* 0 10 00: evlwhe[x] */
58 { 4, LD }, /* 0 10 10: evlwhou[x] */
59 { 4, LD+SE }, /* 0 10 11: evlwhos[x] */
60 { 4, LD+E4 }, /* 0 11 00: evlwwsplat[x] */
62 { 4, LD }, /* 0 11 10: evlwhsplat[x] */
73 { 4, ST }, /* 1 10 00: evstwhe[x] */
75 { 4, ST }, /* 1 10 10: evstwho[x] */
77 { 4, ST+E4 }, /* 1 11 00: evstwwe[x] */
79 { 4, ST+E4 }, /* 1 11 10: evstwwo[x] */
104 * Only Book-E has these instructions, and it does true little-endian,
114 u16 h[4]; in emulate_spe()
116 } data, temp; in emulate_spe() local
118 unsigned long *evr = ¤t->thread.evr[reg]; in emulate_spe()
125 addr = (unsigned char __user *)regs->dar; in emulate_spe()
133 return -EFAULT; in emulate_spe()
151 data.w[1] = regs->gpr[reg]; in emulate_spe()
155 data.h[3] = regs->gpr[reg] >> 16; in emulate_spe()
159 data.h[3] = regs->gpr[reg] & 0xffff; in emulate_spe()
165 data.w[1] = regs->gpr[reg]; in emulate_spe()
168 return -EINVAL; in emulate_spe()
171 temp.ll = data.ll = 0; in emulate_spe()
177 ret |= __get_user_inatomic(temp.v[0], p++); in emulate_spe()
178 ret |= __get_user_inatomic(temp.v[1], p++); in emulate_spe()
179 ret |= __get_user_inatomic(temp.v[2], p++); in emulate_spe()
180 ret |= __get_user_inatomic(temp.v[3], p++); in emulate_spe()
182 case 4: in emulate_spe()
183 ret |= __get_user_inatomic(temp.v[4], p++); in emulate_spe()
184 ret |= __get_user_inatomic(temp.v[5], p++); in emulate_spe()
187 ret |= __get_user_inatomic(temp.v[6], p++); in emulate_spe()
188 ret |= __get_user_inatomic(temp.v[7], p++); in emulate_spe()
190 return -EFAULT; in emulate_spe()
197 data.ll = temp.ll; in emulate_spe()
200 data.h[0] = temp.h[3]; in emulate_spe()
201 data.h[2] = temp.h[3]; in emulate_spe()
205 data.h[1] = temp.h[3]; in emulate_spe()
206 data.h[3] = temp.h[3]; in emulate_spe()
209 data.h[0] = temp.h[2]; in emulate_spe()
210 data.h[2] = temp.h[3]; in emulate_spe()
214 data.h[1] = temp.h[2]; in emulate_spe()
215 data.h[3] = temp.h[3]; in emulate_spe()
218 data.w[0] = temp.w[1]; in emulate_spe()
219 data.w[1] = temp.w[1]; in emulate_spe()
222 data.h[0] = temp.h[2]; in emulate_spe()
223 data.h[1] = temp.h[2]; in emulate_spe()
224 data.h[2] = temp.h[3]; in emulate_spe()
225 data.h[3] = temp.h[3]; in emulate_spe()
228 return -EINVAL; in emulate_spe()
267 case 4: in emulate_spe()
268 ret |= __put_user_inatomic(data.v[4], p++); in emulate_spe()
276 return -EFAULT; in emulate_spe()
279 regs->gpr[reg] = data.w[1]; in emulate_spe()
291 * Return -EFAULT if data address is bad
308 if (unlikely(__get_user_instr(instr, (void __user *)regs->nip))) in fix_alignment()
309 return -EFAULT; in fix_alignment()
310 if ((regs->msr & MSR_LE) != (MSR_KERNEL & MSR_LE)) { in fix_alignment()
311 /* We don't handle PPC little-endian any more... */ in fix_alignment()
313 return -EIO; in fix_alignment()
333 * when pasting to a co-processor. Furthermore, paste_last is the in fix_alignment()
337 return -EIO; in fix_alignment()
341 return -EINVAL; in fix_alignment()
346 return -EINVAL; in fix_alignment()
351 return -EIO; in fix_alignment()