Qore Programming Language  1.7.0
macros-parisc.h
1 /* -*- mode: c++; indent-tabs-mode: nil -*- */
2 #ifndef _QORE_MACHINE_MACROS_H
3 
4 #define _QORE_MACHINE_MACROS_H
5 
6 // need 10KB on HPUX on PA-RISC
7 #define QORE_STACK_GUARD (1024 * 10)
8 
9 // we don't have code for 64-bit pa-risc yet
10 #if !defined(__LP64__)
11 
12 #define STACK_DIRECTION_UP 1
13 
14 #ifdef __GNUC__
15 
16 #define HAVE_CHECK_STACK_POS
17 
18 static inline size_t get_stack_pos() {
19  size_t addr;
20  __asm__("copy %%sp,%0" : "=r" (addr) );
21  return addr;
22 }
23 
24 #endif
25 
26 #ifdef __HP_aCC
27 
28 #define HAVE_CHECK_STACK_POS
29 
30 extern "C" size_t get_stack_pos();
31 
32 #endif
33 
34 #endif
35 
36 #endif