diff options
| author | Rob Pike <r@golang.org> | 2015-09-02 13:11:26 -0700 |
|---|---|---|
| committer | Rob Pike <r@golang.org> | 2015-09-03 19:40:11 +0000 |
| commit | 36af087aeff187d0881aed51e7822e2b2bb66b27 (patch) | |
| tree | d7bff3b6b664721557271504a264cd0a641263c7 /src/cmd/asm/internal/arch | |
| parent | d737639c4acce7c9f28de22eabfd623d0ae7ed50 (diff) | |
| download | go-36af087aeff187d0881aed51e7822e2b2bb66b27.tar.xz | |
cmd/asm: handle CMPF and CMPD on ARM
These instructions are special cases that were missed in the translation.
The second argument must go into the Reg field not the To field.
Fixes #12458
For Go 1.5.1
Change-Id: Iad57c60c7e38e3bcfafda483ed5037ce670e8816
Reviewed-on: https://go-review.googlesource.com/14183
Reviewed-by: Dave Cheney <dave@cheney.net>
Reviewed-by: Russ Cox <rsc@golang.org>
Diffstat (limited to 'src/cmd/asm/internal/arch')
| -rw-r--r-- | src/cmd/asm/internal/arch/arm.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/cmd/asm/internal/arch/arm.go b/src/cmd/asm/internal/arch/arm.go index c030214460..8df994e8d1 100644 --- a/src/cmd/asm/internal/arch/arm.go +++ b/src/cmd/asm/internal/arch/arm.go @@ -121,6 +121,15 @@ func IsARMMRC(op int) bool { return false } +// IsARMFloatCmp reports whether the op is a floating comparison instruction. +func IsARMFloatCmp(op int) bool { + switch op { + case arm.ACMPF, arm.ACMPD: + return true + } + return false +} + // ARMMRCOffset implements the peculiar encoding of the MRC and MCR instructions. // The difference between MRC and MCR is represented by a bit high in the word, not // in the usual way by the opcode itself. Asm must use AMRC for both instructions, so |
