00001
00002 #ifndef _QORE_MACHINE_MACROS_H
00003
00004 #define _QORE_MACHINE_MACROS_H
00005
00006
00007 #if !defined(__LP64__)
00008
00009 #define STACK_DIRECTION_UP 1
00010
00011 #ifdef __GNUC__
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #define HAVE_CHECK_STACK_POS
00024
00025 static inline size_t get_stack_pos() {
00026 size_t addr;
00027 __asm__("copy %%sp,%0" : "=r" (addr) );
00028 return addr;
00029 }
00030
00031 #endif
00032
00033 #ifdef __HP_aCC
00034
00035
00036
00037
00038
00039
00040
00041 #define HAVE_CHECK_STACK_POS
00042
00043 extern "C" size_t get_stack_pos();
00044
00045 #endif
00046
00047 #endif
00048
00049 #endif