Qore Programming Language
0.8.11.1
Main Page
Related Pages
Modules
Classes
Files
File List
File Members
include
qore
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
/*
14
#define HAVE_ATOMIC_MACROS
15
16
static inline int atomic_dec(int *pw) {
17
}
18
19
static inline void atomic_inc(int *pw) {
20
}
21
*/
22
23
#define HAVE_CHECK_STACK_POS
24
25
static
inline
size_t
get_stack_pos() {
26
size_t
addr;
27
__asm__(
"copy %%sp,%0"
:
"=r"
(addr) );
28
return
addr;
29
}
30
31
#endif
32
33
#ifdef __HP_aCC
34
35
//#define HAVE_ATOMIC_MACROS
36
37
// routines are implemented in assembler
38
//extern "C" int atomic_dec(int *pw);
39
//extern "C" void atomic_inc(int *pw);
40
41
#define HAVE_CHECK_STACK_POS
42
43
extern
"C"
size_t
get_stack_pos();
44
45
#endif
46
47
#endif
48
49
#endif