profile.h revision 139790
118099Spst/*- 218099Spst * Copyright (c) 2004 Marcel Moolenaar 318099Spst * All rights reserved. 418099Spst * 518099Spst * Redistribution and use in source and binary forms, with or without 618099Spst * modification, are permitted provided that the following conditions 718099Spst * are met: 818099Spst * 918099Spst * 1. Redistributions of source code must retain the above copyright 1018099Spst * notice, this list of conditions and the following disclaimer. 1118099Spst * 2. Redistributions in binary form must reproduce the above copyright 1218099Spst * notice, this list of conditions and the following disclaimer in the 1318099Spst * documentation and/or other materials provided with the distribution. 1418099Spst * 1518099Spst * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 1618099Spst * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 1718099Spst * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 1818099Spst * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 1918099Spst * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 2018099Spst * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 2118099Spst * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 2218099Spst * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 2318099Spst * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 2418099Spst * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 2518099Spst * 2618099Spst * $FreeBSD: head/sys/ia64/include/profile.h 139790 2005-01-06 22:18:23Z imp $ 2718099Spst */ 2818099Spst 2918099Spst#ifndef _MACHINE_PROFILE_H_ 3018099Spst#define _MACHINE_PROFILE_H_ 3118099Spst 3218099Spst#define _MCOUNT_DECL void __mcount 3318099Spst#define MCOUNT 3418099Spst 3518099Spst#define FUNCTION_ALIGNMENT 32 3618099Spst 3718099Spsttypedef unsigned long fptrdiff_t; 3818099Spst 3918099Spst#ifdef _KERNEL 4018099Spst/* 4118099Spst * The following two macros do splhigh and splx respectively. 4218099Spst */ 4318099Spst#define MCOUNT_ENTER(s) s = intr_disable() 4418099Spst#define MCOUNT_EXIT(s) intr_restore(s) 4518099Spst#define MCOUNT_DECL(s) register_t s; 4618099Spst 4718099Spstvoid bintr(void); 4818099Spstvoid btrap(void); 4918099Spstvoid eintr(void); 5018099Spstvoid user(void); 5118099Spst 5218099Spst#define MCOUNT_FROMPC_USER(pc) \ 5318099Spst ((pc < (uintfptr_t)VM_MAXUSER_ADDRESS) ? ~0UL : pc) 5418099Spst 5518099Spst#define MCOUNT_FROMPC_INTR(pc) (~0UL) 5618099Spst 5718099Spst_MCOUNT_DECL(uintfptr_t, uintfptr_t); 5818099Spst 5918099Spst#else /* !_KERNEL */ 6018099Spst 6118099Spsttypedef unsigned long uintfptr_t; 6218099Spst 6318099Spst#endif 6418099Spst 6518099Spst#endif /* _MACHINE_PROFILE_H_ */ 6618099Spst