dtrace_asm.S (233409) | dtrace_asm.S (233484) |
---|---|
1/* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License, Version 1.0 only 6 * (the "License"). You may not use this file except in compliance 7 * with the License. 8 * --- 5 unchanged lines hidden (view full) --- 14 * When distributing Covered Code, include this CDDL HEADER in each 15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16 * If applicable, add the following below this CDDL HEADER, with the 17 * fields enclosed by brackets "[]" replaced with your own identifying 18 * information: Portions Copyright [yyyy] [name of copyright owner] 19 * 20 * CDDL HEADER END 21 * | 1/* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License, Version 1.0 only 6 * (the "License"). You may not use this file except in compliance 7 * with the License. 8 * --- 5 unchanged lines hidden (view full) --- 14 * When distributing Covered Code, include this CDDL HEADER in each 15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16 * If applicable, add the following below this CDDL HEADER, with the 17 * fields enclosed by brackets "[]" replaced with your own identifying 18 * information: Portions Copyright [yyyy] [name of copyright owner] 19 * 20 * CDDL HEADER END 21 * |
22 * $FreeBSD: head/sys/cddl/dev/dtrace/mips/dtrace_asm.S 233409 2012-03-24 05:14:37Z gonzo $ | 22 * $FreeBSD: head/sys/cddl/dev/dtrace/mips/dtrace_asm.S 233484 2012-03-26 01:26:33Z gonzo $ |
23 */ 24/* 25 * Copyright 2004 Sun Microsystems, Inc. All rights reserved. 26 * Use is subject to license terms. 27 */ 28 29#define _ASM 30#define _LOCORE --- 122 unchanged lines hidden (view full) --- 153 nop 154END(dtrace_fuword16_nocheck) 155 156/* 157uint32_t 158dtrace_fuword32_nocheck(void *addr) 159*/ 160LEAF(dtrace_fuword32_nocheck) | 23 */ 24/* 25 * Copyright 2004 Sun Microsystems, Inc. All rights reserved. 26 * Use is subject to license terms. 27 */ 28 29#define _ASM 30#define _LOCORE --- 122 unchanged lines hidden (view full) --- 153 nop 154END(dtrace_fuword16_nocheck) 155 156/* 157uint32_t 158dtrace_fuword32_nocheck(void *addr) 159*/ 160LEAF(dtrace_fuword32_nocheck) |
161 lwu v0, 0(a0) | 161 lw v0, 0(a0) |
162 j ra 163 nop 164END(dtrace_fuword32_nocheck) 165 166/* 167uint64_t 168dtrace_fuword64_nocheck(void *addr) 169*/ --- 14 unchanged lines hidden (view full) --- 184dtrace_copy(uintptr_t src, uintptr_t dest, size_t size) 185*/ 186LEAF(dtrace_copy) 1871: 188 beqz a2, 2f 189 nop 190 lbu t0, 0(a0) 191 sb t0, 0(a1) | 162 j ra 163 nop 164END(dtrace_fuword32_nocheck) 165 166/* 167uint64_t 168dtrace_fuword64_nocheck(void *addr) 169*/ --- 14 unchanged lines hidden (view full) --- 184dtrace_copy(uintptr_t src, uintptr_t dest, size_t size) 185*/ 186LEAF(dtrace_copy) 1871: 188 beqz a2, 2f 189 nop 190 lbu t0, 0(a0) 191 sb t0, 0(a1) |
192 daddu a0, a0, 1 193 daddu a1, a1, 1 194 dsubu a2, a2, 1 | 192 PTR_ADDU a0, a0, 1 193 PTR_ADDU a1, a1, 1 194 INT_SUBU a2, a2, 1 |
195 j 1b 196 nop 1972: 198 j ra 199 nop 200END(dtrace_copy) 201 202/* 203XXX: Unoptimized. Check for flags on page boundaries only(?) 204void 205dtrace_copystr(uintptr_t uaddr, uintptr_t kaddr, size_t size, 206 volatile uint16_t *flags) 207*/ 208LEAF(dtrace_copystr) 2091: 210 lbu t0, 0(a0) 211 sb t0, 0(a1) | 195 j 1b 196 nop 1972: 198 j ra 199 nop 200END(dtrace_copy) 201 202/* 203XXX: Unoptimized. Check for flags on page boundaries only(?) 204void 205dtrace_copystr(uintptr_t uaddr, uintptr_t kaddr, size_t size, 206 volatile uint16_t *flags) 207*/ 208LEAF(dtrace_copystr) 2091: 210 lbu t0, 0(a0) 211 sb t0, 0(a1) |
212 daddu a0, a0, 1 213 daddu a1, a1, 1 214 dsubu a2, a2, 1 | 212 PTR_ADDU a0, a0, 1 213 PTR_ADDU a1, a1, 1 214 INT_SUBU a2, a2, 1 |
215 beqz t0, 2f 216 nop 217 lhu t1, (a3) 218 and t1, t1, CPU_DTRACE_BADADDR 219 bnez t1, 2f 220 nop 221 222 bnez a2, 1b 223 nop 2242: 225 j ra 226 nop 227END(dtrace_copystr) 228 229/* 230void dtrace_invop_init(void) 231*/ 232LEAF(dtrace_invop_init) 233 /* XXX: impement it properly */ | 215 beqz t0, 2f 216 nop 217 lhu t1, (a3) 218 and t1, t1, CPU_DTRACE_BADADDR 219 bnez t1, 2f 220 nop 221 222 bnez a2, 1b 223 nop 2242: 225 j ra 226 nop 227END(dtrace_copystr) 228 229/* 230void dtrace_invop_init(void) 231*/ 232LEAF(dtrace_invop_init) 233 /* XXX: impement it properly */ |
234 dla t0, dtrace_invop_jump_addr | 234 PTR_LA t0, dtrace_invop_jump_addr |
235 /* dla t1, dtrace_invop_start */ | 235 /* dla t1, dtrace_invop_start */ |
236 sd zero, 0(t0) | 236 PTR_S zero, 0(t0) |
237 j ra 238 nop 239END(dtrace_invop_init) 240 241/* 242void dtrace_invop_uninit(void) 243*/ 244LEAF(dtrace_invop_uninit) | 237 j ra 238 nop 239END(dtrace_invop_init) 240 241/* 242void dtrace_invop_uninit(void) 243*/ 244LEAF(dtrace_invop_uninit) |
245 dla t0, dtrace_invop_jump_addr 246 sd zero, 0(t0) | 245 PTR_LA t0, dtrace_invop_jump_addr 246 PTR_S zero, 0(t0) |
247 j ra 248 nop 249END(dtrace_invop_uninit) 250 251/* 252 * The panic() and cmn_err() functions invoke vpanic() as a common entry point 253 * into the panic code implemented in panicsys(). vpanic() is responsible 254 * for passing through the format string and arguments, and constructing a --- 49 unchanged lines hidden --- | 247 j ra 248 nop 249END(dtrace_invop_uninit) 250 251/* 252 * The panic() and cmn_err() functions invoke vpanic() as a common entry point 253 * into the panic code implemented in panicsys(). vpanic() is responsible 254 * for passing through the format string and arguments, and constructing a --- 49 unchanged lines hidden --- |