Skip to content

Commit 475e083

Browse files
committed
Revert "runtime: Check LSE support on ARM64 at runtime init"
This reverts CL 610195. Reason for revert: SIGILL on macOS. See issue #71411. Updates #69124, #60905. Fixes #71411. Change-Id: Ie0624e516dfb32fb13563327bcd7f557e5cba940 Reviewed-on: https://go-review.googlesource.com/c/go/+/644695 LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Keith Randall <[email protected]> Reviewed-by: Keith Randall <[email protected]> Reviewed-by: Mauri de Souza Meneguzzo <[email protected]>
1 parent e2e700f commit 475e083

File tree

1 file changed

+0
-37
lines changed

1 file changed

+0
-37
lines changed

src/runtime/asm_arm64.s

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,6 @@
88
#include "funcdata.h"
99
#include "textflag.h"
1010

11-
#ifdef GOARM64_LSE
12-
DATA no_lse_msg<>+0x00(SB)/64, $"This program can only run on ARM64 processors with LSE support.\n"
13-
GLOBL no_lse_msg<>(SB), RODATA, $64
14-
#endif
15-
1611
TEXT runtime·rt0_go(SB),NOSPLIT|TOPFRAME,$0
1712
// SP = stack; R0 = argc; R1 = argv
1813

@@ -82,21 +77,6 @@ nocgo:
8277
BL runtime·wintls(SB)
8378
#endif
8479

85-
// Check that CPU we use for execution supports instructions targeted during compile-time.
86-
#ifdef GOARM64_LSE
87-
#ifndef GOOS_openbsd
88-
// Read the ID_AA64ISAR0_EL1 register
89-
MRS ID_AA64ISAR0_EL1, R0
90-
91-
// Extract the LSE field (bits [23:20])
92-
LSR $20, R0, R0
93-
AND $0xf, R0, R0
94-
95-
// LSE support is indicated by a non-zero value
96-
CBZ R0, no_lse
97-
#endif
98-
#endif
99-
10080
MOVW 8(RSP), R0 // copy argc
10181
MOVW R0, -8(RSP)
10282
MOVD 16(RSP), R0 // copy argv
@@ -115,23 +95,6 @@ nocgo:
11595

11696
// start this M
11797
BL runtime·mstart(SB)
118-
RET
119-
120-
#ifdef GOARM64_LSE
121-
#ifndef GOOS_openbsd
122-
no_lse:
123-
MOVD $1, R0 // stderr
124-
MOVD R0, 8(RSP)
125-
MOVD $no_lse_msg<>(SB), R1 // message address
126-
MOVD R1, 16(RSP)
127-
MOVD $64, R2 // message length
128-
MOVD R2, 24(RSP)
129-
CALL runtime·write(SB)
130-
CALL runtime·exit(SB)
131-
CALL runtime·abort(SB)
132-
RET
133-
#endif
134-
#endif
13598

13699
// Prevent dead-code elimination of debugCallV2 and debugPinnerV1, which are
137100
// intended to be called by debuggers.

0 commit comments

Comments
 (0)