Qore Programming Language  1.12.0
macros-riscv.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 #ifdef __GNUC__
9 
10 #define HAVE_CHECK_STACK_POS
11 
12 static inline size_t get_stack_pos()
13 {
14  size_t addr;
15  __asm__("mv %0, sp" : "=r" (addr));
16  return addr;
17 }
18 
19 #endif
20 
21 #endif