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
case "6":
return []string{"-m64"}
case "5":
- return []string{"-marm"} // not thumb
+ return []string{"-marm", "-march=armv5t"} // not thumb
}
return nil
}
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)