From dda0f4cb798e5f482247cda4ea9b74977b4601ec Mon Sep 17 00:00:00 2001 From: Evan Cheng Date: Wed, 8 Jul 2009 22:51:32 +0000 Subject: [PATCH] - Add some NEON ld / st instruction static encoding. - Make bits 25-27 for ldrh, etc. explicitly zero. Previously only the JIT uses the encoding information and it's assuming anything not specified to be zero. Making them explicit so the disassembler is happy. Patch by Sean Callanan. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75065 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/ARM/ARMInstrFormats.td | 14 ++++++++++++++ lib/Target/ARM/ARMInstrNEON.td | 28 ++++++++++++++++++++++++---- 2 files changed, 38 insertions(+), 4 deletions(-) diff --git a/lib/Target/ARM/ARMInstrFormats.td b/lib/Target/ARM/ARMInstrFormats.td index c7ef149e75f..89a0e7e02db 100644 --- a/lib/Target/ARM/ARMInstrFormats.td +++ b/lib/Target/ARM/ARMInstrFormats.td @@ -451,6 +451,7 @@ class AI3ldh pattern> @@ -475,6 +476,7 @@ class AI3ldsh pattern> @@ -499,6 +501,7 @@ class AI3ldsb pattern> @@ -523,6 +526,7 @@ class AI3ldd pattern> @@ -561,6 +566,7 @@ class AI3std pattern> @@ -587,6 +594,7 @@ class AI3ldshpr pattern> @@ -599,6 +607,7 @@ class AI3ldsbpr pattern> @@ -639,6 +650,7 @@ class AI3ldshpo pattern> @@ -651,6 +663,7 @@ class AI3ldsbpo; + []> { + let Inst{27-25} = 0b110; + let Inst{20} = 1; + let Inst{11-9} = 0b101; +} def VLDMS : NI<(outs), (ins addrmode_neonldstm:$addr, reglist:$dst1, variable_ops), "vldm${addr:submode} ${addr:base}, $dst1", - []>; + []> { + let Inst{27-25} = 0b110; + let Inst{20} = 1; + let Inst{11-9} = 0b101; +} } */ // Use vldmia to load a Q register as a D register pair. def VLDRQ : NI<(outs QPR:$dst), (ins GPR:$addr), "vldmia $addr, ${dst:dregpair}", - [(set QPR:$dst, (v2f64 (load GPR:$addr)))]>; + [(set QPR:$dst, (v2f64 (load GPR:$addr)))]> { + let Inst{27-25} = 0b110; + let Inst{24} = 0; // P bit + let Inst{23} = 1; // U bit + let Inst{20} = 1; + let Inst{11-9} = 0b101; +} // Use vstmia to store a Q register as a D register pair. def VSTRQ : NI<(outs), (ins QPR:$src, GPR:$addr), "vstmia $addr, ${src:dregpair}", - [(store (v2f64 QPR:$src), GPR:$addr)]>; + [(store (v2f64 QPR:$src), GPR:$addr)]> { + let Inst{27-25} = 0b110; + let Inst{24} = 0; // P bit + let Inst{23} = 1; // U bit + let Inst{20} = 0; + let Inst{11-9} = 0b101; +} // VLD1 : Vector Load (multiple single elements) -- 2.34.1