From 90590a0cd210686a34bd4b645e0ef3ae468795e4 Mon Sep 17 00:00:00 2001 From: Rob Pike Date: Tue, 24 Feb 2015 11:00:07 -0800 Subject: [PATCH] cmd/asm: add alias for MOVOA=MOVO on amd64 The alias should exist for both 386 and amd64. There were a few others missing as well. Add them. Change-Id: Ia0c3e71abc79f67a7a66941c0d932a8d5d6e9989 Reviewed-on: https://go-review.googlesource.com/5800 Reviewed-by: Russ Cox --- src/cmd/asm/internal/arch/arch.go | 45 ++++++++++++++++++------------- 1 file changed, 27 insertions(+), 18 deletions(-) diff --git a/src/cmd/asm/internal/arch/arch.go b/src/cmd/asm/internal/arch/arch.go index eeed4700ba..942d1e3abc 100644 --- a/src/cmd/asm/internal/arch/arch.go +++ b/src/cmd/asm/internal/arch/arch.go @@ -210,36 +210,45 @@ func archAmd64() *Arch { instructions[s] = i } // Annoying aliases. + instructions["JA"] = x86.AJHI + instructions["JAE"] = x86.AJCC instructions["JB"] = x86.AJCS + instructions["JBE"] = x86.AJLS instructions["JC"] = x86.AJCS - instructions["JNAE"] = x86.AJCS - instructions["JLO"] = x86.AJCS - instructions["JAE"] = x86.AJCC - instructions["JNB"] = x86.AJCC - instructions["JNC"] = x86.AJCC - instructions["JHS"] = x86.AJCC instructions["JE"] = x86.AJEQ - instructions["JZ"] = x86.AJEQ - instructions["JNZ"] = x86.AJNE - instructions["JBE"] = x86.AJLS + instructions["JG"] = x86.AJGT + instructions["JHS"] = x86.AJCC + instructions["JL"] = x86.AJLT + instructions["JLO"] = x86.AJCS instructions["JNA"] = x86.AJLS - instructions["JA"] = x86.AJHI + instructions["JNAE"] = x86.AJCS + instructions["JNB"] = x86.AJCC instructions["JNBE"] = x86.AJHI - instructions["JS"] = x86.AJMI + instructions["JNC"] = x86.AJCC + instructions["JNG"] = x86.AJLE + instructions["JNGE"] = x86.AJLT + instructions["JNL"] = x86.AJGE + instructions["JNLE"] = x86.AJGT + instructions["JNO"] = x86.JOC + instructions["JNP"] = x86.AJPC instructions["JNS"] = x86.AJPL + instructions["JNZ"] = x86.AJNE + instructions["JO"] = x86.JOS instructions["JP"] = x86.AJPS instructions["JPE"] = x86.AJPS - instructions["JNP"] = x86.AJPC instructions["JPO"] = x86.AJPC - instructions["JL"] = x86.AJLT - instructions["JNGE"] = x86.AJLT - instructions["JNL"] = x86.AJGE - instructions["JNG"] = x86.AJLE - instructions["JG"] = x86.AJGT - instructions["JNLE"] = x86.AJGT + instructions["JS"] = x86.AJMI + instructions["JZ"] = x86.AJEQ instructions["MASKMOVDQU"] = x86.AMASKMOVOU instructions["MOVD"] = x86.AMOVQ instructions["MOVDQ2Q"] = x86.AMOVQ + instructions["MOVNTDQ"] = x86.MOVNTO + instructions["MOVOA"] = x86.AMOVO + instructions["MOVOA"] = x86.MOVO + instructions["PF2ID"] = x86.PF2IL + instructions["PI2FD"] = x86.PI2FL + instructions["PSLLDQ"] = x86.PSLLO + instructions["PSRLDQ"] = x86.PSRLO unaryDestination := make(map[int]bool) // Instruction takes one operand and result is a destination. // These instructions write to prog.To. -- 2.48.1