Go to the documentation of this file. 1 #ifndef _SPARC64_HEAD_H
2 #define _SPARC64_HEAD_H
11 #define GET_GL_GLOBAL(N) \
12 .word 0x81540000 | (N << 25)
14 #define KERNBASE 0x400000
16 #define PTREGS_OFF (STACK_BIAS + STACKFRAME_SZ)
18 #define __CHEETAH_ID 0x003e0014
19 #define __JALAPENO_ID 0x003e0016
20 #define __SERRANO_ID 0x003e0022
22 #define CHEETAH_MANUF 0x003e
23 #define CHEETAH_IMPL 0x0014
24 #define CHEETAH_PLUS_IMPL 0x0015
25 #define JALAPENO_IMPL 0x0016
26 #define JAGUAR_IMPL 0x0018
27 #define PANTHER_IMPL 0x0019
28 #define SERRANO_IMPL 0x0022
30 #define BRANCH_IF_SUN4V(tmp1,label) \
31 sethi %hi(is_sun4v), %tmp1; \
32 lduw [%tmp1 + %lo(is_sun4v)], %tmp1; \
33 brnz,pn %tmp1, label; \
36 #define BRANCH_IF_CHEETAH_BASE(tmp1,tmp2,label) \
38 sethi %hi(__CHEETAH_ID), %tmp2; \
39 srlx %tmp1, 32, %tmp1; \
40 or %tmp2, %lo(__CHEETAH_ID), %tmp2;\
45 #define BRANCH_IF_JALAPENO(tmp1,tmp2,label) \
47 sethi %hi(__JALAPENO_ID), %tmp2; \
48 srlx %tmp1, 32, %tmp1; \
49 or %tmp2, %lo(__JALAPENO_ID), %tmp2;\
54 #define BRANCH_IF_CHEETAH_PLUS_OR_FOLLOWON(tmp1,tmp2,label) \
56 srlx %tmp1, (32 + 16), %tmp2; \
57 cmp %tmp2, CHEETAH_MANUF; \
59 sllx %tmp1, 16, %tmp1; \
60 srlx %tmp1, (32 + 16), %tmp2; \
61 cmp %tmp2, CHEETAH_PLUS_IMPL; \
62 bgeu,pt %xcc, label; \
65 #define BRANCH_IF_ANY_CHEETAH(tmp1,tmp2,label) \
67 srlx %tmp1, (32 + 16), %tmp2; \
68 cmp %tmp2, CHEETAH_MANUF; \
70 sllx %tmp1, 16, %tmp1; \
71 srlx %tmp1, (32 + 16), %tmp2; \
72 cmp %tmp2, CHEETAH_IMPL; \
73 bgeu,pt %xcc, label; \