profile.h 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. /* $NetBSD: profile.h,v 1.6 1995/03/28 18:17:08 jtc Exp $ */
  2. /*
  3. * Copyright (c) 1992, 1993
  4. * The Regents of the University of California. All rights reserved.
  5. *
  6. * Redistribution and use in source and binary forms, with or without
  7. * modification, are permitted provided that the following conditions
  8. * are met:
  9. * 1. Redistributions of source code must retain the above copyright
  10. * notice, this list of conditions and the following disclaimer.
  11. * 2. Redistributions in binary form must reproduce the above copyright
  12. * notice, this list of conditions and the following disclaimer in the
  13. * documentation and/or other materials provided with the distribution.
  14. * 4. Neither the name of the University nor the names of its contributors
  15. * may be used to endorse or promote products derived from this software
  16. * without specific prior written permission.
  17. *
  18. * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  19. * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  20. * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  21. * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  22. * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  23. * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  24. * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  25. * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  26. * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  27. * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  28. * SUCH DAMAGE.
  29. *
  30. * @(#)profile.h 8.1 (Berkeley) 6/11/93
  31. */
  32. /*
  33. * This file is taken from Cygwin distribution. Please keep it in sync.
  34. * The differences should be within __MINGW32__ guard.
  35. */
  36. #include <_mingw_mac.h>
  37. /* If compiler doesn't inline, at least avoid passing args on the stack. */
  38. #ifndef _WIN64
  39. #define _MCOUNT_CALL __attribute__ ((regparm (2)))
  40. #else
  41. #define _MCOUNT_CALL
  42. #endif
  43. #define _MCOUNT_DECL __attribute__((gnu_inline)) __inline__ \
  44. void _MCOUNT_CALL _mcount_private
  45. /* gcc always assumes the mcount public symbol has a single leading underscore
  46. for our target. See gcc/config/i386.h; it isn't overridden in
  47. config/i386/cygming.h or any other places for mingw */
  48. extern void __MINGW_LSYMBOL(mcount)(void);
  49. /* FIXME: This works, but it would be cleaner to convert mcount into an
  50. assembler stub that calls an extern _mcount.
  51. Older versions of GCC (pre-4.1) will still fail with regparm since the
  52. compiler used %edx to store an unneeded counter variable. */
  53. #define MCOUNT