cpu_arm64.s 937 B

123456789101112131415161718192021222324252627282930313233343536373839
  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. #include "textflag.h"
  6. // func getisar0() uint64
  7. TEXT ·getisar0(SB),NOSPLIT,$0-8
  8. // get Instruction Set Attributes 0 into x0
  9. // mrs x0, ID_AA64ISAR0_EL1 = d5380600
  10. WORD $0xd5380600
  11. MOVD R0, ret+0(FP)
  12. RET
  13. // func getisar1() uint64
  14. TEXT ·getisar1(SB),NOSPLIT,$0-8
  15. // get Instruction Set Attributes 1 into x0
  16. // mrs x0, ID_AA64ISAR1_EL1 = d5380620
  17. WORD $0xd5380620
  18. MOVD R0, ret+0(FP)
  19. RET
  20. // func getpfr0() uint64
  21. TEXT ·getpfr0(SB),NOSPLIT,$0-8
  22. // get Processor Feature Register 0 into x0
  23. // mrs x0, ID_AA64PFR0_EL1 = d5380400
  24. WORD $0xd5380400
  25. MOVD R0, ret+0(FP)
  26. RET
  27. // func getzfr0() uint64
  28. TEXT ·getzfr0(SB),NOSPLIT,$0-8
  29. // get SVE Feature Register 0 into x0
  30. // mrs x0, ID_AA64ZFR0_EL1 = d5380480
  31. WORD $0xd5380480
  32. MOVD R0, ret+0(FP)
  33. RET