Qore Programming Language  0.9.16
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 // we don't have code for 64-bit pa-risc yet
7 #if !defined(__LP64__)
8 
9 #define STACK_DIRECTION_UP 1
10 
11 #ifdef __GNUC__
12 
13 #define HAVE_CHECK_STACK_POS
14 
15 static inline size_t get_stack_pos() {
16  size_t addr;
17  __asm__("copy %%sp,%0" : "=r" (addr) );
18  return addr;
19 }
20 
21 #endif
22 
23 #ifdef __HP_aCC
24 
25 #define HAVE_CHECK_STACK_POS
26 
27 extern "C" size_t get_stack_pos();
28 
29 #endif
30 
31 #endif
32 
33 #endif