cpu_arm64.s 771 B

1234567891011121314151617181920212223242526272829303132
  1. // Copyright 2019 The Go Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style
  3. // license that can be found in the LICENSE file.
  4. //go:build gc
  5. // +build gc
  6. #include "textflag.h"
  7. // func getisar0() uint64
  8. TEXT ·getisar0(SB),NOSPLIT,$0-8
  9. // get Instruction Set Attributes 0 into x0
  10. // mrs x0, ID_AA64ISAR0_EL1 = d5380600
  11. WORD $0xd5380600
  12. MOVD R0, ret+0(FP)
  13. RET
  14. // func getisar1() uint64
  15. TEXT ·getisar1(SB),NOSPLIT,$0-8
  16. // get Instruction Set Attributes 1 into x0
  17. // mrs x0, ID_AA64ISAR1_EL1 = d5380620
  18. WORD $0xd5380620
  19. MOVD R0, ret+0(FP)
  20. RET
  21. // func getpfr0() uint64
  22. TEXT ·getpfr0(SB),NOSPLIT,$0-8
  23. // get Processor Feature Register 0 into x0
  24. // mrs x0, ID_AA64PFR0_EL1 = d5380400
  25. WORD $0xd5380400
  26. MOVD R0, ret+0(FP)
  27. RET