diff options
Diffstat (limited to 'sys/powerpc')
-rw-r--r-- | sys/powerpc/include/profile.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/sys/powerpc/include/profile.h b/sys/powerpc/include/profile.h index 6960fb1..f7ee088 100644 --- a/sys/powerpc/include/profile.h +++ b/sys/powerpc/include/profile.h @@ -49,6 +49,20 @@ _mcount() \ #define MCOUNT_ENTER(s) #define MCOUNT_EXIT(s) #define MCOUNT_DECL(s) + +void bintr(void); +void btrap(void); +void eintr(void); +void user(void); + +#define MCOUNT_FROMPC_USER(pc) \ + ((pc < (uintfptr_t)VM_MAXUSER_ADDRESS) ? (uintfptr_t)user : pc) + +#define MCOUNT_FROMPC_INTR(pc) \ + ((pc >= (uintfptr_t)btrap && pc < (uintfptr_t)eintr) ? \ + ((pc >= (uintfptr_t)bintr) ? (uintfptr_t)bintr : \ + (uintfptr_t)btrap) : ~0U) + #endif #endif /* !_MACHINE_PROFILE_H_ */ |