[llvm] r205896 - [ARM64] Properly support both apple and standard syntax for FMOV
Bradley Smith
bradley.smith at arm.com
Wed Apr 9 07:44:50 PDT 2014
Author: brasmi01
Date: Wed Apr 9 09:44:49 2014
New Revision: 205896
URL: http://llvm.org/viewvc/llvm-project?rev=205896&view=rev
Log:
[ARM64] Properly support both apple and standard syntax for FMOV
Added:
llvm/trunk/test/MC/Disassembler/ARM64/non-apple-fmov.txt (with props)
Modified:
llvm/trunk/lib/Target/ARM64/ARM64InstrFormats.td
llvm/trunk/test/MC/ARM64/fp-encoding.s
llvm/trunk/test/MC/Disassembler/ARM64/scalar-fp.txt
Modified: llvm/trunk/lib/Target/ARM64/ARM64InstrFormats.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM64/ARM64InstrFormats.td?rev=205896&r1=205895&r2=205896&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM64/ARM64InstrFormats.td (original)
+++ llvm/trunk/lib/Target/ARM64/ARM64InstrFormats.td Wed Apr 9 09:44:49 2014
@@ -3277,8 +3277,10 @@ class BaseUnscaledConversion<bits<2> rmo
let mayLoad = 0, mayStore = 0, hasSideEffects = 0 in
class BaseUnscaledConversionToHigh<bits<2> rmode, bits<3> opcode,
- RegisterClass srcType, RegisterOperand dstType, string asm>
- : I<(outs dstType:$Rd), (ins srcType:$Rn), asm, "\t$Rd[1], $Rn", "", []>,
+ RegisterClass srcType, RegisterOperand dstType, string asm,
+ string kind>
+ : I<(outs dstType:$Rd), (ins srcType:$Rn), asm,
+ "{\t$Rd"#kind#"[1], $Rn|"#kind#"\t$Rd[1], $Rn}", "", []>,
Sched<[WriteFCopy]> {
bits<5> Rd;
bits<5> Rn;
@@ -3293,8 +3295,10 @@ class BaseUnscaledConversionToHigh<bits<
let mayLoad = 0, mayStore = 0, hasSideEffects = 0 in
class BaseUnscaledConversionFromHigh<bits<2> rmode, bits<3> opcode,
- RegisterOperand srcType, RegisterClass dstType, string asm>
- : I<(outs dstType:$Rd), (ins srcType:$Rn), asm, "\t$Rd, $Rn[1]", "", []>,
+ RegisterOperand srcType, RegisterClass dstType, string asm,
+ string kind>
+ : I<(outs dstType:$Rd), (ins srcType:$Rn), asm,
+ "{\t$Rd, $Rn"#kind#"[1]|"#kind#"\t$Rd, $Rn[1]}", "", []>,
Sched<[WriteFCopy]> {
bits<5> Rd;
bits<5> Rn;
@@ -3331,21 +3335,16 @@ multiclass UnscaledConversion<string asm
}
def XDHighr : BaseUnscaledConversionToHigh<0b01, 0b111, GPR64, V128,
- asm#".d"> {
+ asm, ".d"> {
let Inst{31} = 1;
let Inst{22} = 0;
}
def DXHighr : BaseUnscaledConversionFromHigh<0b01, 0b110, V128, GPR64,
- asm#".d"> {
+ asm, ".d"> {
let Inst{31} = 1;
let Inst{22} = 0;
}
-
- def : InstAlias<asm#"$Vd.d[1], $Rn",
- (!cast<Instruction>(NAME#XDHighr) V128:$Vd, GPR64:$Rn), 0>;
- def : InstAlias<asm#"$Rd, $Vn.d[1]",
- (!cast<Instruction>(NAME#DXHighr) GPR64:$Rd, V128:$Vn), 0>;
}
//---
Modified: llvm/trunk/test/MC/ARM64/fp-encoding.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/ARM64/fp-encoding.s?rev=205896&r1=205895&r2=205896&view=diff
==============================================================================
--- llvm/trunk/test/MC/ARM64/fp-encoding.s (original)
+++ llvm/trunk/test/MC/ARM64/fp-encoding.s Wed Apr 9 09:44:49 2014
@@ -1,4 +1,4 @@
-; RUN: llvm-mc -triple arm64-apple-darwin -show-encoding < %s | FileCheck %s
+; RUN: llvm-mc -triple arm64-apple-darwin -show-encoding -output-asm-variant=1 < %s | FileCheck %s
foo:
;-----------------------------------------------------------------------------
Added: llvm/trunk/test/MC/Disassembler/ARM64/non-apple-fmov.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/Disassembler/ARM64/non-apple-fmov.txt?rev=205896&view=auto
==============================================================================
--- llvm/trunk/test/MC/Disassembler/ARM64/non-apple-fmov.txt (added)
+++ llvm/trunk/test/MC/Disassembler/ARM64/non-apple-fmov.txt Wed Apr 9 09:44:49 2014
@@ -0,0 +1,7 @@
+# RUN: llvm-mc -triple arm64 -disassemble < %s | FileCheck %s
+
+0x00 0x00 0xae 0x9e
+0x00 0x00 0xaf 0x9e
+
+# CHECK: fmov x0, v0.d[1]
+# CHECK: fmov v0.d[1], x0
Propchange: llvm/trunk/test/MC/Disassembler/ARM64/non-apple-fmov.txt
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: llvm/trunk/test/MC/Disassembler/ARM64/non-apple-fmov.txt
------------------------------------------------------------------------------
svn:keywords = Rev Date Author URL Id
Modified: llvm/trunk/test/MC/Disassembler/ARM64/scalar-fp.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/Disassembler/ARM64/scalar-fp.txt?rev=205896&r1=205895&r2=205896&view=diff
==============================================================================
--- llvm/trunk/test/MC/Disassembler/ARM64/scalar-fp.txt (original)
+++ llvm/trunk/test/MC/Disassembler/ARM64/scalar-fp.txt Wed Apr 9 09:44:49 2014
@@ -1,4 +1,4 @@
-# RUN: llvm-mc -triple arm64-apple-darwin --disassemble < %s | FileCheck %s
+# RUN: llvm-mc -triple arm64-apple-darwin --disassemble -output-asm-variant=1 < %s | FileCheck %s
#-----------------------------------------------------------------------------
# Floating-point arithmetic
More information about the llvm-commits
mailing list