mirror of https://github.com/golang/go.git
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: Carlos Eduardo Seo <cseo@linux.vnet.ibm.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
parent
f2d7e66e98
commit
cfbe3cfbeb
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue