freebsd-dev/sys/libkern
Marcel Moolenaar 0f2fe153bc Move the kernel-specific logic to adjust frompc from MI to MD. For
these two reasons:
1. On ia64 a function pointer does not hold the address of the first
   instruction of a functions implementation. It holds the address
   of a function descriptor. Hence the user(), btrap(), eintr() and
   bintr() prototypes are wrong for getting the actual code address.
2. The logic forces interrupt, trap and exception entry points to
   be layed-out contiguously. This can not be achieved on ia64 and is
   generally just bad programming.

The MCOUNT_FROMPC_USER macro is used to set the frompc argument to
some kernel address which represents any frompc that falls outside
the kernel text range. The macro can expand to ~0U to bail out in
that case.
The MCOUNT_FROMPC_INTR macro is used to set the frompc argument to
some kernel address to represent a call to a trap or interrupt
handler. This to avoid that the trap or interrupt handler appear to
be called from everywhere in the call graph. The macro can expand
to ~0U to prevent adjusting frompc. Note that the argument is selfpc,
not frompc.

This commit defines the macros on all architectures equivalently to
the original code in sys/libkern/mcount.c. People can take it from
here...

Compile-tested on: alpha, amd64, i386, ia64 and sparc64
Boot-tested on: i386
2004-08-27 19:42:35 +00:00
..
alpha
arm Import libkern arm specific bits. 2004-05-14 12:28:31 +00:00
ia64 Improve a comment and undo a bogus s/a/an/ in a comment. An asm guru 2003-02-11 20:15:11 +00:00
arc4random.c Lock down arc4random so it can be safely called w/o Giant. 2003-08-15 06:34:47 +00:00
ashldi3.c Remove advertising clause from University of California Regent's 2004-04-07 20:46:16 +00:00
ashrdi3.c Remove advertising clause from University of California Regent's 2004-04-07 20:46:16 +00:00
bcd.c Use __FBSDID(). 2003-06-11 05:37:42 +00:00
bcmp.c Remove advertising clause from University of California Regent's 2004-04-07 20:46:16 +00:00
bsearch.c Remove advertising clause from University of California Regent's 2004-04-07 20:46:16 +00:00
crc32.c Use __FBSDID(). 2003-06-11 05:37:42 +00:00
divdi3.c Remove advertising clause from University of California Regent's 2004-04-07 20:46:16 +00:00
ffs.c Remove advertising clause from University of California Regent's 2004-04-07 20:46:16 +00:00
ffsl.c Remove advertising clause from University of California Regent's 2004-04-07 20:46:16 +00:00
fls.c Remove advertising clause from University of California Regent's 2004-04-07 20:46:16 +00:00
flsl.c Remove advertising clause from University of California Regent's 2004-04-07 20:46:16 +00:00
fnmatch.c Remove advertising clause from University of California Regent's 2004-04-07 20:46:16 +00:00
iconv_converter_if.m - Support for multibyte charsets in LIBICONV. 2003-09-26 20:26:25 +00:00
iconv_xlat16.c Make msdosfs long filenames matching case insensitive again. 2003-12-08 08:32:20 +00:00
iconv_xlat.c - Support for multibyte charsets in LIBICONV. 2003-09-26 20:26:25 +00:00
iconv.c Convert the vfsconf list to a TAILQ. 2004-07-27 22:32:01 +00:00
index.c Remove advertising clause from University of California Regent's 2004-04-07 20:46:16 +00:00
inet_ntoa.c Use __FBSDID(). 2003-06-11 05:37:42 +00:00
lshrdi3.c Remove advertising clause from University of California Regent's 2004-04-07 20:46:16 +00:00
mcount.c Move the kernel-specific logic to adjust frompc from MI to MD. For 2004-08-27 19:42:35 +00:00
moddi3.c Remove advertising clause from University of California Regent's 2004-04-07 20:46:16 +00:00
qdivrem.c Remove advertising clause from University of California Regent's 2004-04-07 20:46:16 +00:00
qsort_r.c Copy qsort_r(3) from libc to libkern. 2004-07-15 23:58:23 +00:00
qsort.c Copy qsort_r(3) from libc to libkern. 2004-07-15 23:58:23 +00:00
quad.h Fixed some style bugs (unsorting of prototypes in previous commit, and 2004-05-05 15:12:55 +00:00
random.c Remove advertising clause from University of California Regent's 2004-04-07 20:46:16 +00:00
rindex.c Remove advertising clause from University of California Regent's 2004-04-07 20:46:16 +00:00
scanc.c Remove advertising clause from University of California Regent's 2004-04-07 20:46:16 +00:00
skpc.c Remove advertising clause from University of California Regent's 2004-04-07 20:46:16 +00:00
strcat.c Remove advertising clause from University of California Regent's 2004-04-07 20:46:16 +00:00
strcmp.c Remove advertising clause from University of California Regent's 2004-04-07 20:46:16 +00:00
strcpy.c Remove advertising clause from University of California Regent's 2004-04-07 20:46:16 +00:00
strdup.c Use __FBSDID(). 2003-06-11 05:37:42 +00:00
strlcat.c Use sys/libkern.h not /usr/include/string.h 2002-09-06 06:04:36 +00:00
strlcpy.c Use sys/libkern.h not /usr/include/string.h 2002-09-06 06:04:36 +00:00
strlen.c Remove advertising clause from University of California Regent's 2004-04-07 20:46:16 +00:00
strncmp.c Remove advertising clause from University of California Regent's 2004-04-07 20:46:16 +00:00
strncpy.c Remove advertising clause from University of California Regent's 2004-04-07 20:46:16 +00:00
strsep.c Remove advertising clause from University of California Regent's 2004-04-07 20:46:16 +00:00
strtol.c Remove advertising clause from University of California Regent's 2004-04-07 20:46:16 +00:00
strtoq.c Remove advertising clause from University of California Regent's 2004-04-07 20:46:16 +00:00
strtoul.c Remove advertising clause from University of California Regent's 2004-04-07 20:46:16 +00:00
strtouq.c Remove advertising clause from University of California Regent's 2004-04-07 20:46:16 +00:00
strvalid.c Use __FBSDID(). 2003-06-11 05:37:42 +00:00
ucmpdi2.c Remove advertising clause from University of California Regent's 2004-04-07 20:46:16 +00:00
udivdi3.c Remove advertising clause from University of California Regent's 2004-04-07 20:46:16 +00:00
umoddi3.c Remove advertising clause from University of California Regent's 2004-04-07 20:46:16 +00:00