1
0
mirror of https://github.com/golang/go synced 2024-11-25 00:17:58 -07:00

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
This commit is contained in:
Carl Shapiro 2013-08-14 15:21:53 -07:00
parent 89ecedab26
commit 3ec0427a07
2 changed files with 3 additions and 7 deletions

View File

@ -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
}

View File

@ -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)