Commit cfbe3cfb authored by Lynn Boger's avatar Lynn Boger Committed by Brad Fitzpatrick

runtime: fix implementation of cputicks for ppc64x

The implementation of cputicks has been wrong for ppc64x. The
previous code sequence is for 32 bit, not 64 bit.

Change-Id: I308ae6cf9131f53a0100cd3f8ae4e16601f2d553
Reviewed-on: https://go-review.googlesource.com/129595
Run-TryBot: Lynn Boger <laboger@linux.vnet.ibm.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: 's avatarCarlos Eduardo Seo <cseo@linux.vnet.ibm.com>
Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
parent f2d7e66e
......@@ -723,18 +723,11 @@ TEXT runtime·abort(SB),NOSPLIT|NOFRAME,$0-0
MOVW (R0), R0
UNDEF
#define TBRL 268
#define TBRU 269 /* Time base Upper/Lower */
#define TBR 268
// int64 runtime·cputicks(void)
TEXT runtime·cputicks(SB),NOSPLIT,$0-8
MOVW SPR(TBRU), R4
MOVW SPR(TBRL), R3
MOVW SPR(TBRU), R5
CMPW R4, R5
BNE -4(PC)
SLD $32, R5
OR R5, R3
MOVD SPR(TBR), R3
MOVD R3, ret+0(FP)
RET
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment