From 0f0c0ac8be5d8f72be4e9a546cc72bb912fb28b0 Mon Sep 17 00:00:00 2001 From: Jim Grosbach Date: Tue, 18 Jun 2013 21:49:21 +0000 Subject: [PATCH] ARM: Add optional datatype suffix to NEON mvn asm syntax. rdar://14194152 llvm-svn: 184244 --- lib/Target/ARM/ARMInstrNEON.td | 7 +++++- test/MC/ARM/neon-mov-encoding.s | 39 +++++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+), 1 deletion(-) diff --git a/lib/Target/ARM/ARMInstrNEON.td b/lib/Target/ARM/ARMInstrNEON.td index 9d1a8ea38b1..32b8d67b05a 100644 --- a/lib/Target/ARM/ARMInstrNEON.td +++ b/lib/Target/ARM/ARMInstrNEON.td @@ -6698,12 +6698,17 @@ def VST4qWB_register_Asm_32 : (ins VecListFourQ:$list, addrmode6:$addr, rGPR:$Rm, pred:$p)>; -// VMOV takes an optional datatype suffix +// VMOV/VMVN takes an optional datatype suffix defm : NEONDTAnyInstAlias<"vmov${p}", "$Vd, $Vm", (VORRd DPR:$Vd, DPR:$Vm, DPR:$Vm, pred:$p)>; defm : NEONDTAnyInstAlias<"vmov${p}", "$Vd, $Vm", (VORRq QPR:$Vd, QPR:$Vm, QPR:$Vm, pred:$p)>; +defm : NEONDTAnyInstAlias<"vmvn${p}", "$Vd, $Vm", + (VMVNd DPR:$Vd, DPR:$Vm, pred:$p)>; +defm : NEONDTAnyInstAlias<"vmvn${p}", "$Vd, $Vm", + (VMVNq QPR:$Vd, QPR:$Vm, pred:$p)>; + // VCLT (register) is an assembler alias for VCGT w/ the operands reversed. // D-register versions. def : NEONInstAlias<"vcle${p}.s8 $Dd, $Dn, $Dm", diff --git a/test/MC/ARM/neon-mov-encoding.s b/test/MC/ARM/neon-mov-encoding.s index 6f26a13c3ea..ba66d7e14be 100644 --- a/test/MC/ARM/neon-mov-encoding.s +++ b/test/MC/ARM/neon-mov-encoding.s @@ -128,3 +128,42 @@ @ CHECK: vmov.8 d18[1], r1 @ encoding: [0xb0,0x1b,0x42,0xee] @ CHECK: vmov.16 d18[1], r1 @ encoding: [0xf0,0x1b,0x02,0xee] @ CHECK: vmov.32 d18[1], r1 @ encoding: [0x90,0x1b,0x22,0xee] + + + vmvn.8 d1, d2 + vmvn.16 d1, d2 + vmvn.32 d1, d2 + vmvn.64 d1, d2 + vmvn.i8 d1, d2 + vmvn.i16 d1, d2 + vmvn.i32 d1, d2 + vmvn.i64 d1, d2 + vmvn.s8 d1, d2 + vmvn.s16 d1, d2 + vmvn.s32 d1, d2 + vmvn.s64 d1, d2 + vmvn.u8 d1, d2 + vmvn.u16 d1, d2 + vmvn.u32 d1, d2 + vmvn.u64 d1, d2 + vmvn.f32 d1, d2 + vmvn.f64 d1, d2 + +@ CHECK: vmvn d1, d2 @ encoding: [0x82,0x15,0xb0,0xf3] +@ CHECK: vmvn d1, d2 @ encoding: [0x82,0x15,0xb0,0xf3] +@ CHECK: vmvn d1, d2 @ encoding: [0x82,0x15,0xb0,0xf3] +@ CHECK: vmvn d1, d2 @ encoding: [0x82,0x15,0xb0,0xf3] +@ CHECK: vmvn d1, d2 @ encoding: [0x82,0x15,0xb0,0xf3] +@ CHECK: vmvn d1, d2 @ encoding: [0x82,0x15,0xb0,0xf3] +@ CHECK: vmvn d1, d2 @ encoding: [0x82,0x15,0xb0,0xf3] +@ CHECK: vmvn d1, d2 @ encoding: [0x82,0x15,0xb0,0xf3] +@ CHECK: vmvn d1, d2 @ encoding: [0x82,0x15,0xb0,0xf3] +@ CHECK: vmvn d1, d2 @ encoding: [0x82,0x15,0xb0,0xf3] +@ CHECK: vmvn d1, d2 @ encoding: [0x82,0x15,0xb0,0xf3] +@ CHECK: vmvn d1, d2 @ encoding: [0x82,0x15,0xb0,0xf3] +@ CHECK: vmvn d1, d2 @ encoding: [0x82,0x15,0xb0,0xf3] +@ CHECK: vmvn d1, d2 @ encoding: [0x82,0x15,0xb0,0xf3] +@ CHECK: vmvn d1, d2 @ encoding: [0x82,0x15,0xb0,0xf3] +@ CHECK: vmvn d1, d2 @ encoding: [0x82,0x15,0xb0,0xf3] +@ CHECK: vmvn d1, d2 @ encoding: [0x82,0x15,0xb0,0xf3] +@ CHECK: vmvn d1, d2 @ encoding: [0x82,0x15,0xb0,0xf3]