Root/arch/sparc/kernel/getsetcc.S

Source at commit 0de2b2b3be81048189a32f7a3d3ba0ba9ec817b6 created 11 years 11 months ago.
By Maarten ter Huurne, MIPS: JZ4740: Fixed value for round robin constant.
1    .globl getcc
2    .type getcc,#function
3getcc:
4    ldx [%o0 + PT_V9_TSTATE], %o1
5    srlx %o1, 32, %o1
6    and %o1, 0xf, %o1
7    retl
8     stx %o1, [%o0 + PT_V9_G1]
9    .size getcc,.-getcc
10
11    .globl setcc
12    .type setcc,#function
13setcc:
14    ldx [%o0 + PT_V9_TSTATE], %o1
15    ldx [%o0 + PT_V9_G1], %o2
16    or %g0, %ulo(TSTATE_ICC), %o3
17    sllx %o3, 32, %o3
18    andn %o1, %o3, %o1
19    sllx %o2, 32, %o2
20    and %o2, %o3, %o2
21    or %o1, %o2, %o1
22    retl
23     stx %o1, [%o0 + PT_V9_TSTATE]
24    .size setcc,.-setcc
25

Archive Download this file



interactive