From: Dave Cheney Date: Sun, 29 Dec 2013 04:25:34 +0000 (+1100) Subject: runtime: load runtime.goarm as a byte, not a word X-Git-Tag: go1.3beta1~1097 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=d2fe44d56834b132f3759cef4bcd5dcc1bfeaa5c;p=gostls13.git 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 --- 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