android_kernel_motorola_sm6225/arch/sparc64/kernel/getsetcc.S
David S. Miller 6eda3a7592 sparc64: Split entry.S up into seperate files.
entry.S was a hodge-podge of several totally unrelated
sets of assembler routines, ranging from FPU trap handlers
to hypervisor call functions.

Split it up into topic-sized pieces.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-04-28 00:47:20 -07:00

24 lines
475 B
ArmAsm

.globl getcc
.type getcc,#function
getcc:
ldx [%o0 + PT_V9_TSTATE], %o1
srlx %o1, 32, %o1
and %o1, 0xf, %o1
retl
stx %o1, [%o0 + PT_V9_G1]
.size getcc,.-getcc
.globl setcc
.type setcc,#function
setcc:
ldx [%o0 + PT_V9_TSTATE], %o1
ldx [%o0 + PT_V9_G1], %o2
or %g0, %ulo(TSTATE_ICC), %o3
sllx %o3, 32, %o3
andn %o1, %o3, %o1
sllx %o2, 32, %o2
and %o2, %o3, %o2
or %o1, %o2, %o1
retl
stx %o1, [%o0 + PT_V9_TSTATE]
.size setcc,.-setcc