aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/asm/internal/arch
diff options
context:
space:
mode:
authorRob Pike <r@golang.org>2015-02-20 16:02:11 -0800
committerRob Pike <r@golang.org>2015-02-21 01:53:30 +0000
commit5d111b898ad83fc09470f1a98f481f4e9f5a4cdf (patch)
tree28992d29e46120ca5c711f502271a66ec1690f92 /src/cmd/asm/internal/arch
parentc11dadc503dede91677cbaef67fb4a0ce2dc6fa8 (diff)
downloadgo-5d111b898ad83fc09470f1a98f481f4e9f5a4cdf.tar.xz
[dev.cc] cm/asm: fix up arm after cross-check with 5a
As with the previous round for ppc64, this CL fixes a couple of things that 5a supported but asm did not, both simple. 1) Allow condition code on MRC instruction; this was marked as a TODO. 2) Allow R(n) notation in ARM register shifts. The code needs a rethink but the tests we're leading toward will make the rewrite easier to test and trust. Change-Id: I5b52ad25d177a74cf07e089dddfeeab21863c424 Reviewed-on: https://go-review.googlesource.com/5422 Reviewed-by: Russ Cox <rsc@golang.org>
Diffstat (limited to 'src/cmd/asm/internal/arch')
-rw-r--r--src/cmd/asm/internal/arch/arm.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/cmd/asm/internal/arch/arm.go b/src/cmd/asm/internal/arch/arm.go
index 75bb0be168..fab896a79f 100644
--- a/src/cmd/asm/internal/arch/arm.go
+++ b/src/cmd/asm/internal/arch/arm.go
@@ -150,7 +150,7 @@ func ARMConditionCodes(prog *obj.Prog, cond string) bool {
if cond == "" {
return true
}
- bits, ok := parseARMCondition(cond)
+ bits, ok := ParseARMCondition(cond)
if !ok {
return false
}
@@ -163,10 +163,10 @@ func ARMConditionCodes(prog *obj.Prog, cond string) bool {
return true
}
-// parseARMCondition parses the conditions attached to an ARM instruction.
+// ParseARMCondition parses the conditions attached to an ARM instruction.
// The input is a single string consisting of period-separated condition
// codes, such as ".P.W". An initial period is ignored.
-func parseARMCondition(cond string) (uint8, bool) {
+func ParseARMCondition(cond string) (uint8, bool) {
if strings.HasPrefix(cond, ".") {
cond = cond[1:]
}