strncpy_user.S (2fc2991175bf77395e6b15fe6b2304d3bf72da40) | strncpy_user.S (619b6e18fce20e4b2d0082cde989f37e1be7b3e1) |
---|---|
1/* 2 * This file is subject to the terms and conditions of the GNU General Public 3 * License. See the file "COPYING" in the main directory of this archive 4 * for more details. 5 * 6 * Copyright (c) 1996, 1999 by Ralf Baechle 7 */ 8#include <linux/errno.h> --- 27 unchanged lines hidden (view full) --- 36 move v0, zero 37 move v1, a1 38 .set noreorder 391: EX(lbu, t0, (v1), fault) 40 PTR_ADDIU v1, 1 41 beqz t0, 2f 42 sb t0, (a0) 43 PTR_ADDIU v0, 1 | 1/* 2 * This file is subject to the terms and conditions of the GNU General Public 3 * License. See the file "COPYING" in the main directory of this archive 4 * for more details. 5 * 6 * Copyright (c) 1996, 1999 by Ralf Baechle 7 */ 8#include <linux/errno.h> --- 27 unchanged lines hidden (view full) --- 36 move v0, zero 37 move v1, a1 38 .set noreorder 391: EX(lbu, t0, (v1), fault) 40 PTR_ADDIU v1, 1 41 beqz t0, 2f 42 sb t0, (a0) 43 PTR_ADDIU v0, 1 |
44 bne v0, a2, 1b 45 PTR_ADDIU a0, 1 | |
46 .set reorder | 44 .set reorder |
45 PTR_ADDIU a0, 1 46 bne v0, a2, 1b |
|
472: PTR_ADDU t0, a1, v0 48 xor t0, a1 49 bltz t0, fault 50 jr ra # return n 51 END(__strncpy_from_user_asm) 52 53fault: li v0, -EFAULT 54 jr ra 55 56 .section __ex_table,"a" 57 PTR 1b, fault 58 .previous | 472: PTR_ADDU t0, a1, v0 48 xor t0, a1 49 bltz t0, fault 50 jr ra # return n 51 END(__strncpy_from_user_asm) 52 53fault: li v0, -EFAULT 54 jr ra 55 56 .section __ex_table,"a" 57 PTR 1b, fault 58 .previous |