From d2fe44d56834b132f3759cef4bcd5dcc1bfeaa5c Mon Sep 17 00:00:00 2001 From: Dave Cheney Date: Sun, 29 Dec 2013 15:25:34 +1100 Subject: [PATCH] runtime: load runtime.goarm as a byte, not a word Fixes #6952. runtime.asminit was incorrectly loading runtime.goarm as a word, not a uint8 which made it subject to alignment issues on arm5 platforms. Alignment aside, this also meant that the top 3 bytes in R11 would have been garbage and could not be assumed to be setting up the FPU reliably. R=iant, minux.ma CC=golang-codereviews https://golang.org/cl/46240043 --- src/pkg/runtime/asm_arm.s | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pkg/runtime/asm_arm.s b/src/pkg/runtime/asm_arm.s index a9ccfbe508..fa5540bdf0 100644 --- a/src/pkg/runtime/asm_arm.s +++ b/src/pkg/runtime/asm_arm.s @@ -91,7 +91,7 @@ TEXT runtime·breakpoint(SB),NOSPLIT,$0-0 TEXT runtime·asminit(SB),NOSPLIT,$0-0 // disable runfast (flush-to-zero) mode of vfp if runtime.goarm > 5 - MOVW runtime·goarm(SB), R11 + MOVB runtime·goarm(SB), R11 CMP $5, R11 BLE 4(PC) WORD $0xeef1ba10 // vmrs r11, fpscr -- 2.48.1