• R/O
  • HTTP
  • SSH
  • HTTPS

提交

標籤
無標籤

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

GNU Binutils with patches for OS216


Commit MetaInfo

修訂e449ea97ebd3c11a8da5df174f1a1333fbe82828 (tree)
時間2019-09-24 18:29:18
作者Srinath Parvathaneni <srinath.parvathaneni@arm....>
CommiterSrinath Parvathaneni

Log Message

[ARM]: Modify assembler to accept floating and signless datatypes for MVE instruction VLDR.

This patch modifies assembler to accept the equivalent sized floating
and signless datatypes for VLDR instruction but as alias for the unsigned version.

gas/ChangeLog:

2019-09-23 Srinath Parvathaneni <srinath.parvathaneni@arm.com>

* config/tc-arm.c (do_mve_vstr_vldr_RQ): Modify function to allow float
* and signless datatypes for few cases of VLDR instruction.
* testsuite/gas/arm/mve-vldr-bad-3.l: Modify.
* testsuite/gas/arm/mve-vldr-bad-3.s: Likewise.
* testsuite/gas/arm/mve-vstrldr-1.d: Likewise.
* testsuite/gas/arm/mve-vstrldr-1.s: Likewise.

Change Summary

差異

--- a/gas/config/tc-arm.c
+++ b/gas/config/tc-arm.c
@@ -17282,6 +17282,7 @@ static void
1728217282 do_mve_vstr_vldr_RQ (int size, int elsize, int load)
1728317283 {
1728417284 unsigned os = inst.operands[1].imm >> 5;
17285+ unsigned type = inst.vectype.el[0].type;
1728517286 constraint (os != 0 && size == 8,
1728617287 _("can not shift offsets when accessing less than half-word"));
1728717288 constraint (os && os != neon_logbits (size),
@@ -17312,15 +17313,14 @@ do_mve_vstr_vldr_RQ (int size, int elsize, int load)
1731217313 constraint (inst.operands[0].reg == (inst.operands[1].imm & 0x1f),
1731317314 _("destination register and offset register may not be"
1731417315 " the same"));
17315- constraint (size == elsize && inst.vectype.el[0].type != NT_unsigned,
17316+ constraint (size == elsize && type == NT_signed, BAD_EL_TYPE);
17317+ constraint (size != elsize && type != NT_unsigned && type != NT_signed,
1731617318 BAD_EL_TYPE);
17317- constraint (inst.vectype.el[0].type != NT_unsigned
17318- && inst.vectype.el[0].type != NT_signed, BAD_EL_TYPE);
17319- inst.instruction |= (inst.vectype.el[0].type == NT_unsigned) << 28;
17319+ inst.instruction |= ((size == elsize) || (type == NT_unsigned)) << 28;
1732017320 }
1732117321 else
1732217322 {
17323- constraint (inst.vectype.el[0].type != NT_untyped, BAD_EL_TYPE);
17323+ constraint (type != NT_untyped, BAD_EL_TYPE);
1732417324 }
1732517325
1732617326 inst.instruction |= 1 << 23;
--- a/gas/testsuite/gas/arm/mve-vldr-bad-3.l
+++ b/gas/testsuite/gas/arm/mve-vldr-bad-3.l
@@ -133,3 +133,37 @@
133133 [^:]*:134: Error: syntax error -- `vldrweq.32 q0,\[r0\]'
134134 [^:]*:135: Error: vector predicated instruction should be in VPT/VPST block -- `vldrwt.32 q0,\[r0\]'
135135 [^:]*:137: Error: instruction missing MVE vector predication code -- `vldrw.32 q0,\[r0\]'
136+[^:]*:140: Error: bad element type for instruction -- `vldrb.16 q0,\[r2,q3\]'
137+[^:]*:140: Error: bad element type for instruction -- `vldrb.32 q0,\[r2,q3\]'
138+[^:]*:140: Error: bad element type for instruction -- `vldrb.64 q0,\[r2,q3\]'
139+[^:]*:140: Error: bad element type for instruction -- `vldrb.f16 q0,\[r2,q3\]'
140+[^:]*:140: Error: bad element type for instruction -- `vldrb.f32 q0,\[r2,q3\]'
141+[^:]*:140: Error: bad element type for instruction -- `vldrb.f64 q0,\[r2,q3\]'
142+[^:]*:140: Error: bad element type for instruction -- `vldrb.p16 q0,\[r2,q3\]'
143+[^:]*:140: Error: bad element type for instruction -- `vldrb.p32 q0,\[r2,q3\]'
144+[^:]*:140: Error: bad element type for instruction -- `vldrb.p64 q0,\[r2,q3\]'
145+[^:]*:140: Error: bad element type for instruction -- `vldrb.s8 q0,\[r2,q3\]'
146+[^:]*:143: Error: bad element type for instruction -- `vldrh.8 q0,\[r2,q3,uxtw#1\]'
147+[^:]*:143: Error: bad element type for instruction -- `vldrh.32 q0,\[r2,q3,uxtw#1\]'
148+[^:]*:143: Error: bad element type for instruction -- `vldrh.64 q0,\[r2,q3,uxtw#1\]'
149+[^:]*:143: Error: bad element type for instruction -- `vldrh.f32 q0,\[r2,q3,uxtw#1\]'
150+[^:]*:143: Error: bad element type for instruction -- `vldrh.f64 q0,\[r2,q3,uxtw#1\]'
151+[^:]*:143: Error: bad element type for instruction -- `vldrh.p32 q0,\[r2,q3,uxtw#1\]'
152+[^:]*:143: Error: bad element type for instruction -- `vldrh.p64 q0,\[r2,q3,uxtw#1\]'
153+[^:]*:143: Error: bad element type for instruction -- `vldrh.s16 q0,\[r2,q3,uxtw#1\]'
154+[^:]*:146: Error: bad element type for instruction -- `vldrw.8 q0,\[r2,q3,uxtw#2\]'
155+[^:]*:146: Error: bad element type for instruction -- `vldrw.16 q0,\[r2,q3,uxtw#2\]'
156+[^:]*:146: Error: bad element type for instruction -- `vldrw.64 q0,\[r2,q3,uxtw#2\]'
157+[^:]*:146: Error: bad element type for instruction -- `vldrw.f16 q0,\[r2,q3,uxtw#2\]'
158+[^:]*:146: Error: bad element type for instruction -- `vldrw.f64 q0,\[r2,q3,uxtw#2\]'
159+[^:]*:146: Error: bad element type for instruction -- `vldrw.p16 q0,\[r2,q3,uxtw#2\]'
160+[^:]*:146: Error: bad element type for instruction -- `vldrw.p64 q0,\[r2,q3,uxtw#2\]'
161+[^:]*:146: Error: bad element type for instruction -- `vldrw.s32 q0,\[r2,q3,uxtw#2\]'
162+[^:]*:149: Error: bad element type for instruction -- `vldrd.8 q0,\[r2,q3,uxtw#3\]'
163+[^:]*:149: Error: bad element type for instruction -- `vldrd.16 q0,\[r2,q3,uxtw#3\]'
164+[^:]*:149: Error: bad element type for instruction -- `vldrd.32 q0,\[r2,q3,uxtw#3\]'
165+[^:]*:149: Error: bad element type for instruction -- `vldrd.f16 q0,\[r2,q3,uxtw#3\]'
166+[^:]*:149: Error: bad element type for instruction -- `vldrd.f32 q0,\[r2,q3,uxtw#3\]'
167+[^:]*:149: Error: bad element type for instruction -- `vldrd.p16 q0,\[r2,q3,uxtw#3\]'
168+[^:]*:149: Error: bad element type for instruction -- `vldrd.p32 q0,\[r2,q3,uxtw#3\]'
169+[^:]*:149: Error: bad element type for instruction -- `vldrd.s64 q0,\[r2,q3,uxtw#3\]'
--- a/gas/testsuite/gas/arm/mve-vldr-bad-3.s
+++ b/gas/testsuite/gas/arm/mve-vldr-bad-3.s
@@ -135,4 +135,15 @@ vldrweq.32 q0, [r0]
135135 vldrwt.32 q0, [r0]
136136 vpst
137137 vldrw.32 q0, [r0]
138-
138+.irp op1, 16, 32, 64, f16, f32, f64, p16, p32, p64, s8
139+vldrb.\op1 q0, [r2, q3]
140+.endr
141+.irp op1, 8, 32, 64, f32, f64, p32, p64, s16
142+vldrh.\op1 q0, [r2, q3, uxtw #1]
143+.endr
144+.irp op1, 8, 16, 64, f16, f64, p16, p64, s32
145+vldrw.\op1 q0, [r2, q3, uxtw #2]
146+.endr
147+.irp op1, 8, 16, 32, f16, f32, p16, p32, s64
148+vldrd.\op1 q0, [r2, q3, uxtw #3]
149+.endr
--- a/gas/testsuite/gas/arm/mve-vstrldr-1.d
+++ b/gas/testsuite/gas/arm/mve-vstrldr-1.d
@@ -7561,3 +7561,20 @@ Disassembly of section .text:
75617561 [^>]*> fe71 8f4d vpste
75627562 [^>]*> fc93 6fdb vldrdt.u64 q3, \[r3, q5, uxtw #3\]
75637563 [^>]*> fc97 efd9 vldrde.u64 q7, \[r7, q4, uxtw #3\]
7564+[^>]*> fc92 0e06 vldrb.u8 q0, \[r2, q3\]
7565+[^>]*> ec92 0e86 vldrb.s16 q0, \[r2, q3\]
7566+[^>]*> fc92 0e06 vldrb.u8 q0, \[r2, q3\]
7567+[^>]*> fc92 0e97 vldrh.u16 q0, \[r2, q3, uxtw #1\]
7568+[^>]*> fc92 0e97 vldrh.u16 q0, \[r2, q3, uxtw #1\]
7569+[^>]*> ec92 0f17 vldrh.s32 q0, \[r2, q3, uxtw #1\]
7570+[^>]*> fc92 0e97 vldrh.u16 q0, \[r2, q3, uxtw #1\]
7571+[^>]*> fc92 0e97 vldrh.u16 q0, \[r2, q3, uxtw #1\]
7572+[^>]*> fc92 0f17 vldrh.u32 q0, \[r2, q3, uxtw #1\]
7573+[^>]*> fc92 0f47 vldrw.u32 q0, \[r2, q3, uxtw #2\]
7574+[^>]*> fc92 0f47 vldrw.u32 q0, \[r2, q3, uxtw #2\]
7575+[^>]*> fc92 0f47 vldrw.u32 q0, \[r2, q3, uxtw #2\]
7576+[^>]*> fc92 0f47 vldrw.u32 q0, \[r2, q3, uxtw #2\]
7577+[^>]*> fc92 0fd7 vldrd.u64 q0, \[r2, q3, uxtw #3\]
7578+[^>]*> fc92 0fd7 vldrd.u64 q0, \[r2, q3, uxtw #3\]
7579+[^>]*> fc92 0fd7 vldrd.u64 q0, \[r2, q3, uxtw #3\]
7580+[^>]*> fc92 0fd7 vldrd.u64 q0, \[r2, q3, uxtw #3\]
--- a/gas/testsuite/gas/arm/mve-vstrldr-1.s
+++ b/gas/testsuite/gas/arm/mve-vstrldr-1.s
@@ -116,3 +116,16 @@ vldrde.u64 q2, [r0, q1]
116116 vpste
117117 vldrdt.u64 q3, [r3, q5, UXTW #3]
118118 vldrde.u64 q7, [r7, q4, UXTW #3]
119+
120+.irp dt, u8, s16, 8
121+vldrb.\dt q0, [r2, q3]
122+.endr
123+.irp dt, 16, u16, s32, f16, p16, u32
124+vldrh.\dt q0, [r2, q3, UXTW #1]
125+.endr
126+.irp dt, 32, u32, f32, p32
127+vldrw.\dt q0, [r2, q3, UXTW #2]
128+.endr
129+.irp dt, 64, u64, f64, p64
130+vldrd.\dt q0, [r2, q3, UXTW #3]
131+.endr