Qore Programming Language  0.9.16
macros-aarch64.h
1 /* -*- mode: c++; indent-tabs-mode: nil -*- */
2 #ifndef _QORE_MACHINE_MACROS_H
3 
4 #define _QORE_MACHINE_MACROS_H
5 
6 #define STACK_DIRECTION_DOWN 1
7 
8 #define QORE_STACK_GUARD (16 * 1024)
9 
10 #ifdef __GNUC__
11 
12 #define HAVE_CHECK_STACK_POS
13 
14 static inline size_t get_stack_pos() {
15  size_t addr;
16  __asm__("mov %0, sp" : "=r" (addr) );
17  return addr;
18 }
19 
20 #endif
21 
22 #endif