Commit 3ec0427a authored by Carl Shapiro's avatar Carl Shapiro

cmd/go, runtime/cgo: explicitly target ARMv5T

The baseline architecture had been left to the GCC configured
default which can be more accomodating than the rest of the Go
toolchain.  This prevented instructions used by the 5g compiler,
like BLX, from being used in GCC compiled assembler code.

R=golang-dev, dave, rsc, elias.naur, cshapiro
CC=golang-dev
https://golang.org/cl/12954043
parent 89ecedab
......@@ -1837,7 +1837,7 @@ func (b *builder) gccArchArgs() []string {
case "6":
return []string{"-m64"}
case "5":
return []string{"-marm"} // not thumb
return []string{"-marm", "-march=armv5t"} // not thumb
}
return nil
}
......
......@@ -25,12 +25,8 @@ EXT(crosscall_arm2):
mov r5, r1
mov r0, r2
mov r1, r3
// setmg(m, g)
mov lr, pc
mov pc, r5
// fn()
mov lr, pc
mov pc, r4
blx r5 // setmg(m, g)
blx r4 // fn()
pop {r4, r5, r6, r7, r8, r9, r10, r11, ip, pc}
.globl EXT(__stack_chk_fail_local)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment