PyNerva 0.0.7__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) hide show
  1. nervapy/__init__.py +50 -0
  2. nervapy/abi.py +91 -0
  3. nervapy/arm/__init__.py +124 -0
  4. nervapy/arm/__main__.py +0 -0
  5. nervapy/arm/abi.py +138 -0
  6. nervapy/arm/formats.py +49 -0
  7. nervapy/arm/function.py +2465 -0
  8. nervapy/arm/generic.py +10796 -0
  9. nervapy/arm/instructions.py +519 -0
  10. nervapy/arm/isa.py +409 -0
  11. nervapy/arm/literal_pool.py +331 -0
  12. nervapy/arm/microarchitecture.py +211 -0
  13. nervapy/arm/pseudo.py +652 -0
  14. nervapy/arm/registers.py +1458 -0
  15. nervapy/arm/vfpneon.py +4092 -0
  16. nervapy/arm.py +13 -0
  17. nervapy/c/__init__.py +1 -0
  18. nervapy/c/types.py +436 -0
  19. nervapy/codegen.py +99 -0
  20. nervapy/common/__init__.py +4 -0
  21. nervapy/common/function.py +5 -0
  22. nervapy/common/regalloc.py +121 -0
  23. nervapy/constant_data.py +282 -0
  24. nervapy/encoder.py +246 -0
  25. nervapy/formats/__init__.py +2 -0
  26. nervapy/formats/elf/__init__.py +4 -0
  27. nervapy/formats/elf/file.py +178 -0
  28. nervapy/formats/elf/image.py +106 -0
  29. nervapy/formats/elf/section.py +422 -0
  30. nervapy/formats/elf/symbol.py +281 -0
  31. nervapy/formats/macho/__init__.py +2 -0
  32. nervapy/formats/macho/file.py +123 -0
  33. nervapy/formats/macho/image.py +143 -0
  34. nervapy/formats/macho/section.py +322 -0
  35. nervapy/formats/macho/symbol.py +158 -0
  36. nervapy/formats/mscoff/__init__.py +8 -0
  37. nervapy/formats/mscoff/image.py +132 -0
  38. nervapy/formats/mscoff/section.py +181 -0
  39. nervapy/formats/mscoff/symbol.py +148 -0
  40. nervapy/function.py +136 -0
  41. nervapy/literal.py +731 -0
  42. nervapy/loader.py +188 -0
  43. nervapy/name.py +159 -0
  44. nervapy/parse.py +52 -0
  45. nervapy/stream.py +58 -0
  46. nervapy/util.py +126 -0
  47. nervapy/writer.py +518 -0
  48. nervapy/x86_64/__init__.py +324 -0
  49. nervapy/x86_64/__main__.py +407 -0
  50. nervapy/x86_64/abi.py +517 -0
  51. nervapy/x86_64/amd.py +6464 -0
  52. nervapy/x86_64/avx.py +102029 -0
  53. nervapy/x86_64/crypto.py +1533 -0
  54. nervapy/x86_64/encoding.py +424 -0
  55. nervapy/x86_64/fma.py +19138 -0
  56. nervapy/x86_64/function.py +2707 -0
  57. nervapy/x86_64/generic.py +23384 -0
  58. nervapy/x86_64/instructions.py +500 -0
  59. nervapy/x86_64/isa.py +476 -0
  60. nervapy/x86_64/lower.py +126 -0
  61. nervapy/x86_64/mask.py +2593 -0
  62. nervapy/x86_64/meta.py +143 -0
  63. nervapy/x86_64/mmxsse.py +17265 -0
  64. nervapy/x86_64/nacl.py +327 -0
  65. nervapy/x86_64/operand.py +1204 -0
  66. nervapy/x86_64/options.py +21 -0
  67. nervapy/x86_64/pseudo.py +686 -0
  68. nervapy/x86_64/registers.py +1225 -0
  69. nervapy/x86_64/types.py +17 -0
  70. nervapy/x86_64/uarch.py +580 -0
  71. pynerva-0.0.7.dist-info/METADATA +310 -0
  72. pynerva-0.0.7.dist-info/RECORD +74 -0
  73. pynerva-0.0.7.dist-info/WHEEL +4 -0
  74. pynerva-0.0.7.dist-info/licenses/LICENSE.rst +15 -0
nervapy/arm/vfpneon.py ADDED
@@ -0,0 +1,4092 @@
1
+ # This file is part of PeachPy package and is licensed under the Simplified BSD license.
2
+ # See license.rst for the full text of the license.
3
+
4
+ import inspect
5
+
6
+ import nervapy.arm.function
7
+ import nervapy.stream
8
+ from nervapy.arm.instructions import Instruction, Operand
9
+ from nervapy.arm.isa import Extension
10
+
11
+
12
+ class VFPLoadStoreInstruction(Instruction):
13
+ def __init__(self, name, register, address, origin=None):
14
+ allowed_instructions = {"VLDR", "VSTR"}
15
+ if name in allowed_instructions:
16
+ super(VFPLoadStoreInstruction, self).__init__(
17
+ name, [register, address], isa_extensions=Extension.VFP2, origin=origin
18
+ )
19
+ else:
20
+ raise ValueError(
21
+ "Instruction {0} is not one of the allowed instructions".format(name)
22
+ )
23
+ if (
24
+ register.is_d_register() or register.is_s_register()
25
+ ) and address.is_memory_address_offset8_mod4():
26
+ pass
27
+ else:
28
+ raise ValueError(
29
+ "Invalid operands in instruction {0} {1}, {2}".format(
30
+ name, register, address
31
+ )
32
+ )
33
+
34
+ def get_input_registers_list(self):
35
+ input_registers_list = self.operands[1].get_registers_list()
36
+ if self.name == "VSTR":
37
+ input_registers_list += self.operands[0].get_registers_list()
38
+ return input_registers_list
39
+
40
+ def get_output_registers_list(self):
41
+ if self.name == "VLDR":
42
+ return self.operands[0].get_registers_list()
43
+ else:
44
+ return list()
45
+
46
+
47
+ class VFPLoadStoreMultipleInstruction(Instruction):
48
+ load_instructions = {"VLDM", "VLDMIA", "VLDMDB"}
49
+ store_instructions = {"VSTM", "VSTMIA", "VSTMDB"}
50
+
51
+ def __init__(self, name, address, register_list, origin=None):
52
+ if (
53
+ name in VFPLoadStoreMultipleInstruction.load_instructions
54
+ or name in VFPLoadStoreMultipleInstruction.store_instructions
55
+ ):
56
+ super(VFPLoadStoreMultipleInstruction, self).__init__(
57
+ name,
58
+ [address, register_list],
59
+ isa_extensions=Extension.VFP2,
60
+ origin=origin,
61
+ )
62
+ else:
63
+ raise ValueError(
64
+ "Instruction {0} is not one of the allowed instructions".format(name)
65
+ )
66
+ if address.is_address_register() and register_list.is_d_register_list():
67
+ pass
68
+ elif address.is_address_register() and register_list.is_s_register_list():
69
+ pass
70
+ else:
71
+ raise ValueError(
72
+ "Invalid operands in instruction {0} {1}, {2}".format(
73
+ name, register_list, address
74
+ )
75
+ )
76
+
77
+ def get_input_registers_list(self):
78
+ if self.name in VFPLoadStoreMultipleInstruction.store_instructions:
79
+ return (
80
+ self.operands[0].get_registers_list()
81
+ + self.operands[1].get_registers_list()
82
+ )
83
+ else:
84
+ return self.operands[0].get_registers_list()
85
+
86
+ def get_output_registers_list(self):
87
+ if self.name in VFPLoadStoreMultipleInstruction.load_instructions:
88
+ return self.operands[1].get_registers_list()
89
+ else:
90
+ return list()
91
+
92
+
93
+ class NeonLoadStoreInstruction(Instruction):
94
+ load_instructions = {"VLD1.8", "VLD1.16", "VLD1.32", "VLD1.64"}
95
+ store_instructions = {"VST1.8", "VST1.16", "VST1.32", "VST1.64"}
96
+
97
+ def __init__(self, name, register_list, address, increment, origin=None):
98
+ if (
99
+ name not in NeonLoadStoreInstruction.load_instructions
100
+ and name not in NeonLoadStoreInstruction.store_instructions
101
+ ):
102
+ raise ValueError(
103
+ "Instruction {0} is not one of the allowed instructions".format(name)
104
+ )
105
+ if (
106
+ register_list.is_vldst1_register_list()
107
+ and address.is_memory_address(offset_bits=0)
108
+ and increment.is_none()
109
+ ):
110
+ super(NeonLoadStoreInstruction, self).__init__(
111
+ name,
112
+ [register_list, address],
113
+ isa_extensions=Extension.NEON,
114
+ origin=origin,
115
+ )
116
+ elif (
117
+ register_list.is_vldst1_register_list()
118
+ and address.is_memory_address(offset_bits=0, allow_writeback=False)
119
+ and increment.is_general_purpose_register()
120
+ ):
121
+ super(NeonLoadStoreInstruction, self).__init__(
122
+ name,
123
+ [register_list, address, increment],
124
+ isa_extensions=Extension.NEON,
125
+ origin=origin,
126
+ )
127
+ elif (
128
+ register_list.is_vldst1_register_lanes_list()
129
+ and address.is_memory_address(offset_bits=0)
130
+ and increment.is_none()
131
+ ):
132
+ super(NeonLoadStoreInstruction, self).__init__(
133
+ name,
134
+ [register_list, address],
135
+ isa_extensions=Extension.NEON,
136
+ origin=origin,
137
+ )
138
+ elif (
139
+ register_list.is_vldst1_register_lanes_list()
140
+ and address.is_memory_address(offset_bits=0, allow_writeback=False)
141
+ and increment.is_general_purpose_register()
142
+ ):
143
+ super(NeonLoadStoreInstruction, self).__init__(
144
+ name,
145
+ [register_list, address, increment],
146
+ isa_extensions=Extension.NEON,
147
+ origin=origin,
148
+ )
149
+ else:
150
+ if increment.is_none():
151
+ raise ValueError(
152
+ "Invalid operands in instruction {0} {1}, {2}".format(
153
+ name, register_list, address
154
+ )
155
+ )
156
+ else:
157
+ raise ValueError(
158
+ "Invalid operands in instruction {0} {1}, {2}, {3}".format(
159
+ name, register_list, address, increment
160
+ )
161
+ )
162
+
163
+ def get_input_registers_list(self):
164
+ input_registers_list = self.operands[1].get_registers_list()
165
+ if self.name in NeonLoadStoreInstruction.store_instructions:
166
+ input_registers_list += self.operands[0].get_registers_list()
167
+ if len(self.operands) == 3:
168
+ input_registers_list += self.operands[2].get_registers_list()
169
+ return input_registers_list
170
+
171
+ def get_output_registers_list(self):
172
+ output_registers_list = list()
173
+ if self.name in NeonLoadStoreInstruction.load_instructions:
174
+ output_registers_list += self.operands[0].get_registers_list()
175
+ if len(self.operands) == 3 or self.operands[1].is_writeback_memory_address():
176
+ output_registers_list += self.operands[1].get_writeback_registers_list()
177
+ return output_registers_list
178
+
179
+
180
+ class VFPPushPopInstruction(Instruction):
181
+ def __init__(self, name, register_list, origin=None):
182
+ allowed_instructions = {"VPUSH", "VPOP"}
183
+ if name in allowed_instructions:
184
+ super(VFPPushPopInstruction, self).__init__(
185
+ name, [register_list], isa_extensions=Extension.VFP2, origin=origin
186
+ )
187
+ else:
188
+ raise ValueError(
189
+ "Instruction {0} is not one of the allowed instructions".format(name)
190
+ )
191
+ if register_list.is_d_register_list():
192
+ pass
193
+ else:
194
+ raise ValueError(
195
+ "Invalid operands in instruction {0} {1}".format(name, register_list)
196
+ )
197
+
198
+ def get_input_registers_list(self):
199
+ if self.name == "VPUSH":
200
+ return self.operands[0].get_registers_list()
201
+ else:
202
+ return list()
203
+
204
+ def get_output_registers_list(self):
205
+ if self.name == "VPOP":
206
+ return self.operands[0].get_registers_list()
207
+ else:
208
+ return list()
209
+
210
+
211
+ class VFPDoublePrecisionMultiplyAddInstruction(Instruction):
212
+ def __init__(self, name, destination, source_x, source_y, origin=None):
213
+ mla_instructions = ["VMLA.F64", "VMLS.F64", "VNMLA.F64", "VNMLS.F64"]
214
+ fma_instructions = ["VFMA.F64", "VFMS.F64", "VFNMA.F64", "VFNMS.F64"]
215
+ if name in mla_instructions:
216
+ super(VFPDoublePrecisionMultiplyAddInstruction, self).__init__(
217
+ name,
218
+ [destination, source_x, source_y],
219
+ isa_extensions=Extension.VFP2,
220
+ origin=origin,
221
+ )
222
+ elif name in fma_instructions:
223
+ super(VFPDoublePrecisionMultiplyAddInstruction, self).__init__(
224
+ name,
225
+ [destination, source_x, source_y],
226
+ isa_extensions=Extension.VFP4,
227
+ origin=origin,
228
+ )
229
+ else:
230
+ raise ValueError(
231
+ "Instruction {0} is not one of the allowed instructions".format(name)
232
+ )
233
+ if (
234
+ destination.is_d_register()
235
+ and source_x.is_d_register()
236
+ and source_y.is_d_register()
237
+ ):
238
+ pass
239
+ else:
240
+ raise ValueError(
241
+ "Invalid operands in instruction {0} {1}, {2}, {3}".format(
242
+ name, destination, source_x, source_y
243
+ )
244
+ )
245
+
246
+ def get_input_registers_list(self):
247
+ return (
248
+ self.operands[0].get_registers_list()
249
+ + self.operands[1].get_registers_list()
250
+ + self.operands[2].get_registers_list()
251
+ )
252
+
253
+ def get_output_registers_list(self):
254
+ return self.operands[0].get_registers_list()
255
+
256
+
257
+ class VFPSinglePrecisionMultiplyAddInstruction(Instruction):
258
+ def __init__(self, name, destination, source_x, source_y, origin=None):
259
+ mla_instructions = ["VNMLA.F32", "VNMLS.F32"]
260
+ fma_instructions = ["VFNMA.F32", "VFNMS.F32"]
261
+ if name in mla_instructions:
262
+ super(VFPSinglePrecisionMultiplyAddInstruction, self).__init__(
263
+ name,
264
+ [destination, source_x, source_y],
265
+ isa_extensions=Extension.VFP2,
266
+ origin=origin,
267
+ )
268
+ elif name in fma_instructions:
269
+ super(VFPSinglePrecisionMultiplyAddInstruction, self).__init__(
270
+ name,
271
+ [destination, source_x, source_y],
272
+ isa_extensions=Extension.VFP4,
273
+ origin=origin,
274
+ )
275
+ else:
276
+ raise ValueError(
277
+ "Instruction {0} is not one of the allowed instructions ({1})".format(
278
+ name, ", ".join(mla_instructions + fma_instructions)
279
+ )
280
+ )
281
+ if (
282
+ destination.is_s_register()
283
+ and source_x.is_s_register()
284
+ and source_y.is_s_register()
285
+ ):
286
+ pass
287
+ else:
288
+ raise ValueError(
289
+ "Invalid operands in instruction {0} {1}, {2}, {3}".format(
290
+ name, destination, source_x, source_y
291
+ )
292
+ )
293
+
294
+ def get_input_registers_list(self):
295
+ return (
296
+ self.operands[0].get_registers_list()
297
+ + self.operands[1].get_registers_list()
298
+ + self.operands[2].get_registers_list()
299
+ )
300
+
301
+ def get_output_registers_list(self):
302
+ return self.operands[0].get_registers_list()
303
+
304
+
305
+ class VFPNeonBinaryArithmeticInstruction(Instruction):
306
+ def __init__(self, name, destination, source_x, source_y, origin=None):
307
+ allowed_instructions = ["VADD.F32", "VSUB.F32", "VMUL.F32"]
308
+ if name not in allowed_instructions:
309
+ raise ValueError(
310
+ "Instruction {0} is not one of the allowed instructions ({1})".format(
311
+ name, ", ".join(allowed_instructions)
312
+ )
313
+ )
314
+ if (
315
+ destination.is_s_register()
316
+ and source_x.is_s_register()
317
+ and source_y.is_s_register()
318
+ ):
319
+ super(VFPNeonBinaryArithmeticInstruction, self).__init__(
320
+ name,
321
+ [destination, source_x, source_y],
322
+ isa_extensions=Extension.VFP2,
323
+ origin=origin,
324
+ )
325
+ elif (
326
+ destination.is_d_register()
327
+ and source_x.is_d_register()
328
+ and source_y.is_d_register()
329
+ ):
330
+ super(VFPNeonBinaryArithmeticInstruction, self).__init__(
331
+ name,
332
+ [destination, source_x, source_y],
333
+ isa_extensions=Extension.NEON,
334
+ origin=origin,
335
+ )
336
+ elif (
337
+ destination.is_q_register()
338
+ and source_x.is_q_register()
339
+ and source_y.is_q_register()
340
+ ):
341
+ super(VFPNeonBinaryArithmeticInstruction, self).__init__(
342
+ name,
343
+ [destination, source_x, source_y],
344
+ isa_extensions=Extension.NEON,
345
+ origin=origin,
346
+ )
347
+ else:
348
+ raise ValueError(
349
+ "Invalid operands in instruction {0} {1}, {2}, {3}".format(
350
+ name, destination, source_x, source_y
351
+ )
352
+ )
353
+
354
+ def get_input_registers_list(self):
355
+ return (
356
+ self.operands[1].get_registers_list()
357
+ + self.operands[2].get_registers_list()
358
+ )
359
+
360
+ def get_output_registers_list(self):
361
+ return self.operands[0].get_registers_list()
362
+
363
+
364
+ class VFPNeonMultiplyAddInstruction(Instruction):
365
+ def __init__(self, name, accumulator, factor_x, factor_y, origin=None):
366
+ mla_instructions = ["VMLA.F32", "VMLS.F32"]
367
+ fma_instructions = ["VFMA.F32", "VFMS.F32"]
368
+ if name not in mla_instructions and name not in fma_instructions:
369
+ raise ValueError(
370
+ "Instruction {0} is not one of the allowed instructions".format(name)
371
+ )
372
+ if (
373
+ name in mla_instructions
374
+ and accumulator.is_s_register()
375
+ and factor_x.is_s_register()
376
+ and factor_y.is_s_register()
377
+ ):
378
+ super(VFPNeonMultiplyAddInstruction, self).__init__(
379
+ name,
380
+ [accumulator, factor_x, factor_y],
381
+ isa_extensions=Extension.VFP2,
382
+ origin=origin,
383
+ )
384
+ elif (
385
+ name in fma_instructions
386
+ and accumulator.is_s_register()
387
+ and factor_x.is_s_register()
388
+ and factor_y.is_s_register()
389
+ ):
390
+ super(VFPNeonMultiplyAddInstruction, self).__init__(
391
+ name,
392
+ [accumulator, factor_x, factor_y],
393
+ isa_extensions=Extension.VFP4,
394
+ origin=origin,
395
+ )
396
+ elif (
397
+ name in mla_instructions
398
+ and accumulator.is_d_register()
399
+ and factor_x.is_d_register()
400
+ and factor_y.is_d_register()
401
+ ):
402
+ super(VFPNeonMultiplyAddInstruction, self).__init__(
403
+ name,
404
+ [accumulator, factor_x, factor_y],
405
+ isa_extensions=Extension.NEON,
406
+ origin=origin,
407
+ )
408
+ elif (
409
+ name in mla_instructions
410
+ and accumulator.is_q_register()
411
+ and factor_x.is_q_register()
412
+ and factor_y.is_q_register()
413
+ ):
414
+ super(VFPNeonMultiplyAddInstruction, self).__init__(
415
+ name,
416
+ [accumulator, factor_x, factor_y],
417
+ isa_extensions=Extension.NEON,
418
+ origin=origin,
419
+ )
420
+ elif (
421
+ name in fma_instructions
422
+ and accumulator.is_d_register()
423
+ and factor_x.is_d_register()
424
+ and factor_y.is_d_register()
425
+ ):
426
+ super(VFPNeonMultiplyAddInstruction, self).__init__(
427
+ name,
428
+ [accumulator, factor_x, factor_y],
429
+ isa_extensions=Extension.NEON2,
430
+ origin=origin,
431
+ )
432
+ elif (
433
+ name in fma_instructions
434
+ and accumulator.is_q_register()
435
+ and factor_x.is_q_register()
436
+ and factor_y.is_q_register()
437
+ ):
438
+ super(VFPNeonMultiplyAddInstruction, self).__init__(
439
+ name,
440
+ [accumulator, factor_x, factor_y],
441
+ isa_extensions=Extension.NEON2,
442
+ origin=origin,
443
+ )
444
+ else:
445
+ raise ValueError(
446
+ "Invalid operands in instruction {0} {1}, {2}, {3}".format(
447
+ name, accumulator, factor_x, factor_y
448
+ )
449
+ )
450
+
451
+ def get_input_registers_list(self):
452
+ return (
453
+ self.operands[0].get_registers_list()
454
+ + self.operands[1].get_registers_list()
455
+ + self.operands[2].get_registers_list()
456
+ )
457
+
458
+ def get_output_registers_list(self):
459
+ return self.operands[0].get_registers_list()
460
+
461
+
462
+ class VFPSinglePrecisionBinaryArithmeticInstruction(Instruction):
463
+ def __init__(self, name, destination, source_x, source_y, origin=None):
464
+ allowed_instructions = ["VNMUL.F32", "VDIV.F32"]
465
+ super(VFPSinglePrecisionBinaryArithmeticInstruction, self).__init__(
466
+ name,
467
+ [destination, source_x, source_y],
468
+ isa_extensions=Extension.VFP2,
469
+ origin=origin,
470
+ )
471
+ if name not in allowed_instructions:
472
+ raise ValueError(
473
+ "Instruction {0} is not one of the allowed instructions ({1})".format(
474
+ name, ", ".join(allowed_instructions)
475
+ )
476
+ )
477
+ if (
478
+ destination.is_d_register()
479
+ and source_x.is_s_register()
480
+ and source_y.is_s_register()
481
+ ):
482
+ pass
483
+ else:
484
+ raise ValueError(
485
+ "Invalid operands in instruction {0} {1}, {2}, {3}".format(
486
+ name, destination, source_x, source_y
487
+ )
488
+ )
489
+
490
+ def get_input_registers_list(self):
491
+ return (
492
+ self.operands[1].get_registers_list()
493
+ + self.operands[2].get_registers_list()
494
+ )
495
+
496
+ def get_output_registers_list(self):
497
+ return self.operands[0].get_registers_list()
498
+
499
+
500
+ class VFPDoublePrecisionBinaryArithmeticInstruction(Instruction):
501
+ def __init__(self, name, destination, source_x, source_y, origin=None):
502
+ allowed_instructions = [
503
+ "VADD.F64",
504
+ "VSUB.F64",
505
+ "VMUL.F64",
506
+ "VNMUL.F32",
507
+ "VNMUL.F64",
508
+ "VDIV.F32",
509
+ "VDIV.F64",
510
+ ]
511
+ super(VFPDoublePrecisionBinaryArithmeticInstruction, self).__init__(
512
+ name,
513
+ [destination, source_x, source_y],
514
+ isa_extensions=Extension.VFP2,
515
+ origin=origin,
516
+ )
517
+ if name not in allowed_instructions:
518
+ raise ValueError(
519
+ "Instruction {0} is not one of the allowed instructions ({1})".format(
520
+ name, ", ".join(allowed_instructions)
521
+ )
522
+ )
523
+ if (
524
+ destination.is_d_register()
525
+ and source_x.is_d_register()
526
+ and source_y.is_d_register()
527
+ ):
528
+ pass
529
+ else:
530
+ raise ValueError(
531
+ "Invalid operands in instruction {0} {1}, {2}, {3}".format(
532
+ name, destination, source_x, source_y
533
+ )
534
+ )
535
+
536
+ def get_input_registers_list(self):
537
+ return (
538
+ self.operands[1].get_registers_list()
539
+ + self.operands[2].get_registers_list()
540
+ )
541
+
542
+ def get_output_registers_list(self):
543
+ return self.operands[0].get_registers_list()
544
+
545
+
546
+ class VFPDoublePrecisionUnaryArithmeticInstruction(Instruction):
547
+ def __init__(self, name, destination, source, origin=None):
548
+ allowed_instructions = ["VABS.F64", "VNEG.F64", "VSQRT.F64"]
549
+ super(VFPDoublePrecisionUnaryArithmeticInstruction, self).__init__(
550
+ name, [destination, source], isa_extensions=Extension.VFP2, origin=origin
551
+ )
552
+ if name not in allowed_instructions:
553
+ raise ValueError(
554
+ "Instruction {0} is not one of the allowed instructions ({1})".format(
555
+ name, ", ".join(allowed_instructions)
556
+ )
557
+ )
558
+ if destination.is_d_register() and source.is_d_register():
559
+ pass
560
+ else:
561
+ raise ValueError(
562
+ "Invalid operands in instruction {0} {1}, {2}".format(
563
+ name, destination, source
564
+ )
565
+ )
566
+
567
+ def get_input_registers_list(self):
568
+ return self.operands[1].get_registers_list()
569
+
570
+ def get_output_registers_list(self):
571
+ return self.operands[0].get_registers_list()
572
+
573
+
574
+ class NeonArithmeticInstruction(Instruction):
575
+ def __init__(self, name, destination, source_x, source_y, origin=None):
576
+ allowed_instructions = [
577
+ "VADD.I8",
578
+ "VADD.I16",
579
+ "VADD.I32",
580
+ "VADD.I64",
581
+ "VSUB.I8",
582
+ "VSUB.I16",
583
+ "VSUB.I32",
584
+ "VSUB.I64",
585
+ "VMUL.I8",
586
+ "VMUL.I16",
587
+ "VMUL.I32",
588
+ "VMIN.S8",
589
+ "VMIN.S16",
590
+ "VMIN.S32",
591
+ "VMIN.U8",
592
+ "VMIN.U16",
593
+ "VMIN.U32",
594
+ "VMIN.F32",
595
+ "VMAX.S8",
596
+ "VMAX.S16",
597
+ "VMAX.S32",
598
+ "VMAX.U8",
599
+ "VMAX.U16",
600
+ "VMAX.U32",
601
+ "VMAX.F32",
602
+ "VABD.S8",
603
+ "VABD.S16",
604
+ "VABD.S32",
605
+ "VABD.U8",
606
+ "VABD.U16",
607
+ "VABD.U32",
608
+ "VABD.F32",
609
+ "VACGE.F32",
610
+ "VACGT.F32",
611
+ "VACLE.F32",
612
+ "VACLT.F32",
613
+ "VEOR",
614
+ "VORR",
615
+ "VORN",
616
+ "VAND",
617
+ "VBIC",
618
+ "VPADD.I8",
619
+ "VPADD.I16",
620
+ "VPADD.I32",
621
+ "VPADD.F32",
622
+ "VPMIN.S8",
623
+ "VPMIN.S16",
624
+ "VPMIN.S32",
625
+ "VPMIN.U8",
626
+ "VPMIN.U16",
627
+ "VPMIN.U32",
628
+ "VPMIN.F32",
629
+ "VPMAX.S8",
630
+ "VPMAX.S16",
631
+ "VPMAX.S32",
632
+ "VPMAX.U8",
633
+ "VPMAX.U16",
634
+ "VPMAX.U32",
635
+ "VPMAX.F32",
636
+ "VQADD.S8",
637
+ "VQADD.S16",
638
+ "VQADD.S32",
639
+ "VQADD.S64",
640
+ "VQADD.U8",
641
+ "VQADD.U16",
642
+ "VQADD.U32",
643
+ "VQADD.U64",
644
+ "VQSUB.S8",
645
+ "VQSUB.S16",
646
+ "VQSUB.S32",
647
+ "VQSUB.S64",
648
+ "VQSUB.U8",
649
+ "VQSUB.U16",
650
+ "VQSUB.U32",
651
+ "VQSUB.U64",
652
+ "VHADD.S8",
653
+ "VHADD.S16",
654
+ "VHADD.S32",
655
+ "VHADD.U8",
656
+ "VHADD.U16",
657
+ "VHADD.U32",
658
+ "VHSUB.S8",
659
+ "VHSUB.S16",
660
+ "VHSUB.S32",
661
+ "VHSUB.U8",
662
+ "VHSUB.U16",
663
+ "VHSUB.U32",
664
+ "VRHADD.S8",
665
+ "VRHADD.S16",
666
+ "VRHADD.S32",
667
+ "VRHADD.U8",
668
+ "VRHADD.U16",
669
+ "VRHADD.U32",
670
+ "VRECPS.F32",
671
+ "VRSQRTS.F32",
672
+ "VTST.8",
673
+ "VTST.16",
674
+ "VTST.32",
675
+ ]
676
+ super(NeonArithmeticInstruction, self).__init__(
677
+ name,
678
+ [destination, source_x, source_y],
679
+ isa_extensions=Extension.NEON,
680
+ origin=origin,
681
+ )
682
+ if name not in allowed_instructions:
683
+ raise ValueError(
684
+ "Instruction {0} is not one of the allowed instructions ({1})".format(
685
+ name, ", ".join(allowed_instructions)
686
+ )
687
+ )
688
+ if (
689
+ destination.is_d_register()
690
+ and source_x.is_d_register()
691
+ and source_y.is_d_register()
692
+ ):
693
+ pass
694
+ elif (
695
+ destination.is_q_register()
696
+ and source_x.is_q_register()
697
+ and source_y.is_q_register()
698
+ ):
699
+ pass
700
+ else:
701
+ raise ValueError(
702
+ "Invalid operands in instruction {0} {1}, {2}, {3}".format(
703
+ name, destination, source_x, source_y
704
+ )
705
+ )
706
+
707
+ def get_input_registers_list(self):
708
+ return (
709
+ self.operands[1].get_registers_list()
710
+ + self.operands[2].get_registers_list()
711
+ )
712
+
713
+ def get_output_registers_list(self):
714
+ return self.operands[0].get_registers_list()
715
+
716
+
717
+ class NeonWideArithmeticInstruction(Instruction):
718
+ def __init__(self, name, destination, source_x, source_y, origin=None):
719
+ allowed_instructions = [
720
+ "VADDL.S8",
721
+ "VADDL.S16",
722
+ "VADDL.S32",
723
+ "VADDL.U8",
724
+ "VADDL.U16",
725
+ "VADDL.U32",
726
+ "VSUBL.S8",
727
+ "VSUBL.S16",
728
+ "VSUBL.S32",
729
+ "VSUBL.U8",
730
+ "VSUBL.U16",
731
+ "VSUBL.U32",
732
+ "VMULL.S8",
733
+ "VMULL.S16",
734
+ "VMULL.S32",
735
+ "VMULL.U8",
736
+ "VMULL.U16",
737
+ "VMULL.U32",
738
+ "VMULL.P8",
739
+ ]
740
+ super(NeonWideArithmeticInstruction, self).__init__(
741
+ name,
742
+ [destination, source_x, source_y],
743
+ isa_extensions=Extension.NEON,
744
+ origin=origin,
745
+ )
746
+ if name not in allowed_instructions:
747
+ raise ValueError(
748
+ "Instruction {0} is not one of the allowed instructions ({1})".format(
749
+ name, ", ".join(allowed_instructions)
750
+ )
751
+ )
752
+ if (
753
+ destination.is_q_register()
754
+ and source_x.is_d_register()
755
+ and source_y.is_d_register()
756
+ ):
757
+ pass
758
+ else:
759
+ raise ValueError(
760
+ "Invalid operands in instruction {0} {1}, {2}, {3}".format(
761
+ name, destination, source_x, source_y
762
+ )
763
+ )
764
+
765
+ def get_input_registers_list(self):
766
+ return (
767
+ self.operands[1].get_registers_list()
768
+ + self.operands[2].get_registers_list()
769
+ )
770
+
771
+ def get_output_registers_list(self):
772
+ return self.operands[0].get_registers_list()
773
+
774
+
775
+ class VfpNeonMovInstruction(Instruction):
776
+ def __init__(self, name, destination, source, origin=None):
777
+ if name == "VMOV" and destination.is_q_register() and source.is_q_register():
778
+ super(VfpNeonMovInstruction, self).__init__(
779
+ name,
780
+ [destination, source],
781
+ isa_extensions=Extension.NEON,
782
+ origin=origin,
783
+ )
784
+ elif name == "VMOV" and destination.is_d_register() and source.is_d_register():
785
+ super(VfpNeonMovInstruction, self).__init__(
786
+ name,
787
+ [destination, source],
788
+ isa_extensions=Extension.NEON,
789
+ origin=origin,
790
+ )
791
+ elif (
792
+ name == "VMOV.F32"
793
+ and destination.is_s_register()
794
+ and source.is_s_register()
795
+ ):
796
+ super(VfpNeonMovInstruction, self).__init__(
797
+ name,
798
+ [destination, source],
799
+ isa_extensions=Extension.VFP2,
800
+ origin=origin,
801
+ )
802
+ elif (
803
+ name == "VMOV.F64"
804
+ and destination.is_d_register()
805
+ and source.is_d_register()
806
+ ):
807
+ super(VfpNeonMovInstruction, self).__init__(
808
+ name,
809
+ [destination, source],
810
+ isa_extensions=Extension.VFP2,
811
+ origin=origin,
812
+ )
813
+ else:
814
+ raise ValueError(
815
+ "Invalid operands in instruction {0} {1}, {2}".format(
816
+ name, destination, source
817
+ )
818
+ )
819
+
820
+ def get_input_registers_list(self):
821
+ return self.operands[1].get_registers_list()
822
+
823
+ def get_output_registers_list(self):
824
+ return self.operands[0].get_registers_list()
825
+
826
+
827
+ class VADD:
828
+ @staticmethod
829
+ def I8(destination, source_x, source_y=None):
830
+ origin = (
831
+ inspect.stack()
832
+ if nervapy.arm.function.active_function.collect_origin
833
+ else None
834
+ )
835
+ if source_y is None:
836
+ destination, source_x, source_y = (destination, destination, source_x)
837
+ instruction = NeonArithmeticInstruction(
838
+ "VADD.I8",
839
+ Operand(destination),
840
+ Operand(source_x),
841
+ Operand(source_y),
842
+ origin=origin,
843
+ )
844
+ if nervapy.stream.active_stream is not None:
845
+ nervapy.stream.active_stream.add_instruction(instruction)
846
+ return instruction
847
+
848
+ @staticmethod
849
+ def I16(destination, source_x, source_y=None):
850
+ origin = (
851
+ inspect.stack()
852
+ if nervapy.arm.function.active_function.collect_origin
853
+ else None
854
+ )
855
+ if source_y is None:
856
+ destination, source_x, source_y = (destination, destination, source_x)
857
+ instruction = NeonArithmeticInstruction(
858
+ "VADD.I16",
859
+ Operand(destination),
860
+ Operand(source_x),
861
+ Operand(source_y),
862
+ origin=origin,
863
+ )
864
+ if nervapy.stream.active_stream is not None:
865
+ nervapy.stream.active_stream.add_instruction(instruction)
866
+ return instruction
867
+
868
+ @staticmethod
869
+ def I32(destination, source_x, source_y=None):
870
+ origin = (
871
+ inspect.stack()
872
+ if nervapy.arm.function.active_function.collect_origin
873
+ else None
874
+ )
875
+ if source_y is None:
876
+ destination, source_x, source_y = (destination, destination, source_x)
877
+ instruction = NeonArithmeticInstruction(
878
+ "VADD.I32",
879
+ Operand(destination),
880
+ Operand(source_x),
881
+ Operand(source_y),
882
+ origin=origin,
883
+ )
884
+ if nervapy.stream.active_stream is not None:
885
+ nervapy.stream.active_stream.add_instruction(instruction)
886
+ return instruction
887
+
888
+ @staticmethod
889
+ def I64(destination, source_x, source_y=None):
890
+ origin = (
891
+ inspect.stack()
892
+ if nervapy.arm.function.active_function.collect_origin
893
+ else None
894
+ )
895
+ if source_y is None:
896
+ destination, source_x, source_y = (destination, destination, source_x)
897
+ instruction = NeonArithmeticInstruction(
898
+ "VADD.I64",
899
+ Operand(destination),
900
+ Operand(source_x),
901
+ Operand(source_y),
902
+ origin=origin,
903
+ )
904
+ if nervapy.stream.active_stream is not None:
905
+ nervapy.stream.active_stream.add_instruction(instruction)
906
+ return instruction
907
+
908
+ @staticmethod
909
+ def F32(destination, source_x, source_y=None):
910
+ origin = (
911
+ inspect.stack()
912
+ if nervapy.arm.function.active_function.collect_origin
913
+ else None
914
+ )
915
+ if source_y is None:
916
+ destination, source_x, source_y = (destination, destination, source_x)
917
+ instruction = VFPNeonBinaryArithmeticInstruction(
918
+ "VADD.F32",
919
+ Operand(destination),
920
+ Operand(source_x),
921
+ Operand(source_y),
922
+ origin=origin,
923
+ )
924
+ if nervapy.stream.active_stream is not None:
925
+ nervapy.stream.active_stream.add_instruction(instruction)
926
+ return instruction
927
+
928
+ @staticmethod
929
+ def F64(destination, source_x, source_y=None):
930
+ origin = (
931
+ inspect.stack()
932
+ if nervapy.arm.function.active_function.collect_origin
933
+ else None
934
+ )
935
+ if source_y is None:
936
+ destination, source_x, source_y = (destination, destination, source_x)
937
+ instruction = VFPDoublePrecisionBinaryArithmeticInstruction(
938
+ "VADD.F64",
939
+ Operand(destination),
940
+ Operand(source_x),
941
+ Operand(source_y),
942
+ origin=origin,
943
+ )
944
+ if nervapy.stream.active_stream is not None:
945
+ nervapy.stream.active_stream.add_instruction(instruction)
946
+ return instruction
947
+
948
+
949
+ class VADDL:
950
+ @staticmethod
951
+ def S8(destination, source_x, source_y):
952
+ origin = (
953
+ inspect.stack()
954
+ if nervapy.arm.function.active_function.collect_origin
955
+ else None
956
+ )
957
+ instruction = NeonWideArithmeticInstruction(
958
+ "VADDL.S8",
959
+ Operand(destination),
960
+ Operand(source_x),
961
+ Operand(source_y),
962
+ origin=origin,
963
+ )
964
+ if nervapy.stream.active_stream is not None:
965
+ nervapy.stream.active_stream.add_instruction(instruction)
966
+ return instruction
967
+
968
+ @staticmethod
969
+ def S16(destination, source_x, source_y):
970
+ origin = (
971
+ inspect.stack()
972
+ if nervapy.arm.function.active_function.collect_origin
973
+ else None
974
+ )
975
+ instruction = NeonWideArithmeticInstruction(
976
+ "VADDL.S16",
977
+ Operand(destination),
978
+ Operand(source_x),
979
+ Operand(source_y),
980
+ origin=origin,
981
+ )
982
+ if nervapy.stream.active_stream is not None:
983
+ nervapy.stream.active_stream.add_instruction(instruction)
984
+ return instruction
985
+
986
+ @staticmethod
987
+ def S32(destination, source_x, source_y):
988
+ origin = (
989
+ inspect.stack()
990
+ if nervapy.arm.function.active_function.collect_origin
991
+ else None
992
+ )
993
+ instruction = NeonWideArithmeticInstruction(
994
+ "VADDL.S32",
995
+ Operand(destination),
996
+ Operand(source_x),
997
+ Operand(source_y),
998
+ origin=origin,
999
+ )
1000
+ if nervapy.stream.active_stream is not None:
1001
+ nervapy.stream.active_stream.add_instruction(instruction)
1002
+ return instruction
1003
+
1004
+ @staticmethod
1005
+ def U8(destination, source_x, source_y):
1006
+ origin = (
1007
+ inspect.stack()
1008
+ if nervapy.arm.function.active_function.collect_origin
1009
+ else None
1010
+ )
1011
+ instruction = NeonWideArithmeticInstruction(
1012
+ "VADDL.U8",
1013
+ Operand(destination),
1014
+ Operand(source_x),
1015
+ Operand(source_y),
1016
+ origin=origin,
1017
+ )
1018
+ if nervapy.stream.active_stream is not None:
1019
+ nervapy.stream.active_stream.add_instruction(instruction)
1020
+ return instruction
1021
+
1022
+ @staticmethod
1023
+ def U16(destination, source_x, source_y):
1024
+ origin = (
1025
+ inspect.stack()
1026
+ if nervapy.arm.function.active_function.collect_origin
1027
+ else None
1028
+ )
1029
+ instruction = NeonWideArithmeticInstruction(
1030
+ "VADDL.U16",
1031
+ Operand(destination),
1032
+ Operand(source_x),
1033
+ Operand(source_y),
1034
+ origin=origin,
1035
+ )
1036
+ if nervapy.stream.active_stream is not None:
1037
+ nervapy.stream.active_stream.add_instruction(instruction)
1038
+ return instruction
1039
+
1040
+ @staticmethod
1041
+ def U32(destination, source_x, source_y):
1042
+ origin = (
1043
+ inspect.stack()
1044
+ if nervapy.arm.function.active_function.collect_origin
1045
+ else None
1046
+ )
1047
+ instruction = NeonWideArithmeticInstruction(
1048
+ "VADDL.U32",
1049
+ Operand(destination),
1050
+ Operand(source_x),
1051
+ Operand(source_y),
1052
+ origin=origin,
1053
+ )
1054
+ if nervapy.stream.active_stream is not None:
1055
+ nervapy.stream.active_stream.add_instruction(instruction)
1056
+ return instruction
1057
+
1058
+
1059
+ class VSUB:
1060
+ @staticmethod
1061
+ def I8(destination, source_x, source_y=None):
1062
+ origin = (
1063
+ inspect.stack()
1064
+ if nervapy.arm.function.active_function.collect_origin
1065
+ else None
1066
+ )
1067
+ if source_y is None:
1068
+ destination, source_x, source_y = (destination, destination, source_x)
1069
+ instruction = NeonArithmeticInstruction(
1070
+ "VSUB.I8",
1071
+ Operand(destination),
1072
+ Operand(source_x),
1073
+ Operand(source_y),
1074
+ origin=origin,
1075
+ )
1076
+ if nervapy.stream.active_stream is not None:
1077
+ nervapy.stream.active_stream.add_instruction(instruction)
1078
+ return instruction
1079
+
1080
+ @staticmethod
1081
+ def I16(destination, source_x, source_y=None):
1082
+ origin = (
1083
+ inspect.stack()
1084
+ if nervapy.arm.function.active_function.collect_origin
1085
+ else None
1086
+ )
1087
+ if source_y is None:
1088
+ destination, source_x, source_y = (destination, destination, source_x)
1089
+ instruction = NeonArithmeticInstruction(
1090
+ "VSUB.I16",
1091
+ Operand(destination),
1092
+ Operand(source_x),
1093
+ Operand(source_y),
1094
+ origin=origin,
1095
+ )
1096
+ if nervapy.stream.active_stream is not None:
1097
+ nervapy.stream.active_stream.add_instruction(instruction)
1098
+ return instruction
1099
+
1100
+ @staticmethod
1101
+ def I32(destination, source_x, source_y=None):
1102
+ origin = (
1103
+ inspect.stack()
1104
+ if nervapy.arm.function.active_function.collect_origin
1105
+ else None
1106
+ )
1107
+ if source_y is None:
1108
+ destination, source_x, source_y = (destination, destination, source_x)
1109
+ instruction = NeonArithmeticInstruction(
1110
+ "VSUB.I32",
1111
+ Operand(destination),
1112
+ Operand(source_x),
1113
+ Operand(source_y),
1114
+ origin=origin,
1115
+ )
1116
+ if nervapy.stream.active_stream is not None:
1117
+ nervapy.stream.active_stream.add_instruction(instruction)
1118
+ return instruction
1119
+
1120
+ @staticmethod
1121
+ def I64(destination, source_x, source_y=None):
1122
+ origin = (
1123
+ inspect.stack()
1124
+ if nervapy.arm.function.active_function.collect_origin
1125
+ else None
1126
+ )
1127
+ if source_y is None:
1128
+ destination, source_x, source_y = (destination, destination, source_x)
1129
+ instruction = NeonArithmeticInstruction(
1130
+ "VSUB.I64",
1131
+ Operand(destination),
1132
+ Operand(source_x),
1133
+ Operand(source_y),
1134
+ origin=origin,
1135
+ )
1136
+ if nervapy.stream.active_stream is not None:
1137
+ nervapy.stream.active_stream.add_instruction(instruction)
1138
+ return instruction
1139
+
1140
+ @staticmethod
1141
+ def F32(destination, source_x, source_y=None):
1142
+ origin = (
1143
+ inspect.stack()
1144
+ if nervapy.arm.function.active_function.collect_origin
1145
+ else None
1146
+ )
1147
+ if source_y is None:
1148
+ destination, source_x, source_y = (destination, destination, source_x)
1149
+ instruction = VFPNeonBinaryArithmeticInstruction(
1150
+ "VSUB.F32",
1151
+ Operand(destination),
1152
+ Operand(source_x),
1153
+ Operand(source_y),
1154
+ origin=origin,
1155
+ )
1156
+ if nervapy.stream.active_stream is not None:
1157
+ nervapy.stream.active_stream.add_instruction(instruction)
1158
+ return instruction
1159
+
1160
+ @staticmethod
1161
+ def F64(destination, source_x, source_y=None):
1162
+ origin = (
1163
+ inspect.stack()
1164
+ if nervapy.arm.function.active_function.collect_origin
1165
+ else None
1166
+ )
1167
+ if source_y is None:
1168
+ destination, source_x, source_y = (destination, destination, source_x)
1169
+ instruction = VFPDoublePrecisionBinaryArithmeticInstruction(
1170
+ "VSUB.F64",
1171
+ Operand(destination),
1172
+ Operand(source_x),
1173
+ Operand(source_y),
1174
+ origin=origin,
1175
+ )
1176
+ if nervapy.stream.active_stream is not None:
1177
+ nervapy.stream.active_stream.add_instruction(instruction)
1178
+ return instruction
1179
+
1180
+
1181
+ class VSUBL:
1182
+ @staticmethod
1183
+ def S8(destination, source_x, source_y):
1184
+ origin = (
1185
+ inspect.stack()
1186
+ if nervapy.arm.function.active_function.collect_origin
1187
+ else None
1188
+ )
1189
+ instruction = NeonWideArithmeticInstruction(
1190
+ "VSUBL.S8",
1191
+ Operand(destination),
1192
+ Operand(source_x),
1193
+ Operand(source_y),
1194
+ origin=origin,
1195
+ )
1196
+ if nervapy.stream.active_stream is not None:
1197
+ nervapy.stream.active_stream.add_instruction(instruction)
1198
+ return instruction
1199
+
1200
+ @staticmethod
1201
+ def S16(destination, source_x, source_y):
1202
+ origin = (
1203
+ inspect.stack()
1204
+ if nervapy.arm.function.active_function.collect_origin
1205
+ else None
1206
+ )
1207
+ instruction = NeonWideArithmeticInstruction(
1208
+ "VSUBL.S16",
1209
+ Operand(destination),
1210
+ Operand(source_x),
1211
+ Operand(source_y),
1212
+ origin=origin,
1213
+ )
1214
+ if nervapy.stream.active_stream is not None:
1215
+ nervapy.stream.active_stream.add_instruction(instruction)
1216
+ return instruction
1217
+
1218
+ @staticmethod
1219
+ def S32(destination, source_x, source_y):
1220
+ origin = (
1221
+ inspect.stack()
1222
+ if nervapy.arm.function.active_function.collect_origin
1223
+ else None
1224
+ )
1225
+ instruction = NeonWideArithmeticInstruction(
1226
+ "VSUBL.S32",
1227
+ Operand(destination),
1228
+ Operand(source_x),
1229
+ Operand(source_y),
1230
+ origin=origin,
1231
+ )
1232
+ if nervapy.stream.active_stream is not None:
1233
+ nervapy.stream.active_stream.add_instruction(instruction)
1234
+ return instruction
1235
+
1236
+ @staticmethod
1237
+ def U8(destination, source_x, source_y):
1238
+ origin = (
1239
+ inspect.stack()
1240
+ if nervapy.arm.function.active_function.collect_origin
1241
+ else None
1242
+ )
1243
+ instruction = NeonWideArithmeticInstruction(
1244
+ "VSUBL.U8",
1245
+ Operand(destination),
1246
+ Operand(source_x),
1247
+ Operand(source_y),
1248
+ origin=origin,
1249
+ )
1250
+ if nervapy.stream.active_stream is not None:
1251
+ nervapy.stream.active_stream.add_instruction(instruction)
1252
+ return instruction
1253
+
1254
+ @staticmethod
1255
+ def U16(destination, source_x, source_y):
1256
+ origin = (
1257
+ inspect.stack()
1258
+ if nervapy.arm.function.active_function.collect_origin
1259
+ else None
1260
+ )
1261
+ instruction = NeonWideArithmeticInstruction(
1262
+ "VSUBL.U16",
1263
+ Operand(destination),
1264
+ Operand(source_x),
1265
+ Operand(source_y),
1266
+ origin=origin,
1267
+ )
1268
+ if nervapy.stream.active_stream is not None:
1269
+ nervapy.stream.active_stream.add_instruction(instruction)
1270
+ return instruction
1271
+
1272
+ @staticmethod
1273
+ def U32(destination, source_x, source_y):
1274
+ origin = (
1275
+ inspect.stack()
1276
+ if nervapy.arm.function.active_function.collect_origin
1277
+ else None
1278
+ )
1279
+ instruction = NeonWideArithmeticInstruction(
1280
+ "VSUBL.U32",
1281
+ Operand(destination),
1282
+ Operand(source_x),
1283
+ Operand(source_y),
1284
+ origin=origin,
1285
+ )
1286
+ if nervapy.stream.active_stream is not None:
1287
+ nervapy.stream.active_stream.add_instruction(instruction)
1288
+ return instruction
1289
+
1290
+
1291
+ class VMUL:
1292
+ @staticmethod
1293
+ def I8(destination, source_x, source_y=None):
1294
+ origin = (
1295
+ inspect.stack()
1296
+ if nervapy.arm.function.active_function.collect_origin
1297
+ else None
1298
+ )
1299
+ if source_y is None:
1300
+ destination, source_x, source_y = (destination, destination, source_x)
1301
+ instruction = NeonArithmeticInstruction(
1302
+ "VMUL.I8",
1303
+ Operand(destination),
1304
+ Operand(source_x),
1305
+ Operand(source_y),
1306
+ origin=origin,
1307
+ )
1308
+ if nervapy.stream.active_stream is not None:
1309
+ nervapy.stream.active_stream.add_instruction(instruction)
1310
+ return instruction
1311
+
1312
+ @staticmethod
1313
+ def I16(destination, source_x, source_y=None):
1314
+ origin = (
1315
+ inspect.stack()
1316
+ if nervapy.arm.function.active_function.collect_origin
1317
+ else None
1318
+ )
1319
+ if source_y is None:
1320
+ destination, source_x, source_y = (destination, destination, source_x)
1321
+ instruction = NeonArithmeticInstruction(
1322
+ "VMUL.I16",
1323
+ Operand(destination),
1324
+ Operand(source_x),
1325
+ Operand(source_y),
1326
+ origin=origin,
1327
+ )
1328
+ if nervapy.stream.active_stream is not None:
1329
+ nervapy.stream.active_stream.add_instruction(instruction)
1330
+ return instruction
1331
+
1332
+ @staticmethod
1333
+ def I32(destination, source_x, source_y=None):
1334
+ origin = (
1335
+ inspect.stack()
1336
+ if nervapy.arm.function.active_function.collect_origin
1337
+ else None
1338
+ )
1339
+ if source_y is None:
1340
+ destination, source_x, source_y = (destination, destination, source_x)
1341
+ instruction = NeonArithmeticInstruction(
1342
+ "VMUL.I32",
1343
+ Operand(destination),
1344
+ Operand(source_x),
1345
+ Operand(source_y),
1346
+ origin=origin,
1347
+ )
1348
+ if nervapy.stream.active_stream is not None:
1349
+ nervapy.stream.active_stream.add_instruction(instruction)
1350
+ return instruction
1351
+
1352
+ @staticmethod
1353
+ def F32(destination, source_x, source_y=None):
1354
+ origin = (
1355
+ inspect.stack()
1356
+ if nervapy.arm.function.active_function.collect_origin
1357
+ else None
1358
+ )
1359
+ if source_y is None:
1360
+ destination, source_x, source_y = (destination, destination, source_x)
1361
+ instruction = VFPNeonBinaryArithmeticInstruction(
1362
+ "VMUL.F32",
1363
+ Operand(destination),
1364
+ Operand(source_x),
1365
+ Operand(source_y),
1366
+ origin=origin,
1367
+ )
1368
+ if nervapy.stream.active_stream is not None:
1369
+ nervapy.stream.active_stream.add_instruction(instruction)
1370
+ return instruction
1371
+
1372
+ @staticmethod
1373
+ def F64(destination, source_x, source_y=None):
1374
+ origin = (
1375
+ inspect.stack()
1376
+ if nervapy.arm.function.active_function.collect_origin
1377
+ else None
1378
+ )
1379
+ if source_y is None:
1380
+ destination, source_x, source_y = (destination, destination, source_x)
1381
+ instruction = VFPDoublePrecisionBinaryArithmeticInstruction(
1382
+ "VMUL.F64",
1383
+ Operand(destination),
1384
+ Operand(source_x),
1385
+ Operand(source_y),
1386
+ origin=origin,
1387
+ )
1388
+ if nervapy.stream.active_stream is not None:
1389
+ nervapy.stream.active_stream.add_instruction(instruction)
1390
+ return instruction
1391
+
1392
+
1393
+ class VMULL:
1394
+ @staticmethod
1395
+ def S8(destination, source_x, source_y):
1396
+ origin = (
1397
+ inspect.stack()
1398
+ if nervapy.arm.function.active_function.collect_origin
1399
+ else None
1400
+ )
1401
+ instruction = NeonWideArithmeticInstruction(
1402
+ "VMULL.S8",
1403
+ Operand(destination),
1404
+ Operand(source_x),
1405
+ Operand(source_y),
1406
+ origin=origin,
1407
+ )
1408
+ if nervapy.stream.active_stream is not None:
1409
+ nervapy.stream.active_stream.add_instruction(instruction)
1410
+ return instruction
1411
+
1412
+ @staticmethod
1413
+ def S16(destination, source_x, source_y):
1414
+ origin = (
1415
+ inspect.stack()
1416
+ if nervapy.arm.function.active_function.collect_origin
1417
+ else None
1418
+ )
1419
+ instruction = NeonWideArithmeticInstruction(
1420
+ "VMULL.S16",
1421
+ Operand(destination),
1422
+ Operand(source_x),
1423
+ Operand(source_y),
1424
+ origin=origin,
1425
+ )
1426
+ if nervapy.stream.active_stream is not None:
1427
+ nervapy.stream.active_stream.add_instruction(instruction)
1428
+ return instruction
1429
+
1430
+ @staticmethod
1431
+ def S32(destination, source_x, source_y):
1432
+ origin = (
1433
+ inspect.stack()
1434
+ if nervapy.arm.function.active_function.collect_origin
1435
+ else None
1436
+ )
1437
+ instruction = NeonWideArithmeticInstruction(
1438
+ "VMULL.S32",
1439
+ Operand(destination),
1440
+ Operand(source_x),
1441
+ Operand(source_y),
1442
+ origin=origin,
1443
+ )
1444
+ if nervapy.stream.active_stream is not None:
1445
+ nervapy.stream.active_stream.add_instruction(instruction)
1446
+ return instruction
1447
+
1448
+ @staticmethod
1449
+ def U8(destination, source_x, source_y):
1450
+ origin = (
1451
+ inspect.stack()
1452
+ if nervapy.arm.function.active_function.collect_origin
1453
+ else None
1454
+ )
1455
+ instruction = NeonWideArithmeticInstruction(
1456
+ "VMULL.U8",
1457
+ Operand(destination),
1458
+ Operand(source_x),
1459
+ Operand(source_y),
1460
+ origin=origin,
1461
+ )
1462
+ if nervapy.stream.active_stream is not None:
1463
+ nervapy.stream.active_stream.add_instruction(instruction)
1464
+ return instruction
1465
+
1466
+ @staticmethod
1467
+ def U16(destination, source_x, source_y):
1468
+ origin = (
1469
+ inspect.stack()
1470
+ if nervapy.arm.function.active_function.collect_origin
1471
+ else None
1472
+ )
1473
+ instruction = NeonWideArithmeticInstruction(
1474
+ "VMULL.U16",
1475
+ Operand(destination),
1476
+ Operand(source_x),
1477
+ Operand(source_y),
1478
+ origin=origin,
1479
+ )
1480
+ if nervapy.stream.active_stream is not None:
1481
+ nervapy.stream.active_stream.add_instruction(instruction)
1482
+ return instruction
1483
+
1484
+ @staticmethod
1485
+ def U32(destination, source_x, source_y):
1486
+ origin = (
1487
+ inspect.stack()
1488
+ if nervapy.arm.function.active_function.collect_origin
1489
+ else None
1490
+ )
1491
+ instruction = NeonWideArithmeticInstruction(
1492
+ "VMULL.U32",
1493
+ Operand(destination),
1494
+ Operand(source_x),
1495
+ Operand(source_y),
1496
+ origin=origin,
1497
+ )
1498
+ if nervapy.stream.active_stream is not None:
1499
+ nervapy.stream.active_stream.add_instruction(instruction)
1500
+ return instruction
1501
+
1502
+ @staticmethod
1503
+ def P8(destination, source_x, source_y):
1504
+ origin = (
1505
+ inspect.stack()
1506
+ if nervapy.arm.function.active_function.collect_origin
1507
+ else None
1508
+ )
1509
+ instruction = NeonWideArithmeticInstruction(
1510
+ "VMULL.P8",
1511
+ Operand(destination),
1512
+ Operand(source_x),
1513
+ Operand(source_y),
1514
+ origin=origin,
1515
+ )
1516
+ if nervapy.stream.active_stream is not None:
1517
+ nervapy.stream.active_stream.add_instruction(instruction)
1518
+ return instruction
1519
+
1520
+
1521
+ class VMIN:
1522
+ @staticmethod
1523
+ def S8(destination, source_x, source_y=None):
1524
+ origin = (
1525
+ inspect.stack()
1526
+ if nervapy.arm.function.active_function.collect_origin
1527
+ else None
1528
+ )
1529
+ if source_y is None:
1530
+ destination, source_x, source_y = (destination, destination, source_x)
1531
+ instruction = NeonArithmeticInstruction(
1532
+ "VMIN.S8",
1533
+ Operand(destination),
1534
+ Operand(source_x),
1535
+ Operand(source_y),
1536
+ origin=origin,
1537
+ )
1538
+ if nervapy.stream.active_stream is not None:
1539
+ nervapy.stream.active_stream.add_instruction(instruction)
1540
+ return instruction
1541
+
1542
+ @staticmethod
1543
+ def S16(destination, source_x, source_y=None):
1544
+ origin = (
1545
+ inspect.stack()
1546
+ if nervapy.arm.function.active_function.collect_origin
1547
+ else None
1548
+ )
1549
+ if source_y is None:
1550
+ destination, source_x, source_y = (destination, destination, source_x)
1551
+ instruction = NeonArithmeticInstruction(
1552
+ "VMIN.S16",
1553
+ Operand(destination),
1554
+ Operand(source_x),
1555
+ Operand(source_y),
1556
+ origin=origin,
1557
+ )
1558
+ if nervapy.stream.active_stream is not None:
1559
+ nervapy.stream.active_stream.add_instruction(instruction)
1560
+ return instruction
1561
+
1562
+ @staticmethod
1563
+ def S32(destination, source_x, source_y=None):
1564
+ origin = (
1565
+ inspect.stack()
1566
+ if nervapy.arm.function.active_function.collect_origin
1567
+ else None
1568
+ )
1569
+ if source_y is None:
1570
+ destination, source_x, source_y = (destination, destination, source_x)
1571
+ instruction = NeonArithmeticInstruction(
1572
+ "VMIN.S32",
1573
+ Operand(destination),
1574
+ Operand(source_x),
1575
+ Operand(source_y),
1576
+ origin=origin,
1577
+ )
1578
+ if nervapy.stream.active_stream is not None:
1579
+ nervapy.stream.active_stream.add_instruction(instruction)
1580
+ return instruction
1581
+
1582
+ @staticmethod
1583
+ def U8(destination, source_x, source_y=None):
1584
+ origin = (
1585
+ inspect.stack()
1586
+ if nervapy.arm.function.active_function.collect_origin
1587
+ else None
1588
+ )
1589
+ if source_y is None:
1590
+ destination, source_x, source_y = (destination, destination, source_x)
1591
+ instruction = NeonArithmeticInstruction(
1592
+ "VMIN.U8",
1593
+ Operand(destination),
1594
+ Operand(source_x),
1595
+ Operand(source_y),
1596
+ origin=origin,
1597
+ )
1598
+ if nervapy.stream.active_stream is not None:
1599
+ nervapy.stream.active_stream.add_instruction(instruction)
1600
+ return instruction
1601
+
1602
+ @staticmethod
1603
+ def U16(destination, source_x, source_y=None):
1604
+ origin = (
1605
+ inspect.stack()
1606
+ if nervapy.arm.function.active_function.collect_origin
1607
+ else None
1608
+ )
1609
+ if source_y is None:
1610
+ destination, source_x, source_y = (destination, destination, source_x)
1611
+ instruction = NeonArithmeticInstruction(
1612
+ "VMIN.U16",
1613
+ Operand(destination),
1614
+ Operand(source_x),
1615
+ Operand(source_y),
1616
+ origin=origin,
1617
+ )
1618
+ if nervapy.stream.active_stream is not None:
1619
+ nervapy.stream.active_stream.add_instruction(instruction)
1620
+ return instruction
1621
+
1622
+ @staticmethod
1623
+ def U32(destination, source_x, source_y=None):
1624
+ origin = (
1625
+ inspect.stack()
1626
+ if nervapy.arm.function.active_function.collect_origin
1627
+ else None
1628
+ )
1629
+ if source_y is None:
1630
+ destination, source_x, source_y = (destination, destination, source_x)
1631
+ instruction = NeonArithmeticInstruction(
1632
+ "VMIN.U32",
1633
+ Operand(destination),
1634
+ Operand(source_x),
1635
+ Operand(source_y),
1636
+ origin=origin,
1637
+ )
1638
+ if nervapy.stream.active_stream is not None:
1639
+ nervapy.stream.active_stream.add_instruction(instruction)
1640
+ return instruction
1641
+
1642
+ @staticmethod
1643
+ def F32(destination, source_x, source_y=None):
1644
+ origin = (
1645
+ inspect.stack()
1646
+ if nervapy.arm.function.active_function.collect_origin
1647
+ else None
1648
+ )
1649
+ if source_y is None:
1650
+ destination, source_x, source_y = (destination, destination, source_x)
1651
+ instruction = NeonArithmeticInstruction(
1652
+ "VMIN.F32",
1653
+ Operand(destination),
1654
+ Operand(source_x),
1655
+ Operand(source_y),
1656
+ origin=origin,
1657
+ )
1658
+ if nervapy.stream.active_stream is not None:
1659
+ nervapy.stream.active_stream.add_instruction(instruction)
1660
+ return instruction
1661
+
1662
+
1663
+ class VMAX:
1664
+ @staticmethod
1665
+ def S8(destination, source_x, source_y=None):
1666
+ origin = (
1667
+ inspect.stack()
1668
+ if nervapy.arm.function.active_function.collect_origin
1669
+ else None
1670
+ )
1671
+ if source_y is None:
1672
+ destination, source_x, source_y = (destination, destination, source_x)
1673
+ instruction = NeonArithmeticInstruction(
1674
+ "VMAX.S8",
1675
+ Operand(destination),
1676
+ Operand(source_x),
1677
+ Operand(source_y),
1678
+ origin=origin,
1679
+ )
1680
+ if nervapy.stream.active_stream is not None:
1681
+ nervapy.stream.active_stream.add_instruction(instruction)
1682
+ return instruction
1683
+
1684
+ @staticmethod
1685
+ def S16(destination, source_x, source_y=None):
1686
+ origin = (
1687
+ inspect.stack()
1688
+ if nervapy.arm.function.active_function.collect_origin
1689
+ else None
1690
+ )
1691
+ if source_y is None:
1692
+ destination, source_x, source_y = (destination, destination, source_x)
1693
+ instruction = NeonArithmeticInstruction(
1694
+ "VMAX.S16",
1695
+ Operand(destination),
1696
+ Operand(source_x),
1697
+ Operand(source_y),
1698
+ origin=origin,
1699
+ )
1700
+ if nervapy.stream.active_stream is not None:
1701
+ nervapy.stream.active_stream.add_instruction(instruction)
1702
+ return instruction
1703
+
1704
+ @staticmethod
1705
+ def S32(destination, source_x, source_y=None):
1706
+ origin = (
1707
+ inspect.stack()
1708
+ if nervapy.arm.function.active_function.collect_origin
1709
+ else None
1710
+ )
1711
+ if source_y is None:
1712
+ destination, source_x, source_y = (destination, destination, source_x)
1713
+ instruction = NeonArithmeticInstruction(
1714
+ "VMAX.S32",
1715
+ Operand(destination),
1716
+ Operand(source_x),
1717
+ Operand(source_y),
1718
+ origin=origin,
1719
+ )
1720
+ if nervapy.stream.active_stream is not None:
1721
+ nervapy.stream.active_stream.add_instruction(instruction)
1722
+ return instruction
1723
+
1724
+ @staticmethod
1725
+ def U8(destination, source_x, source_y=None):
1726
+ origin = (
1727
+ inspect.stack()
1728
+ if nervapy.arm.function.active_function.collect_origin
1729
+ else None
1730
+ )
1731
+ if source_y is None:
1732
+ destination, source_x, source_y = (destination, destination, source_x)
1733
+ instruction = NeonArithmeticInstruction(
1734
+ "VMAX.U8",
1735
+ Operand(destination),
1736
+ Operand(source_x),
1737
+ Operand(source_y),
1738
+ origin=origin,
1739
+ )
1740
+ if nervapy.stream.active_stream is not None:
1741
+ nervapy.stream.active_stream.add_instruction(instruction)
1742
+ return instruction
1743
+
1744
+ @staticmethod
1745
+ def U16(destination, source_x, source_y=None):
1746
+ origin = (
1747
+ inspect.stack()
1748
+ if nervapy.arm.function.active_function.collect_origin
1749
+ else None
1750
+ )
1751
+ if source_y is None:
1752
+ destination, source_x, source_y = (destination, destination, source_x)
1753
+ instruction = NeonArithmeticInstruction(
1754
+ "VMAX.U16",
1755
+ Operand(destination),
1756
+ Operand(source_x),
1757
+ Operand(source_y),
1758
+ origin=origin,
1759
+ )
1760
+ if nervapy.stream.active_stream is not None:
1761
+ nervapy.stream.active_stream.add_instruction(instruction)
1762
+ return instruction
1763
+
1764
+ @staticmethod
1765
+ def U32(destination, source_x, source_y=None):
1766
+ origin = (
1767
+ inspect.stack()
1768
+ if nervapy.arm.function.active_function.collect_origin
1769
+ else None
1770
+ )
1771
+ if source_y is None:
1772
+ destination, source_x, source_y = (destination, destination, source_x)
1773
+ instruction = NeonArithmeticInstruction(
1774
+ "VMAX.U32",
1775
+ Operand(destination),
1776
+ Operand(source_x),
1777
+ Operand(source_y),
1778
+ origin=origin,
1779
+ )
1780
+ if nervapy.stream.active_stream is not None:
1781
+ nervapy.stream.active_stream.add_instruction(instruction)
1782
+ return instruction
1783
+
1784
+ @staticmethod
1785
+ def F32(destination, source_x, source_y=None):
1786
+ origin = (
1787
+ inspect.stack()
1788
+ if nervapy.arm.function.active_function.collect_origin
1789
+ else None
1790
+ )
1791
+ if source_y is None:
1792
+ destination, source_x, source_y = (destination, destination, source_x)
1793
+ instruction = NeonArithmeticInstruction(
1794
+ "VMAX.F32",
1795
+ Operand(destination),
1796
+ Operand(source_x),
1797
+ Operand(source_y),
1798
+ origin=origin,
1799
+ )
1800
+ if nervapy.stream.active_stream is not None:
1801
+ nervapy.stream.active_stream.add_instruction(instruction)
1802
+ return instruction
1803
+
1804
+
1805
+ class VABD:
1806
+ @staticmethod
1807
+ def S8(destination, source_x, source_y=None):
1808
+ origin = (
1809
+ inspect.stack()
1810
+ if nervapy.arm.function.active_function.collect_origin
1811
+ else None
1812
+ )
1813
+ if source_y is None:
1814
+ destination, source_x, source_y = (destination, destination, source_x)
1815
+ instruction = NeonArithmeticInstruction(
1816
+ "VABD.S8",
1817
+ Operand(destination),
1818
+ Operand(source_x),
1819
+ Operand(source_y),
1820
+ origin=origin,
1821
+ )
1822
+ if nervapy.stream.active_stream is not None:
1823
+ nervapy.stream.active_stream.add_instruction(instruction)
1824
+ return instruction
1825
+
1826
+ @staticmethod
1827
+ def S16(destination, source_x, source_y=None):
1828
+ origin = (
1829
+ inspect.stack()
1830
+ if nervapy.arm.function.active_function.collect_origin
1831
+ else None
1832
+ )
1833
+ if source_y is None:
1834
+ destination, source_x, source_y = (destination, destination, source_x)
1835
+ instruction = NeonArithmeticInstruction(
1836
+ "VABD.S16",
1837
+ Operand(destination),
1838
+ Operand(source_x),
1839
+ Operand(source_y),
1840
+ origin=origin,
1841
+ )
1842
+ if nervapy.stream.active_stream is not None:
1843
+ nervapy.stream.active_stream.add_instruction(instruction)
1844
+ return instruction
1845
+
1846
+ @staticmethod
1847
+ def S32(destination, source_x, source_y=None):
1848
+ origin = (
1849
+ inspect.stack()
1850
+ if nervapy.arm.function.active_function.collect_origin
1851
+ else None
1852
+ )
1853
+ if source_y is None:
1854
+ destination, source_x, source_y = (destination, destination, source_x)
1855
+ instruction = NeonArithmeticInstruction(
1856
+ "VABD.S32",
1857
+ Operand(destination),
1858
+ Operand(source_x),
1859
+ Operand(source_y),
1860
+ origin=origin,
1861
+ )
1862
+ if nervapy.stream.active_stream is not None:
1863
+ nervapy.stream.active_stream.add_instruction(instruction)
1864
+ return instruction
1865
+
1866
+ @staticmethod
1867
+ def U8(destination, source_x, source_y=None):
1868
+ origin = (
1869
+ inspect.stack()
1870
+ if nervapy.arm.function.active_function.collect_origin
1871
+ else None
1872
+ )
1873
+ if source_y is None:
1874
+ destination, source_x, source_y = (destination, destination, source_x)
1875
+ instruction = NeonArithmeticInstruction(
1876
+ "VABD.U8",
1877
+ Operand(destination),
1878
+ Operand(source_x),
1879
+ Operand(source_y),
1880
+ origin=origin,
1881
+ )
1882
+ if nervapy.stream.active_stream is not None:
1883
+ nervapy.stream.active_stream.add_instruction(instruction)
1884
+ return instruction
1885
+
1886
+ @staticmethod
1887
+ def U16(destination, source_x, source_y=None):
1888
+ origin = (
1889
+ inspect.stack()
1890
+ if nervapy.arm.function.active_function.collect_origin
1891
+ else None
1892
+ )
1893
+ if source_y is None:
1894
+ destination, source_x, source_y = (destination, destination, source_x)
1895
+ instruction = NeonArithmeticInstruction(
1896
+ "VABD.U16",
1897
+ Operand(destination),
1898
+ Operand(source_x),
1899
+ Operand(source_y),
1900
+ origin=origin,
1901
+ )
1902
+ if nervapy.stream.active_stream is not None:
1903
+ nervapy.stream.active_stream.add_instruction(instruction)
1904
+ return instruction
1905
+
1906
+ @staticmethod
1907
+ def U32(destination, source_x, source_y=None):
1908
+ origin = (
1909
+ inspect.stack()
1910
+ if nervapy.arm.function.active_function.collect_origin
1911
+ else None
1912
+ )
1913
+ if source_y is None:
1914
+ destination, source_x, source_y = (destination, destination, source_x)
1915
+ instruction = NeonArithmeticInstruction(
1916
+ "VABD.U32",
1917
+ Operand(destination),
1918
+ Operand(source_x),
1919
+ Operand(source_y),
1920
+ origin=origin,
1921
+ )
1922
+ if nervapy.stream.active_stream is not None:
1923
+ nervapy.stream.active_stream.add_instruction(instruction)
1924
+ return instruction
1925
+
1926
+ @staticmethod
1927
+ def F32(destination, source_x, source_y=None):
1928
+ origin = (
1929
+ inspect.stack()
1930
+ if nervapy.arm.function.active_function.collect_origin
1931
+ else None
1932
+ )
1933
+ if source_y is None:
1934
+ destination, source_x, source_y = (destination, destination, source_x)
1935
+ instruction = NeonArithmeticInstruction(
1936
+ "VABD.F32",
1937
+ Operand(destination),
1938
+ Operand(source_x),
1939
+ Operand(source_y),
1940
+ origin=origin,
1941
+ )
1942
+ if nervapy.stream.active_stream is not None:
1943
+ nervapy.stream.active_stream.add_instruction(instruction)
1944
+ return instruction
1945
+
1946
+
1947
+ class VACGE:
1948
+ @staticmethod
1949
+ def F32(destination, source_x, source_y=None):
1950
+ origin = (
1951
+ inspect.stack()
1952
+ if nervapy.arm.function.active_function.collect_origin
1953
+ else None
1954
+ )
1955
+ if source_y is None:
1956
+ destination, source_x, source_y = (destination, destination, source_x)
1957
+ instruction = NeonArithmeticInstruction(
1958
+ "VACGE.F32",
1959
+ Operand(destination),
1960
+ Operand(source_x),
1961
+ Operand(source_y),
1962
+ origin=origin,
1963
+ )
1964
+ if nervapy.stream.active_stream is not None:
1965
+ nervapy.stream.active_stream.add_instruction(instruction)
1966
+ return instruction
1967
+
1968
+
1969
+ class VACGT:
1970
+ @staticmethod
1971
+ def F32(destination, source_x, source_y=None):
1972
+ origin = (
1973
+ inspect.stack()
1974
+ if nervapy.arm.function.active_function.collect_origin
1975
+ else None
1976
+ )
1977
+ if source_y is None:
1978
+ destination, source_x, source_y = (destination, destination, source_x)
1979
+ instruction = NeonArithmeticInstruction(
1980
+ "VACGT.F32",
1981
+ Operand(destination),
1982
+ Operand(source_x),
1983
+ Operand(source_y),
1984
+ origin=origin,
1985
+ )
1986
+ if nervapy.stream.active_stream is not None:
1987
+ nervapy.stream.active_stream.add_instruction(instruction)
1988
+ return instruction
1989
+
1990
+
1991
+ class VACLE:
1992
+ @staticmethod
1993
+ def F32(destination, source_x, source_y=None):
1994
+ origin = (
1995
+ inspect.stack()
1996
+ if nervapy.arm.function.active_function.collect_origin
1997
+ else None
1998
+ )
1999
+ if source_y is None:
2000
+ destination, source_x, source_y = (destination, destination, source_x)
2001
+ instruction = NeonArithmeticInstruction(
2002
+ "VACLE.F32",
2003
+ Operand(destination),
2004
+ Operand(source_x),
2005
+ Operand(source_y),
2006
+ origin=origin,
2007
+ )
2008
+ if nervapy.stream.active_stream is not None:
2009
+ nervapy.stream.active_stream.add_instruction(instruction)
2010
+ return instruction
2011
+
2012
+
2013
+ class VACLT:
2014
+ @staticmethod
2015
+ def F32(destination, source_x, source_y=None):
2016
+ origin = (
2017
+ inspect.stack()
2018
+ if nervapy.arm.function.active_function.collect_origin
2019
+ else None
2020
+ )
2021
+ if source_y is None:
2022
+ destination, source_x, source_y = (destination, destination, source_x)
2023
+ instruction = NeonArithmeticInstruction(
2024
+ "VACLT.F32",
2025
+ Operand(destination),
2026
+ Operand(source_x),
2027
+ Operand(source_y),
2028
+ origin=origin,
2029
+ )
2030
+ if nervapy.stream.active_stream is not None:
2031
+ nervapy.stream.active_stream.add_instruction(instruction)
2032
+ return instruction
2033
+
2034
+
2035
+ class VAND(object):
2036
+ @staticmethod
2037
+ def __new__(cls, destination, source_x, source_y=None):
2038
+ origin = (
2039
+ inspect.stack()
2040
+ if nervapy.arm.function.active_function.collect_origin
2041
+ else None
2042
+ )
2043
+ if source_y is None:
2044
+ destination, source_x, source_y = (destination, destination, source_x)
2045
+ instruction = NeonArithmeticInstruction(
2046
+ "VAND",
2047
+ Operand(destination),
2048
+ Operand(source_x),
2049
+ Operand(source_y),
2050
+ origin=origin,
2051
+ )
2052
+ if nervapy.stream.active_stream is not None:
2053
+ nervapy.stream.active_stream.add_instruction(instruction)
2054
+ return instruction
2055
+
2056
+
2057
+ class VBIC(object):
2058
+ @staticmethod
2059
+ def __new__(cls, destination, source_x, source_y=None):
2060
+ origin = (
2061
+ inspect.stack()
2062
+ if nervapy.arm.function.active_function.collect_origin
2063
+ else None
2064
+ )
2065
+ if source_y is None:
2066
+ destination, source_x, source_y = (destination, destination, source_x)
2067
+ instruction = NeonArithmeticInstruction(
2068
+ "VBIC",
2069
+ Operand(destination),
2070
+ Operand(source_x),
2071
+ Operand(source_y),
2072
+ origin=origin,
2073
+ )
2074
+ if nervapy.stream.active_stream is not None:
2075
+ nervapy.stream.active_stream.add_instruction(instruction)
2076
+ return instruction
2077
+
2078
+
2079
+ class VORR(object):
2080
+ @staticmethod
2081
+ def __new__(cls, destination, source_x, source_y=None):
2082
+ origin = (
2083
+ inspect.stack()
2084
+ if nervapy.arm.function.active_function.collect_origin
2085
+ else None
2086
+ )
2087
+ if source_y is None:
2088
+ destination, source_x, source_y = (destination, destination, source_x)
2089
+ instruction = NeonArithmeticInstruction(
2090
+ "VORR",
2091
+ Operand(destination),
2092
+ Operand(source_x),
2093
+ Operand(source_y),
2094
+ origin=origin,
2095
+ )
2096
+ if nervapy.stream.active_stream is not None:
2097
+ nervapy.stream.active_stream.add_instruction(instruction)
2098
+ return instruction
2099
+
2100
+
2101
+ class VORN(object):
2102
+ @staticmethod
2103
+ def __new__(cls, destination, source_x, source_y=None):
2104
+ origin = (
2105
+ inspect.stack()
2106
+ if nervapy.arm.function.active_function.collect_origin
2107
+ else None
2108
+ )
2109
+ if source_y is None:
2110
+ destination, source_x, source_y = (destination, destination, source_x)
2111
+ instruction = NeonArithmeticInstruction(
2112
+ "VORN",
2113
+ Operand(destination),
2114
+ Operand(source_x),
2115
+ Operand(source_y),
2116
+ origin=origin,
2117
+ )
2118
+ if nervapy.stream.active_stream is not None:
2119
+ nervapy.stream.active_stream.add_instruction(instruction)
2120
+ return instruction
2121
+
2122
+
2123
+ def VEOR(destination, source_x, source_y=None):
2124
+ origin = (
2125
+ inspect.stack() if nervapy.arm.function.active_function.collect_origin else None
2126
+ )
2127
+ if source_y is None:
2128
+ destination, source_x, source_y = (destination, destination, source_x)
2129
+ instruction = NeonArithmeticInstruction(
2130
+ "VEOR",
2131
+ Operand(destination),
2132
+ Operand(source_x),
2133
+ Operand(source_y),
2134
+ origin=origin,
2135
+ )
2136
+ if nervapy.stream.active_stream is not None:
2137
+ nervapy.stream.active_stream.add_instruction(instruction)
2138
+ return instruction
2139
+
2140
+
2141
+ class VPADD:
2142
+ @staticmethod
2143
+ def I8(destination, source_x, source_y=None):
2144
+ origin = (
2145
+ inspect.stack()
2146
+ if nervapy.arm.function.active_function.collect_origin
2147
+ else None
2148
+ )
2149
+ if source_y is None:
2150
+ destination, source_x, source_y = (destination, destination, source_x)
2151
+ instruction = NeonArithmeticInstruction(
2152
+ "VPADD.I8",
2153
+ Operand(destination),
2154
+ Operand(source_x),
2155
+ Operand(source_y),
2156
+ origin=origin,
2157
+ )
2158
+ if nervapy.stream.active_stream is not None:
2159
+ nervapy.stream.active_stream.add_instruction(instruction)
2160
+ return instruction
2161
+
2162
+ @staticmethod
2163
+ def I16(destination, source_x, source_y=None):
2164
+ origin = (
2165
+ inspect.stack()
2166
+ if nervapy.arm.function.active_function.collect_origin
2167
+ else None
2168
+ )
2169
+ if source_y is None:
2170
+ destination, source_x, source_y = (destination, destination, source_x)
2171
+ instruction = NeonArithmeticInstruction(
2172
+ "VPADD.I16",
2173
+ Operand(destination),
2174
+ Operand(source_x),
2175
+ Operand(source_y),
2176
+ origin=origin,
2177
+ )
2178
+ if nervapy.stream.active_stream is not None:
2179
+ nervapy.stream.active_stream.add_instruction(instruction)
2180
+ return instruction
2181
+
2182
+ @staticmethod
2183
+ def I32(destination, source_x, source_y=None):
2184
+ origin = (
2185
+ inspect.stack()
2186
+ if nervapy.arm.function.active_function.collect_origin
2187
+ else None
2188
+ )
2189
+ if source_y is None:
2190
+ destination, source_x, source_y = (destination, destination, source_x)
2191
+ instruction = NeonArithmeticInstruction(
2192
+ "VPADD.I32",
2193
+ Operand(destination),
2194
+ Operand(source_x),
2195
+ Operand(source_y),
2196
+ origin=origin,
2197
+ )
2198
+ if nervapy.stream.active_stream is not None:
2199
+ nervapy.stream.active_stream.add_instruction(instruction)
2200
+ return instruction
2201
+
2202
+ @staticmethod
2203
+ def F32(destination, source_x, source_y=None):
2204
+ origin = (
2205
+ inspect.stack()
2206
+ if nervapy.arm.function.active_function.collect_origin
2207
+ else None
2208
+ )
2209
+ if source_y is None:
2210
+ destination, source_x, source_y = (destination, destination, source_x)
2211
+ instruction = NeonArithmeticInstruction(
2212
+ "VPADD.F32",
2213
+ Operand(destination),
2214
+ Operand(source_x),
2215
+ Operand(source_y),
2216
+ origin=origin,
2217
+ )
2218
+ if nervapy.stream.active_stream is not None:
2219
+ nervapy.stream.active_stream.add_instruction(instruction)
2220
+ return instruction
2221
+
2222
+
2223
+ class VPMIN:
2224
+ @staticmethod
2225
+ def S8(destination, source_x, source_y=None):
2226
+ origin = (
2227
+ inspect.stack()
2228
+ if nervapy.arm.function.active_function.collect_origin
2229
+ else None
2230
+ )
2231
+ if source_y is None:
2232
+ destination, source_x, source_y = (destination, destination, source_x)
2233
+ instruction = NeonArithmeticInstruction(
2234
+ "VPMIN.S8",
2235
+ Operand(destination),
2236
+ Operand(source_x),
2237
+ Operand(source_y),
2238
+ origin=origin,
2239
+ )
2240
+ if nervapy.stream.active_stream is not None:
2241
+ nervapy.stream.active_stream.add_instruction(instruction)
2242
+ return instruction
2243
+
2244
+ @staticmethod
2245
+ def S16(destination, source_x, source_y=None):
2246
+ origin = (
2247
+ inspect.stack()
2248
+ if nervapy.arm.function.active_function.collect_origin
2249
+ else None
2250
+ )
2251
+ if source_y is None:
2252
+ destination, source_x, source_y = (destination, destination, source_x)
2253
+ instruction = NeonArithmeticInstruction(
2254
+ "VPMIN.S16",
2255
+ Operand(destination),
2256
+ Operand(source_x),
2257
+ Operand(source_y),
2258
+ origin=origin,
2259
+ )
2260
+ if nervapy.stream.active_stream is not None:
2261
+ nervapy.stream.active_stream.add_instruction(instruction)
2262
+ return instruction
2263
+
2264
+ @staticmethod
2265
+ def S32(destination, source_x, source_y=None):
2266
+ origin = (
2267
+ inspect.stack()
2268
+ if nervapy.arm.function.active_function.collect_origin
2269
+ else None
2270
+ )
2271
+ if source_y is None:
2272
+ destination, source_x, source_y = (destination, destination, source_x)
2273
+ instruction = NeonArithmeticInstruction(
2274
+ "VPMIN.S32",
2275
+ Operand(destination),
2276
+ Operand(source_x),
2277
+ Operand(source_y),
2278
+ origin=origin,
2279
+ )
2280
+ if nervapy.stream.active_stream is not None:
2281
+ nervapy.stream.active_stream.add_instruction(instruction)
2282
+ return instruction
2283
+
2284
+ @staticmethod
2285
+ def U8(destination, source_x, source_y=None):
2286
+ origin = (
2287
+ inspect.stack()
2288
+ if nervapy.arm.function.active_function.collect_origin
2289
+ else None
2290
+ )
2291
+ if source_y is None:
2292
+ destination, source_x, source_y = (destination, destination, source_x)
2293
+ instruction = NeonArithmeticInstruction(
2294
+ "VPMIN.U8",
2295
+ Operand(destination),
2296
+ Operand(source_x),
2297
+ Operand(source_y),
2298
+ origin=origin,
2299
+ )
2300
+ if nervapy.stream.active_stream is not None:
2301
+ nervapy.stream.active_stream.add_instruction(instruction)
2302
+ return instruction
2303
+
2304
+ @staticmethod
2305
+ def U16(destination, source_x, source_y=None):
2306
+ origin = (
2307
+ inspect.stack()
2308
+ if nervapy.arm.function.active_function.collect_origin
2309
+ else None
2310
+ )
2311
+ if source_y is None:
2312
+ destination, source_x, source_y = (destination, destination, source_x)
2313
+ instruction = NeonArithmeticInstruction(
2314
+ "VPMIN.U16",
2315
+ Operand(destination),
2316
+ Operand(source_x),
2317
+ Operand(source_y),
2318
+ origin=origin,
2319
+ )
2320
+ if nervapy.stream.active_stream is not None:
2321
+ nervapy.stream.active_stream.add_instruction(instruction)
2322
+ return instruction
2323
+
2324
+ @staticmethod
2325
+ def U32(destination, source_x, source_y=None):
2326
+ origin = (
2327
+ inspect.stack()
2328
+ if nervapy.arm.function.active_function.collect_origin
2329
+ else None
2330
+ )
2331
+ if source_y is None:
2332
+ destination, source_x, source_y = (destination, destination, source_x)
2333
+ instruction = NeonArithmeticInstruction(
2334
+ "VPMIN.U32",
2335
+ Operand(destination),
2336
+ Operand(source_x),
2337
+ Operand(source_y),
2338
+ origin=origin,
2339
+ )
2340
+ if nervapy.stream.active_stream is not None:
2341
+ nervapy.stream.active_stream.add_instruction(instruction)
2342
+ return instruction
2343
+
2344
+ @staticmethod
2345
+ def F32(destination, source_x, source_y=None):
2346
+ origin = (
2347
+ inspect.stack()
2348
+ if nervapy.arm.function.active_function.collect_origin
2349
+ else None
2350
+ )
2351
+ if source_y is None:
2352
+ destination, source_x, source_y = (destination, destination, source_x)
2353
+ instruction = NeonArithmeticInstruction(
2354
+ "VPMIN.F32",
2355
+ Operand(destination),
2356
+ Operand(source_x),
2357
+ Operand(source_y),
2358
+ origin=origin,
2359
+ )
2360
+ if nervapy.stream.active_stream is not None:
2361
+ nervapy.stream.active_stream.add_instruction(instruction)
2362
+ return instruction
2363
+
2364
+
2365
+ class VPMAX:
2366
+ @staticmethod
2367
+ def S8(destination, source_x, source_y=None):
2368
+ origin = (
2369
+ inspect.stack()
2370
+ if nervapy.arm.function.active_function.collect_origin
2371
+ else None
2372
+ )
2373
+ if source_y is None:
2374
+ destination, source_x, source_y = (destination, destination, source_x)
2375
+ instruction = NeonArithmeticInstruction(
2376
+ "VPMAX.S8",
2377
+ Operand(destination),
2378
+ Operand(source_x),
2379
+ Operand(source_y),
2380
+ origin=origin,
2381
+ )
2382
+ if nervapy.stream.active_stream is not None:
2383
+ nervapy.stream.active_stream.add_instruction(instruction)
2384
+ return instruction
2385
+
2386
+ @staticmethod
2387
+ def S16(destination, source_x, source_y=None):
2388
+ origin = (
2389
+ inspect.stack()
2390
+ if nervapy.arm.function.active_function.collect_origin
2391
+ else None
2392
+ )
2393
+ if source_y is None:
2394
+ destination, source_x, source_y = (destination, destination, source_x)
2395
+ instruction = NeonArithmeticInstruction(
2396
+ "VPMAX.S16",
2397
+ Operand(destination),
2398
+ Operand(source_x),
2399
+ Operand(source_y),
2400
+ origin=origin,
2401
+ )
2402
+ if nervapy.stream.active_stream is not None:
2403
+ nervapy.stream.active_stream.add_instruction(instruction)
2404
+ return instruction
2405
+
2406
+ @staticmethod
2407
+ def S32(destination, source_x, source_y=None):
2408
+ origin = (
2409
+ inspect.stack()
2410
+ if nervapy.arm.function.active_function.collect_origin
2411
+ else None
2412
+ )
2413
+ if source_y is None:
2414
+ destination, source_x, source_y = (destination, destination, source_x)
2415
+ instruction = NeonArithmeticInstruction(
2416
+ "VPMAX.S32",
2417
+ Operand(destination),
2418
+ Operand(source_x),
2419
+ Operand(source_y),
2420
+ origin=origin,
2421
+ )
2422
+ if nervapy.stream.active_stream is not None:
2423
+ nervapy.stream.active_stream.add_instruction(instruction)
2424
+ return instruction
2425
+
2426
+ @staticmethod
2427
+ def U8(destination, source_x, source_y=None):
2428
+ origin = (
2429
+ inspect.stack()
2430
+ if nervapy.arm.function.active_function.collect_origin
2431
+ else None
2432
+ )
2433
+ if source_y is None:
2434
+ destination, source_x, source_y = (destination, destination, source_x)
2435
+ instruction = NeonArithmeticInstruction(
2436
+ "VPMAX.U8",
2437
+ Operand(destination),
2438
+ Operand(source_x),
2439
+ Operand(source_y),
2440
+ origin=origin,
2441
+ )
2442
+ if nervapy.stream.active_stream is not None:
2443
+ nervapy.stream.active_stream.add_instruction(instruction)
2444
+ return instruction
2445
+
2446
+ @staticmethod
2447
+ def U16(destination, source_x, source_y=None):
2448
+ origin = (
2449
+ inspect.stack()
2450
+ if nervapy.arm.function.active_function.collect_origin
2451
+ else None
2452
+ )
2453
+ if source_y is None:
2454
+ destination, source_x, source_y = (destination, destination, source_x)
2455
+ instruction = NeonArithmeticInstruction(
2456
+ "VPMAX.U16",
2457
+ Operand(destination),
2458
+ Operand(source_x),
2459
+ Operand(source_y),
2460
+ origin=origin,
2461
+ )
2462
+ if nervapy.stream.active_stream is not None:
2463
+ nervapy.stream.active_stream.add_instruction(instruction)
2464
+ return instruction
2465
+
2466
+ @staticmethod
2467
+ def U32(destination, source_x, source_y=None):
2468
+ origin = (
2469
+ inspect.stack()
2470
+ if nervapy.arm.function.active_function.collect_origin
2471
+ else None
2472
+ )
2473
+ if source_y is None:
2474
+ destination, source_x, source_y = (destination, destination, source_x)
2475
+ instruction = NeonArithmeticInstruction(
2476
+ "VPMAX.U32",
2477
+ Operand(destination),
2478
+ Operand(source_x),
2479
+ Operand(source_y),
2480
+ origin=origin,
2481
+ )
2482
+ if nervapy.stream.active_stream is not None:
2483
+ nervapy.stream.active_stream.add_instruction(instruction)
2484
+ return instruction
2485
+
2486
+ @staticmethod
2487
+ def F32(destination, source_x, source_y=None):
2488
+ origin = (
2489
+ inspect.stack()
2490
+ if nervapy.arm.function.active_function.collect_origin
2491
+ else None
2492
+ )
2493
+ if source_y is None:
2494
+ destination, source_x, source_y = (destination, destination, source_x)
2495
+ instruction = NeonArithmeticInstruction(
2496
+ "VPMAX.F32",
2497
+ Operand(destination),
2498
+ Operand(source_x),
2499
+ Operand(source_y),
2500
+ origin=origin,
2501
+ )
2502
+ if nervapy.stream.active_stream is not None:
2503
+ nervapy.stream.active_stream.add_instruction(instruction)
2504
+ return instruction
2505
+
2506
+
2507
+ class VQADD:
2508
+ @staticmethod
2509
+ def S8(destination, source_x, source_y=None):
2510
+ origin = (
2511
+ inspect.stack()
2512
+ if nervapy.arm.function.active_function.collect_origin
2513
+ else None
2514
+ )
2515
+ if source_y is None:
2516
+ destination, source_x, source_y = (destination, destination, source_x)
2517
+ instruction = NeonArithmeticInstruction(
2518
+ "VQADD.S8",
2519
+ Operand(destination),
2520
+ Operand(source_x),
2521
+ Operand(source_y),
2522
+ origin=origin,
2523
+ )
2524
+ if nervapy.stream.active_stream is not None:
2525
+ nervapy.stream.active_stream.add_instruction(instruction)
2526
+ return instruction
2527
+
2528
+ @staticmethod
2529
+ def S16(destination, source_x, source_y=None):
2530
+ origin = (
2531
+ inspect.stack()
2532
+ if nervapy.arm.function.active_function.collect_origin
2533
+ else None
2534
+ )
2535
+ if source_y is None:
2536
+ destination, source_x, source_y = (destination, destination, source_x)
2537
+ instruction = NeonArithmeticInstruction(
2538
+ "VQADD.S16",
2539
+ Operand(destination),
2540
+ Operand(source_x),
2541
+ Operand(source_y),
2542
+ origin=origin,
2543
+ )
2544
+ if nervapy.stream.active_stream is not None:
2545
+ nervapy.stream.active_stream.add_instruction(instruction)
2546
+ return instruction
2547
+
2548
+ @staticmethod
2549
+ def S32(destination, source_x, source_y=None):
2550
+ origin = (
2551
+ inspect.stack()
2552
+ if nervapy.arm.function.active_function.collect_origin
2553
+ else None
2554
+ )
2555
+ if source_y is None:
2556
+ destination, source_x, source_y = (destination, destination, source_x)
2557
+ instruction = NeonArithmeticInstruction(
2558
+ "VQADD.S32",
2559
+ Operand(destination),
2560
+ Operand(source_x),
2561
+ Operand(source_y),
2562
+ origin=origin,
2563
+ )
2564
+ if nervapy.stream.active_stream is not None:
2565
+ nervapy.stream.active_stream.add_instruction(instruction)
2566
+ return instruction
2567
+
2568
+ @staticmethod
2569
+ def S64(destination, source_x, source_y=None):
2570
+ origin = (
2571
+ inspect.stack()
2572
+ if nervapy.arm.function.active_function.collect_origin
2573
+ else None
2574
+ )
2575
+ if source_y is None:
2576
+ destination, source_x, source_y = (destination, destination, source_x)
2577
+ instruction = NeonArithmeticInstruction(
2578
+ "VQADD.S64",
2579
+ Operand(destination),
2580
+ Operand(source_x),
2581
+ Operand(source_y),
2582
+ origin=origin,
2583
+ )
2584
+ if nervapy.stream.active_stream is not None:
2585
+ nervapy.stream.active_stream.add_instruction(instruction)
2586
+ return instruction
2587
+
2588
+ @staticmethod
2589
+ def U8(destination, source_x, source_y=None):
2590
+ origin = (
2591
+ inspect.stack()
2592
+ if nervapy.arm.function.active_function.collect_origin
2593
+ else None
2594
+ )
2595
+ if source_y is None:
2596
+ destination, source_x, source_y = (destination, destination, source_x)
2597
+ instruction = NeonArithmeticInstruction(
2598
+ "VQADD.U8",
2599
+ Operand(destination),
2600
+ Operand(source_x),
2601
+ Operand(source_y),
2602
+ origin=origin,
2603
+ )
2604
+ if nervapy.stream.active_stream is not None:
2605
+ nervapy.stream.active_stream.add_instruction(instruction)
2606
+ return instruction
2607
+
2608
+ @staticmethod
2609
+ def U16(destination, source_x, source_y=None):
2610
+ origin = (
2611
+ inspect.stack()
2612
+ if nervapy.arm.function.active_function.collect_origin
2613
+ else None
2614
+ )
2615
+ if source_y is None:
2616
+ destination, source_x, source_y = (destination, destination, source_x)
2617
+ instruction = NeonArithmeticInstruction(
2618
+ "VQADD.U16",
2619
+ Operand(destination),
2620
+ Operand(source_x),
2621
+ Operand(source_y),
2622
+ origin=origin,
2623
+ )
2624
+ if nervapy.stream.active_stream is not None:
2625
+ nervapy.stream.active_stream.add_instruction(instruction)
2626
+ return instruction
2627
+
2628
+ @staticmethod
2629
+ def U32(destination, source_x, source_y=None):
2630
+ origin = (
2631
+ inspect.stack()
2632
+ if nervapy.arm.function.active_function.collect_origin
2633
+ else None
2634
+ )
2635
+ if source_y is None:
2636
+ destination, source_x, source_y = (destination, destination, source_x)
2637
+ instruction = NeonArithmeticInstruction(
2638
+ "VQADD.U32",
2639
+ Operand(destination),
2640
+ Operand(source_x),
2641
+ Operand(source_y),
2642
+ origin=origin,
2643
+ )
2644
+ if nervapy.stream.active_stream is not None:
2645
+ nervapy.stream.active_stream.add_instruction(instruction)
2646
+ return instruction
2647
+
2648
+ @staticmethod
2649
+ def U64(destination, source_x, source_y=None):
2650
+ origin = (
2651
+ inspect.stack()
2652
+ if nervapy.arm.function.active_function.collect_origin
2653
+ else None
2654
+ )
2655
+ if source_y is None:
2656
+ destination, source_x, source_y = (destination, destination, source_x)
2657
+ instruction = NeonArithmeticInstruction(
2658
+ "VQADD.U64",
2659
+ Operand(destination),
2660
+ Operand(source_x),
2661
+ Operand(source_y),
2662
+ origin=origin,
2663
+ )
2664
+ if nervapy.stream.active_stream is not None:
2665
+ nervapy.stream.active_stream.add_instruction(instruction)
2666
+ return instruction
2667
+
2668
+
2669
+ class VQSUB:
2670
+ @staticmethod
2671
+ def S8(destination, source_x, source_y=None):
2672
+ origin = (
2673
+ inspect.stack()
2674
+ if nervapy.arm.function.active_function.collect_origin
2675
+ else None
2676
+ )
2677
+ if source_y is None:
2678
+ destination, source_x, source_y = (destination, destination, source_x)
2679
+ instruction = NeonArithmeticInstruction(
2680
+ "VQSUB.S8",
2681
+ Operand(destination),
2682
+ Operand(source_x),
2683
+ Operand(source_y),
2684
+ origin=origin,
2685
+ )
2686
+ if nervapy.stream.active_stream is not None:
2687
+ nervapy.stream.active_stream.add_instruction(instruction)
2688
+ return instruction
2689
+
2690
+ @staticmethod
2691
+ def S16(destination, source_x, source_y=None):
2692
+ origin = (
2693
+ inspect.stack()
2694
+ if nervapy.arm.function.active_function.collect_origin
2695
+ else None
2696
+ )
2697
+ if source_y is None:
2698
+ destination, source_x, source_y = (destination, destination, source_x)
2699
+ instruction = NeonArithmeticInstruction(
2700
+ "VQSUB.S16",
2701
+ Operand(destination),
2702
+ Operand(source_x),
2703
+ Operand(source_y),
2704
+ origin=origin,
2705
+ )
2706
+ if nervapy.stream.active_stream is not None:
2707
+ nervapy.stream.active_stream.add_instruction(instruction)
2708
+ return instruction
2709
+
2710
+ @staticmethod
2711
+ def S32(destination, source_x, source_y=None):
2712
+ origin = (
2713
+ inspect.stack()
2714
+ if nervapy.arm.function.active_function.collect_origin
2715
+ else None
2716
+ )
2717
+ if source_y is None:
2718
+ destination, source_x, source_y = (destination, destination, source_x)
2719
+ instruction = NeonArithmeticInstruction(
2720
+ "VQSUB.S32",
2721
+ Operand(destination),
2722
+ Operand(source_x),
2723
+ Operand(source_y),
2724
+ origin=origin,
2725
+ )
2726
+ if nervapy.stream.active_stream is not None:
2727
+ nervapy.stream.active_stream.add_instruction(instruction)
2728
+ return instruction
2729
+
2730
+ @staticmethod
2731
+ def S64(destination, source_x, source_y=None):
2732
+ origin = (
2733
+ inspect.stack()
2734
+ if nervapy.arm.function.active_function.collect_origin
2735
+ else None
2736
+ )
2737
+ if source_y is None:
2738
+ destination, source_x, source_y = (destination, destination, source_x)
2739
+ instruction = NeonArithmeticInstruction(
2740
+ "VQSUB.S64",
2741
+ Operand(destination),
2742
+ Operand(source_x),
2743
+ Operand(source_y),
2744
+ origin=origin,
2745
+ )
2746
+ if nervapy.stream.active_stream is not None:
2747
+ nervapy.stream.active_stream.add_instruction(instruction)
2748
+ return instruction
2749
+
2750
+ @staticmethod
2751
+ def U8(destination, source_x, source_y=None):
2752
+ origin = (
2753
+ inspect.stack()
2754
+ if nervapy.arm.function.active_function.collect_origin
2755
+ else None
2756
+ )
2757
+ if source_y is None:
2758
+ destination, source_x, source_y = (destination, destination, source_x)
2759
+ instruction = NeonArithmeticInstruction(
2760
+ "VQSUB.U8",
2761
+ Operand(destination),
2762
+ Operand(source_x),
2763
+ Operand(source_y),
2764
+ origin=origin,
2765
+ )
2766
+ if nervapy.stream.active_stream is not None:
2767
+ nervapy.stream.active_stream.add_instruction(instruction)
2768
+ return instruction
2769
+
2770
+ @staticmethod
2771
+ def U16(destination, source_x, source_y=None):
2772
+ origin = (
2773
+ inspect.stack()
2774
+ if nervapy.arm.function.active_function.collect_origin
2775
+ else None
2776
+ )
2777
+ if source_y is None:
2778
+ destination, source_x, source_y = (destination, destination, source_x)
2779
+ instruction = NeonArithmeticInstruction(
2780
+ "VQSUB.U16",
2781
+ Operand(destination),
2782
+ Operand(source_x),
2783
+ Operand(source_y),
2784
+ origin=origin,
2785
+ )
2786
+ if nervapy.stream.active_stream is not None:
2787
+ nervapy.stream.active_stream.add_instruction(instruction)
2788
+ return instruction
2789
+
2790
+ @staticmethod
2791
+ def U32(destination, source_x, source_y=None):
2792
+ origin = (
2793
+ inspect.stack()
2794
+ if nervapy.arm.function.active_function.collect_origin
2795
+ else None
2796
+ )
2797
+ if source_y is None:
2798
+ destination, source_x, source_y = (destination, destination, source_x)
2799
+ instruction = NeonArithmeticInstruction(
2800
+ "VQSUB.U32",
2801
+ Operand(destination),
2802
+ Operand(source_x),
2803
+ Operand(source_y),
2804
+ origin=origin,
2805
+ )
2806
+ if nervapy.stream.active_stream is not None:
2807
+ nervapy.stream.active_stream.add_instruction(instruction)
2808
+ return instruction
2809
+
2810
+ @staticmethod
2811
+ def U64(destination, source_x, source_y=None):
2812
+ origin = (
2813
+ inspect.stack()
2814
+ if nervapy.arm.function.active_function.collect_origin
2815
+ else None
2816
+ )
2817
+ if source_y is None:
2818
+ destination, source_x, source_y = (destination, destination, source_x)
2819
+ instruction = NeonArithmeticInstruction(
2820
+ "VQSUB.U64",
2821
+ Operand(destination),
2822
+ Operand(source_x),
2823
+ Operand(source_y),
2824
+ origin=origin,
2825
+ )
2826
+ if nervapy.stream.active_stream is not None:
2827
+ nervapy.stream.active_stream.add_instruction(instruction)
2828
+ return instruction
2829
+
2830
+
2831
+ class VHADD:
2832
+ @staticmethod
2833
+ def S8(destination, source_x, source_y=None):
2834
+ origin = (
2835
+ inspect.stack()
2836
+ if nervapy.arm.function.active_function.collect_origin
2837
+ else None
2838
+ )
2839
+ if source_y is None:
2840
+ destination, source_x, source_y = (destination, destination, source_x)
2841
+ instruction = NeonArithmeticInstruction(
2842
+ "VHADD.S8",
2843
+ Operand(destination),
2844
+ Operand(source_x),
2845
+ Operand(source_y),
2846
+ origin=origin,
2847
+ )
2848
+ if nervapy.stream.active_stream is not None:
2849
+ nervapy.stream.active_stream.add_instruction(instruction)
2850
+ return instruction
2851
+
2852
+ @staticmethod
2853
+ def S16(destination, source_x, source_y=None):
2854
+ origin = (
2855
+ inspect.stack()
2856
+ if nervapy.arm.function.active_function.collect_origin
2857
+ else None
2858
+ )
2859
+ if source_y is None:
2860
+ destination, source_x, source_y = (destination, destination, source_x)
2861
+ instruction = NeonArithmeticInstruction(
2862
+ "VHADD.S16",
2863
+ Operand(destination),
2864
+ Operand(source_x),
2865
+ Operand(source_y),
2866
+ origin=origin,
2867
+ )
2868
+ if nervapy.stream.active_stream is not None:
2869
+ nervapy.stream.active_stream.add_instruction(instruction)
2870
+ return instruction
2871
+
2872
+ @staticmethod
2873
+ def S32(destination, source_x, source_y=None):
2874
+ origin = (
2875
+ inspect.stack()
2876
+ if nervapy.arm.function.active_function.collect_origin
2877
+ else None
2878
+ )
2879
+ if source_y is None:
2880
+ destination, source_x, source_y = (destination, destination, source_x)
2881
+ instruction = NeonArithmeticInstruction(
2882
+ "VHADD.S32",
2883
+ Operand(destination),
2884
+ Operand(source_x),
2885
+ Operand(source_y),
2886
+ origin=origin,
2887
+ )
2888
+ if nervapy.stream.active_stream is not None:
2889
+ nervapy.stream.active_stream.add_instruction(instruction)
2890
+ return instruction
2891
+
2892
+ @staticmethod
2893
+ def U8(destination, source_x, source_y=None):
2894
+ origin = (
2895
+ inspect.stack()
2896
+ if nervapy.arm.function.active_function.collect_origin
2897
+ else None
2898
+ )
2899
+ if source_y is None:
2900
+ destination, source_x, source_y = (destination, destination, source_x)
2901
+ instruction = NeonArithmeticInstruction(
2902
+ "VHADD.U8",
2903
+ Operand(destination),
2904
+ Operand(source_x),
2905
+ Operand(source_y),
2906
+ origin=origin,
2907
+ )
2908
+ if nervapy.stream.active_stream is not None:
2909
+ nervapy.stream.active_stream.add_instruction(instruction)
2910
+ return instruction
2911
+
2912
+ @staticmethod
2913
+ def U16(destination, source_x, source_y=None):
2914
+ origin = (
2915
+ inspect.stack()
2916
+ if nervapy.arm.function.active_function.collect_origin
2917
+ else None
2918
+ )
2919
+ if source_y is None:
2920
+ destination, source_x, source_y = (destination, destination, source_x)
2921
+ instruction = NeonArithmeticInstruction(
2922
+ "VHADD.U16",
2923
+ Operand(destination),
2924
+ Operand(source_x),
2925
+ Operand(source_y),
2926
+ origin=origin,
2927
+ )
2928
+ if nervapy.stream.active_stream is not None:
2929
+ nervapy.stream.active_stream.add_instruction(instruction)
2930
+ return instruction
2931
+
2932
+ @staticmethod
2933
+ def U32(destination, source_x, source_y=None):
2934
+ origin = (
2935
+ inspect.stack()
2936
+ if nervapy.arm.function.active_function.collect_origin
2937
+ else None
2938
+ )
2939
+ if source_y is None:
2940
+ destination, source_x, source_y = (destination, destination, source_x)
2941
+ instruction = NeonArithmeticInstruction(
2942
+ "VHADD.U32",
2943
+ Operand(destination),
2944
+ Operand(source_x),
2945
+ Operand(source_y),
2946
+ origin=origin,
2947
+ )
2948
+ if nervapy.stream.active_stream is not None:
2949
+ nervapy.stream.active_stream.add_instruction(instruction)
2950
+ return instruction
2951
+
2952
+
2953
+ class VHSUB:
2954
+ @staticmethod
2955
+ def S8(destination, source_x, source_y=None):
2956
+ origin = (
2957
+ inspect.stack()
2958
+ if nervapy.arm.function.active_function.collect_origin
2959
+ else None
2960
+ )
2961
+ if source_y is None:
2962
+ destination, source_x, source_y = (destination, destination, source_x)
2963
+ instruction = NeonArithmeticInstruction(
2964
+ "VHSUB.S8",
2965
+ Operand(destination),
2966
+ Operand(source_x),
2967
+ Operand(source_y),
2968
+ origin=origin,
2969
+ )
2970
+ if nervapy.stream.active_stream is not None:
2971
+ nervapy.stream.active_stream.add_instruction(instruction)
2972
+ return instruction
2973
+
2974
+ @staticmethod
2975
+ def S16(destination, source_x, source_y=None):
2976
+ origin = (
2977
+ inspect.stack()
2978
+ if nervapy.arm.function.active_function.collect_origin
2979
+ else None
2980
+ )
2981
+ if source_y is None:
2982
+ destination, source_x, source_y = (destination, destination, source_x)
2983
+ instruction = NeonArithmeticInstruction(
2984
+ "VHSUB.S16",
2985
+ Operand(destination),
2986
+ Operand(source_x),
2987
+ Operand(source_y),
2988
+ origin=origin,
2989
+ )
2990
+ if nervapy.stream.active_stream is not None:
2991
+ nervapy.stream.active_stream.add_instruction(instruction)
2992
+ return instruction
2993
+
2994
+ @staticmethod
2995
+ def S32(destination, source_x, source_y=None):
2996
+ origin = (
2997
+ inspect.stack()
2998
+ if nervapy.arm.function.active_function.collect_origin
2999
+ else None
3000
+ )
3001
+ if source_y is None:
3002
+ destination, source_x, source_y = (destination, destination, source_x)
3003
+ instruction = NeonArithmeticInstruction(
3004
+ "VHSUB.S32",
3005
+ Operand(destination),
3006
+ Operand(source_x),
3007
+ Operand(source_y),
3008
+ origin=origin,
3009
+ )
3010
+ if nervapy.stream.active_stream is not None:
3011
+ nervapy.stream.active_stream.add_instruction(instruction)
3012
+ return instruction
3013
+
3014
+ @staticmethod
3015
+ def U8(destination, source_x, source_y=None):
3016
+ origin = (
3017
+ inspect.stack()
3018
+ if nervapy.arm.function.active_function.collect_origin
3019
+ else None
3020
+ )
3021
+ if source_y is None:
3022
+ destination, source_x, source_y = (destination, destination, source_x)
3023
+ instruction = NeonArithmeticInstruction(
3024
+ "VHSUB.U8",
3025
+ Operand(destination),
3026
+ Operand(source_x),
3027
+ Operand(source_y),
3028
+ origin=origin,
3029
+ )
3030
+ if nervapy.stream.active_stream is not None:
3031
+ nervapy.stream.active_stream.add_instruction(instruction)
3032
+ return instruction
3033
+
3034
+ @staticmethod
3035
+ def U16(destination, source_x, source_y=None):
3036
+ origin = (
3037
+ inspect.stack()
3038
+ if nervapy.arm.function.active_function.collect_origin
3039
+ else None
3040
+ )
3041
+ if source_y is None:
3042
+ destination, source_x, source_y = (destination, destination, source_x)
3043
+ instruction = NeonArithmeticInstruction(
3044
+ "VHSUB.U16",
3045
+ Operand(destination),
3046
+ Operand(source_x),
3047
+ Operand(source_y),
3048
+ origin=origin,
3049
+ )
3050
+ if nervapy.stream.active_stream is not None:
3051
+ nervapy.stream.active_stream.add_instruction(instruction)
3052
+ return instruction
3053
+
3054
+ @staticmethod
3055
+ def U32(destination, source_x, source_y=None):
3056
+ origin = (
3057
+ inspect.stack()
3058
+ if nervapy.arm.function.active_function.collect_origin
3059
+ else None
3060
+ )
3061
+ if source_y is None:
3062
+ destination, source_x, source_y = (destination, destination, source_x)
3063
+ instruction = NeonArithmeticInstruction(
3064
+ "VHSUB.U32",
3065
+ Operand(destination),
3066
+ Operand(source_x),
3067
+ Operand(source_y),
3068
+ origin=origin,
3069
+ )
3070
+ if nervapy.stream.active_stream is not None:
3071
+ nervapy.stream.active_stream.add_instruction(instruction)
3072
+ return instruction
3073
+
3074
+
3075
+ class VRHADD:
3076
+ @staticmethod
3077
+ def S8(destination, source_x, source_y=None):
3078
+ origin = (
3079
+ inspect.stack()
3080
+ if nervapy.arm.function.active_function.collect_origin
3081
+ else None
3082
+ )
3083
+ if source_y is None:
3084
+ destination, source_x, source_y = (destination, destination, source_x)
3085
+ instruction = NeonArithmeticInstruction(
3086
+ "VRHADD.S8",
3087
+ Operand(destination),
3088
+ Operand(source_x),
3089
+ Operand(source_y),
3090
+ origin=origin,
3091
+ )
3092
+ if nervapy.stream.active_stream is not None:
3093
+ nervapy.stream.active_stream.add_instruction(instruction)
3094
+ return instruction
3095
+
3096
+ @staticmethod
3097
+ def S16(destination, source_x, source_y=None):
3098
+ origin = (
3099
+ inspect.stack()
3100
+ if nervapy.arm.function.active_function.collect_origin
3101
+ else None
3102
+ )
3103
+ if source_y is None:
3104
+ destination, source_x, source_y = (destination, destination, source_x)
3105
+ instruction = NeonArithmeticInstruction(
3106
+ "VRHADD.S16",
3107
+ Operand(destination),
3108
+ Operand(source_x),
3109
+ Operand(source_y),
3110
+ origin=origin,
3111
+ )
3112
+ if nervapy.stream.active_stream is not None:
3113
+ nervapy.stream.active_stream.add_instruction(instruction)
3114
+ return instruction
3115
+
3116
+ @staticmethod
3117
+ def S32(destination, source_x, source_y=None):
3118
+ origin = (
3119
+ inspect.stack()
3120
+ if nervapy.arm.function.active_function.collect_origin
3121
+ else None
3122
+ )
3123
+ if source_y is None:
3124
+ destination, source_x, source_y = (destination, destination, source_x)
3125
+ instruction = NeonArithmeticInstruction(
3126
+ "VRHADD.S32",
3127
+ Operand(destination),
3128
+ Operand(source_x),
3129
+ Operand(source_y),
3130
+ origin=origin,
3131
+ )
3132
+ if nervapy.stream.active_stream is not None:
3133
+ nervapy.stream.active_stream.add_instruction(instruction)
3134
+ return instruction
3135
+
3136
+ @staticmethod
3137
+ def U8(destination, source_x, source_y=None):
3138
+ origin = (
3139
+ inspect.stack()
3140
+ if nervapy.arm.function.active_function.collect_origin
3141
+ else None
3142
+ )
3143
+ if source_y is None:
3144
+ destination, source_x, source_y = (destination, destination, source_x)
3145
+ instruction = NeonArithmeticInstruction(
3146
+ "VRHADD.U8",
3147
+ Operand(destination),
3148
+ Operand(source_x),
3149
+ Operand(source_y),
3150
+ origin=origin,
3151
+ )
3152
+ if nervapy.stream.active_stream is not None:
3153
+ nervapy.stream.active_stream.add_instruction(instruction)
3154
+ return instruction
3155
+
3156
+ @staticmethod
3157
+ def U16(destination, source_x, source_y=None):
3158
+ origin = (
3159
+ inspect.stack()
3160
+ if nervapy.arm.function.active_function.collect_origin
3161
+ else None
3162
+ )
3163
+ if source_y is None:
3164
+ destination, source_x, source_y = (destination, destination, source_x)
3165
+ instruction = NeonArithmeticInstruction(
3166
+ "VRHADD.U16",
3167
+ Operand(destination),
3168
+ Operand(source_x),
3169
+ Operand(source_y),
3170
+ origin=origin,
3171
+ )
3172
+ if nervapy.stream.active_stream is not None:
3173
+ nervapy.stream.active_stream.add_instruction(instruction)
3174
+ return instruction
3175
+
3176
+ @staticmethod
3177
+ def U32(destination, source_x, source_y=None):
3178
+ origin = (
3179
+ inspect.stack()
3180
+ if nervapy.arm.function.active_function.collect_origin
3181
+ else None
3182
+ )
3183
+ if source_y is None:
3184
+ destination, source_x, source_y = (destination, destination, source_x)
3185
+ instruction = NeonArithmeticInstruction(
3186
+ "VRHADD.U32",
3187
+ Operand(destination),
3188
+ Operand(source_x),
3189
+ Operand(source_y),
3190
+ origin=origin,
3191
+ )
3192
+ if nervapy.stream.active_stream is not None:
3193
+ nervapy.stream.active_stream.add_instruction(instruction)
3194
+ return instruction
3195
+
3196
+
3197
+ class VRECPS:
3198
+ @staticmethod
3199
+ def F32(destination, source_x, source_y=None):
3200
+ origin = (
3201
+ inspect.stack()
3202
+ if nervapy.arm.function.active_function.collect_origin
3203
+ else None
3204
+ )
3205
+ if source_y is None:
3206
+ destination, source_x, source_y = (destination, destination, source_x)
3207
+ instruction = NeonArithmeticInstruction(
3208
+ "VRECPS.F32",
3209
+ Operand(destination),
3210
+ Operand(source_x),
3211
+ Operand(source_y),
3212
+ origin=origin,
3213
+ )
3214
+ if nervapy.stream.active_stream is not None:
3215
+ nervapy.stream.active_stream.add_instruction(instruction)
3216
+ return instruction
3217
+
3218
+
3219
+ class VRSQRTS:
3220
+ @staticmethod
3221
+ def F32(destination, source_x, source_y=None):
3222
+ origin = (
3223
+ inspect.stack()
3224
+ if nervapy.arm.function.active_function.collect_origin
3225
+ else None
3226
+ )
3227
+ if source_y is None:
3228
+ destination, source_x, source_y = (destination, destination, source_x)
3229
+ instruction = NeonArithmeticInstruction(
3230
+ "VRSQRTS.F32",
3231
+ Operand(destination),
3232
+ Operand(source_x),
3233
+ Operand(source_y),
3234
+ origin=origin,
3235
+ )
3236
+ if nervapy.stream.active_stream is not None:
3237
+ nervapy.stream.active_stream.add_instruction(instruction)
3238
+ return instruction
3239
+
3240
+
3241
+ class VTST:
3242
+ @staticmethod
3243
+ def I8(destination, source_x, source_y):
3244
+ origin = (
3245
+ inspect.stack()
3246
+ if nervapy.arm.function.active_function.collect_origin
3247
+ else None
3248
+ )
3249
+ instruction = NeonArithmeticInstruction(
3250
+ "VTST.8",
3251
+ Operand(destination),
3252
+ Operand(source_x),
3253
+ Operand(source_y),
3254
+ origin=origin,
3255
+ )
3256
+ if nervapy.stream.active_stream is not None:
3257
+ nervapy.stream.active_stream.add_instruction(instruction)
3258
+ return instruction
3259
+
3260
+ @staticmethod
3261
+ def I16(destination, source_x, source_y):
3262
+ origin = (
3263
+ inspect.stack()
3264
+ if nervapy.arm.function.active_function.collect_origin
3265
+ else None
3266
+ )
3267
+ instruction = NeonArithmeticInstruction(
3268
+ "VTST.16",
3269
+ Operand(destination),
3270
+ Operand(source_x),
3271
+ Operand(source_y),
3272
+ origin=origin,
3273
+ )
3274
+ if nervapy.stream.active_stream is not None:
3275
+ nervapy.stream.active_stream.add_instruction(instruction)
3276
+ return instruction
3277
+
3278
+ @staticmethod
3279
+ def I32(destination, source_x, source_y):
3280
+ origin = (
3281
+ inspect.stack()
3282
+ if nervapy.arm.function.active_function.collect_origin
3283
+ else None
3284
+ )
3285
+ instruction = NeonArithmeticInstruction(
3286
+ "VTST.32",
3287
+ Operand(destination),
3288
+ Operand(source_x),
3289
+ Operand(source_y),
3290
+ origin=origin,
3291
+ )
3292
+ if nervapy.stream.active_stream is not None:
3293
+ nervapy.stream.active_stream.add_instruction(instruction)
3294
+ return instruction
3295
+
3296
+
3297
+ class VNMUL:
3298
+ @staticmethod
3299
+ def F32(destination, source_x, source_y=None):
3300
+ origin = (
3301
+ inspect.stack()
3302
+ if nervapy.arm.function.active_function.collect_origin
3303
+ else None
3304
+ )
3305
+ if source_y is None:
3306
+ destination, source_x, source_y = (destination, destination, source_x)
3307
+ instruction = VFPSinglePrecisionMultiplyAddInstruction(
3308
+ "VNMUL.F32",
3309
+ Operand(destination),
3310
+ Operand(source_x),
3311
+ Operand(source_y),
3312
+ origin=origin,
3313
+ )
3314
+ if nervapy.stream.active_stream is not None:
3315
+ nervapy.stream.active_stream.add_instruction(instruction)
3316
+ return instruction
3317
+
3318
+ @staticmethod
3319
+ def F64(destination, source_x, source_y=None):
3320
+ origin = (
3321
+ inspect.stack()
3322
+ if nervapy.arm.function.active_function.collect_origin
3323
+ else None
3324
+ )
3325
+ if source_y is None:
3326
+ destination, source_x, source_y = (destination, destination, source_x)
3327
+ instruction = VFPDoublePrecisionBinaryArithmeticInstruction(
3328
+ "VNMUL.F64",
3329
+ Operand(destination),
3330
+ Operand(source_x),
3331
+ Operand(source_y),
3332
+ origin=origin,
3333
+ )
3334
+ if nervapy.stream.active_stream is not None:
3335
+ nervapy.stream.active_stream.add_instruction(instruction)
3336
+ return instruction
3337
+
3338
+
3339
+ class VDIV:
3340
+ @staticmethod
3341
+ def F32(destination, source_x, source_y=None):
3342
+ origin = (
3343
+ inspect.stack()
3344
+ if nervapy.arm.function.active_function.collect_origin
3345
+ else None
3346
+ )
3347
+ if source_y is None:
3348
+ destination, source_x, source_y = (destination, destination, source_x)
3349
+ instruction = VFPSinglePrecisionMultiplyAddInstruction(
3350
+ "VDIV.F32",
3351
+ Operand(destination),
3352
+ Operand(source_x),
3353
+ Operand(source_y),
3354
+ origin=origin,
3355
+ )
3356
+ if nervapy.stream.active_stream is not None:
3357
+ nervapy.stream.active_stream.add_instruction(instruction)
3358
+ return instruction
3359
+
3360
+ @staticmethod
3361
+ def F64(destination, source_x, source_y=None):
3362
+ origin = (
3363
+ inspect.stack()
3364
+ if nervapy.arm.function.active_function.collect_origin
3365
+ else None
3366
+ )
3367
+ if source_y is None:
3368
+ destination, source_x, source_y = (destination, destination, source_x)
3369
+ instruction = VFPDoublePrecisionBinaryArithmeticInstruction(
3370
+ "VDIV.F64",
3371
+ Operand(destination),
3372
+ Operand(source_x),
3373
+ Operand(source_y),
3374
+ origin=origin,
3375
+ )
3376
+ if nervapy.stream.active_stream is not None:
3377
+ nervapy.stream.active_stream.add_instruction(instruction)
3378
+ return instruction
3379
+
3380
+
3381
+ class VSQRT:
3382
+ @staticmethod
3383
+ def F64(destination, source_x, source_y=None):
3384
+ origin = (
3385
+ inspect.stack()
3386
+ if nervapy.arm.function.active_function.collect_origin
3387
+ else None
3388
+ )
3389
+ if source_y is None:
3390
+ destination, source_x, source_y = (destination, destination, source_x)
3391
+ instruction = VFPDoublePrecisionUnaryArithmeticInstruction(
3392
+ "VSQRT.F64",
3393
+ Operand(destination),
3394
+ Operand(source_x),
3395
+ Operand(source_y),
3396
+ origin=origin,
3397
+ )
3398
+ if nervapy.stream.active_stream is not None:
3399
+ nervapy.stream.active_stream.add_instruction(instruction)
3400
+ return instruction
3401
+
3402
+
3403
+ class VABS:
3404
+ @staticmethod
3405
+ def F64(destination, source_x, source_y=None):
3406
+ origin = (
3407
+ inspect.stack()
3408
+ if nervapy.arm.function.active_function.collect_origin
3409
+ else None
3410
+ )
3411
+ if source_y is None:
3412
+ destination, source_x, source_y = (destination, destination, source_x)
3413
+ instruction = VFPDoublePrecisionUnaryArithmeticInstruction(
3414
+ "VABS.F64",
3415
+ Operand(destination),
3416
+ Operand(source_x),
3417
+ Operand(source_y),
3418
+ origin=origin,
3419
+ )
3420
+ if nervapy.stream.active_stream is not None:
3421
+ nervapy.stream.active_stream.add_instruction(instruction)
3422
+ return instruction
3423
+
3424
+
3425
+ class VNEG:
3426
+ @staticmethod
3427
+ def F64(destination, source_x, source_y=None):
3428
+ origin = (
3429
+ inspect.stack()
3430
+ if nervapy.arm.function.active_function.collect_origin
3431
+ else None
3432
+ )
3433
+ if source_y is None:
3434
+ destination, source_x, source_y = (destination, destination, source_x)
3435
+ instruction = VFPDoublePrecisionUnaryArithmeticInstruction(
3436
+ "VNEG.F64",
3437
+ Operand(destination),
3438
+ Operand(source_x),
3439
+ Operand(source_y),
3440
+ origin=origin,
3441
+ )
3442
+ if nervapy.stream.active_stream is not None:
3443
+ nervapy.stream.active_stream.add_instruction(instruction)
3444
+ return instruction
3445
+
3446
+
3447
+ class VMLA:
3448
+ @staticmethod
3449
+ def F32(accumulator, factor_x, factor_y):
3450
+ origin = (
3451
+ inspect.stack()
3452
+ if nervapy.arm.function.active_function.collect_origin
3453
+ else None
3454
+ )
3455
+ instruction = VFPNeonMultiplyAddInstruction(
3456
+ "VMLA.F32",
3457
+ Operand(accumulator),
3458
+ Operand(factor_x),
3459
+ Operand(factor_y),
3460
+ origin=origin,
3461
+ )
3462
+ if nervapy.stream.active_stream is not None:
3463
+ nervapy.stream.active_stream.add_instruction(instruction)
3464
+ return instruction
3465
+
3466
+ @staticmethod
3467
+ def F64(accumulator, factor_x, factor_y):
3468
+ origin = (
3469
+ inspect.stack()
3470
+ if nervapy.arm.function.active_function.collect_origin
3471
+ else None
3472
+ )
3473
+ instruction = VFPDoublePrecisionMultiplyAddInstruction(
3474
+ "VMLA.F64",
3475
+ Operand(accumulator),
3476
+ Operand(factor_x),
3477
+ Operand(factor_y),
3478
+ origin=origin,
3479
+ )
3480
+ if nervapy.stream.active_stream is not None:
3481
+ nervapy.stream.active_stream.add_instruction(instruction)
3482
+ return instruction
3483
+
3484
+
3485
+ class VMLS:
3486
+ @staticmethod
3487
+ def F32(accumulator, factor_x, factor_y):
3488
+ origin = (
3489
+ inspect.stack()
3490
+ if nervapy.arm.function.active_function.collect_origin
3491
+ else None
3492
+ )
3493
+ instruction = VFPNeonMultiplyAddInstruction(
3494
+ "VMLS.F32",
3495
+ Operand(accumulator),
3496
+ Operand(factor_x),
3497
+ Operand(factor_y),
3498
+ origin=origin,
3499
+ )
3500
+ if nervapy.stream.active_stream is not None:
3501
+ nervapy.stream.active_stream.add_instruction(instruction)
3502
+ return instruction
3503
+
3504
+ @staticmethod
3505
+ def F64(accumulator, factor_x, factor_y):
3506
+ origin = (
3507
+ inspect.stack()
3508
+ if nervapy.arm.function.active_function.collect_origin
3509
+ else None
3510
+ )
3511
+ instruction = VFPDoublePrecisionMultiplyAddInstruction(
3512
+ "VMLS.F64",
3513
+ Operand(accumulator),
3514
+ Operand(factor_x),
3515
+ Operand(factor_y),
3516
+ origin=origin,
3517
+ )
3518
+ if nervapy.stream.active_stream is not None:
3519
+ nervapy.stream.active_stream.add_instruction(instruction)
3520
+ return instruction
3521
+
3522
+
3523
+ class VNMLA:
3524
+ @staticmethod
3525
+ def F32(accumulator, factor_x, factor_y):
3526
+ origin = (
3527
+ inspect.stack()
3528
+ if nervapy.arm.function.active_function.collect_origin
3529
+ else None
3530
+ )
3531
+ instruction = VFPSinglePrecisionMultiplyAddInstruction(
3532
+ "VNMLA.F32",
3533
+ Operand(accumulator),
3534
+ Operand(factor_x),
3535
+ Operand(factor_y),
3536
+ origin=origin,
3537
+ )
3538
+ if nervapy.stream.active_stream is not None:
3539
+ nervapy.stream.active_stream.add_instruction(instruction)
3540
+ return instruction
3541
+
3542
+ @staticmethod
3543
+ def F64(accumulator, factor_x, factor_y):
3544
+ origin = (
3545
+ inspect.stack()
3546
+ if nervapy.arm.function.active_function.collect_origin
3547
+ else None
3548
+ )
3549
+ instruction = VFPDoublePrecisionMultiplyAddInstruction(
3550
+ "VNMLA.F64",
3551
+ Operand(accumulator),
3552
+ Operand(factor_x),
3553
+ Operand(factor_y),
3554
+ origin=origin,
3555
+ )
3556
+ if nervapy.stream.active_stream is not None:
3557
+ nervapy.stream.active_stream.add_instruction(instruction)
3558
+ return instruction
3559
+
3560
+
3561
+ class VNMLS:
3562
+ @staticmethod
3563
+ def F32(accumulator, factor_x, factor_y):
3564
+ origin = (
3565
+ inspect.stack()
3566
+ if nervapy.arm.function.active_function.collect_origin
3567
+ else None
3568
+ )
3569
+ instruction = VFPSinglePrecisionMultiplyAddInstruction(
3570
+ "VNMLS.F32",
3571
+ Operand(accumulator),
3572
+ Operand(factor_x),
3573
+ Operand(factor_y),
3574
+ origin=origin,
3575
+ )
3576
+ if nervapy.stream.active_stream is not None:
3577
+ nervapy.stream.active_stream.add_instruction(instruction)
3578
+ return instruction
3579
+
3580
+ @staticmethod
3581
+ def F64(accumulator, factor_x, factor_y):
3582
+ origin = (
3583
+ inspect.stack()
3584
+ if nervapy.arm.function.active_function.collect_origin
3585
+ else None
3586
+ )
3587
+ instruction = VFPDoublePrecisionMultiplyAddInstruction(
3588
+ "VNMLS.F64",
3589
+ Operand(accumulator),
3590
+ Operand(factor_x),
3591
+ Operand(factor_y),
3592
+ origin=origin,
3593
+ )
3594
+ if nervapy.stream.active_stream is not None:
3595
+ nervapy.stream.active_stream.add_instruction(instruction)
3596
+ return instruction
3597
+
3598
+
3599
+ class VFMA:
3600
+ @staticmethod
3601
+ def F32(accumulator, factor_x, factor_y):
3602
+ origin = (
3603
+ inspect.stack()
3604
+ if nervapy.arm.function.active_function.collect_origin
3605
+ else None
3606
+ )
3607
+ instruction = VFPNeonMultiplyAddInstruction(
3608
+ "VFMA.F32",
3609
+ Operand(accumulator),
3610
+ Operand(factor_x),
3611
+ Operand(factor_y),
3612
+ origin=origin,
3613
+ )
3614
+ if nervapy.stream.active_stream is not None:
3615
+ nervapy.stream.active_stream.add_instruction(instruction)
3616
+ return instruction
3617
+
3618
+ @staticmethod
3619
+ def F64(accumulator, factor_x, factor_y):
3620
+ origin = (
3621
+ inspect.stack()
3622
+ if nervapy.arm.function.active_function.collect_origin
3623
+ else None
3624
+ )
3625
+ instruction = VFPDoublePrecisionMultiplyAddInstruction(
3626
+ "VFMA.F64",
3627
+ Operand(accumulator),
3628
+ Operand(factor_x),
3629
+ Operand(factor_y),
3630
+ origin=origin,
3631
+ )
3632
+ if nervapy.stream.active_stream is not None:
3633
+ nervapy.stream.active_stream.add_instruction(instruction)
3634
+ return instruction
3635
+
3636
+
3637
+ class VFMS:
3638
+ @staticmethod
3639
+ def F32(accumulator, factor_x, factor_y):
3640
+ origin = (
3641
+ inspect.stack()
3642
+ if nervapy.arm.function.active_function.collect_origin
3643
+ else None
3644
+ )
3645
+ instruction = VFPNeonMultiplyAddInstruction(
3646
+ "VFMS.F32",
3647
+ Operand(accumulator),
3648
+ Operand(factor_x),
3649
+ Operand(factor_y),
3650
+ origin=origin,
3651
+ )
3652
+ if nervapy.stream.active_stream is not None:
3653
+ nervapy.stream.active_stream.add_instruction(instruction)
3654
+ return instruction
3655
+
3656
+ @staticmethod
3657
+ def F64(accumulator, factor_x, factor_y):
3658
+ origin = (
3659
+ inspect.stack()
3660
+ if nervapy.arm.function.active_function.collect_origin
3661
+ else None
3662
+ )
3663
+ instruction = VFPDoublePrecisionMultiplyAddInstruction(
3664
+ "VFMS.F64",
3665
+ Operand(accumulator),
3666
+ Operand(factor_x),
3667
+ Operand(factor_y),
3668
+ origin=origin,
3669
+ )
3670
+ if nervapy.stream.active_stream is not None:
3671
+ nervapy.stream.active_stream.add_instruction(instruction)
3672
+ return instruction
3673
+
3674
+
3675
+ class VFNMA:
3676
+ @staticmethod
3677
+ def F32(accumulator, factor_x, factor_y):
3678
+ origin = (
3679
+ inspect.stack()
3680
+ if nervapy.arm.function.active_function.collect_origin
3681
+ else None
3682
+ )
3683
+ instruction = VFPSinglePrecisionMultiplyAddInstruction(
3684
+ "VFNMA.F32",
3685
+ Operand(accumulator),
3686
+ Operand(factor_x),
3687
+ Operand(factor_y),
3688
+ origin=origin,
3689
+ )
3690
+ if nervapy.stream.active_stream is not None:
3691
+ nervapy.stream.active_stream.add_instruction(instruction)
3692
+ return instruction
3693
+
3694
+ @staticmethod
3695
+ def F64(accumulator, factor_x, factor_y):
3696
+ origin = (
3697
+ inspect.stack()
3698
+ if nervapy.arm.function.active_function.collect_origin
3699
+ else None
3700
+ )
3701
+ instruction = VFPDoublePrecisionMultiplyAddInstruction(
3702
+ "VFNMA.F64",
3703
+ Operand(accumulator),
3704
+ Operand(factor_x),
3705
+ Operand(factor_y),
3706
+ origin=origin,
3707
+ )
3708
+ if nervapy.stream.active_stream is not None:
3709
+ nervapy.stream.active_stream.add_instruction(instruction)
3710
+ return instruction
3711
+
3712
+
3713
+ class VFNMS:
3714
+ @staticmethod
3715
+ def F32(accumulator, factor_x, factor_y):
3716
+ origin = (
3717
+ inspect.stack()
3718
+ if nervapy.arm.function.active_function.collect_origin
3719
+ else None
3720
+ )
3721
+ instruction = VFPSinglePrecisionMultiplyAddInstruction(
3722
+ "VFNMS.F32",
3723
+ Operand(accumulator),
3724
+ Operand(factor_x),
3725
+ Operand(factor_y),
3726
+ origin=origin,
3727
+ )
3728
+ if nervapy.stream.active_stream is not None:
3729
+ nervapy.stream.active_stream.add_instruction(instruction)
3730
+ return instruction
3731
+
3732
+ @staticmethod
3733
+ def F64(accumulator, factor_x, factor_y):
3734
+ origin = (
3735
+ inspect.stack()
3736
+ if nervapy.arm.function.active_function.collect_origin
3737
+ else None
3738
+ )
3739
+ instruction = VFPDoublePrecisionMultiplyAddInstruction(
3740
+ "VFNMS.F64",
3741
+ Operand(accumulator),
3742
+ Operand(factor_x),
3743
+ Operand(factor_y),
3744
+ origin=origin,
3745
+ )
3746
+ if nervapy.stream.active_stream is not None:
3747
+ nervapy.stream.active_stream.add_instruction(instruction)
3748
+ return instruction
3749
+
3750
+
3751
+ def VLDR(register, address):
3752
+ origin = (
3753
+ inspect.stack() if nervapy.arm.function.active_function.collect_origin else None
3754
+ )
3755
+ instruction = VFPLoadStoreInstruction(
3756
+ "VLDR", Operand(register), Operand(address), origin=origin
3757
+ )
3758
+ if nervapy.stream.active_stream is not None:
3759
+ nervapy.stream.active_stream.add_instruction(instruction)
3760
+ return instruction
3761
+
3762
+
3763
+ def VSTR(register, address):
3764
+ origin = (
3765
+ inspect.stack() if nervapy.arm.function.active_function.collect_origin else None
3766
+ )
3767
+ instruction = VFPLoadStoreInstruction(
3768
+ "VSTR", Operand(register), Operand(address), origin=origin
3769
+ )
3770
+ if nervapy.stream.active_stream is not None:
3771
+ nervapy.stream.active_stream.add_instruction(instruction)
3772
+ return instruction
3773
+
3774
+
3775
+ def VLDM(source, destination):
3776
+ origin = (
3777
+ inspect.stack() if nervapy.arm.function.active_function.collect_origin else None
3778
+ )
3779
+ instruction = VFPLoadStoreMultipleInstruction(
3780
+ "VLDM", Operand(source), Operand(destination), origin=origin
3781
+ )
3782
+ if nervapy.stream.active_stream is not None:
3783
+ nervapy.stream.active_stream.add_instruction(instruction)
3784
+ return instruction
3785
+
3786
+
3787
+ def VLDMIA(source, destination):
3788
+ origin = (
3789
+ inspect.stack() if nervapy.arm.function.active_function.collect_origin else None
3790
+ )
3791
+ instruction = VFPLoadStoreMultipleInstruction(
3792
+ "VLDMIA", Operand(source), Operand(destination), origin=origin
3793
+ )
3794
+ if nervapy.stream.active_stream is not None:
3795
+ nervapy.stream.active_stream.add_instruction(instruction)
3796
+ return instruction
3797
+
3798
+
3799
+ def VLDMDB(source, destination):
3800
+ origin = (
3801
+ inspect.stack() if nervapy.arm.function.active_function.collect_origin else None
3802
+ )
3803
+ instruction = VFPLoadStoreMultipleInstruction(
3804
+ "VLDMDB", Operand(source), Operand(destination), origin=origin
3805
+ )
3806
+ if nervapy.stream.active_stream is not None:
3807
+ nervapy.stream.active_stream.add_instruction(instruction)
3808
+ return instruction
3809
+
3810
+
3811
+ def VSTM(source, destination):
3812
+ origin = (
3813
+ inspect.stack() if nervapy.arm.function.active_function.collect_origin else None
3814
+ )
3815
+ instruction = VFPLoadStoreMultipleInstruction(
3816
+ "VSTM", Operand(source), Operand(destination), origin=origin
3817
+ )
3818
+ if nervapy.stream.active_stream is not None:
3819
+ nervapy.stream.active_stream.add_instruction(instruction)
3820
+ return instruction
3821
+
3822
+
3823
+ def VSTMIA(source, destination):
3824
+ origin = (
3825
+ inspect.stack() if nervapy.arm.function.active_function.collect_origin else None
3826
+ )
3827
+ instruction = VFPLoadStoreMultipleInstruction(
3828
+ "VSTMIA", Operand(source), Operand(destination), origin=origin
3829
+ )
3830
+ if nervapy.stream.active_stream is not None:
3831
+ nervapy.stream.active_stream.add_instruction(instruction)
3832
+ return instruction
3833
+
3834
+
3835
+ def VSTMDB(source, destination):
3836
+ origin = (
3837
+ inspect.stack() if nervapy.arm.function.active_function.collect_origin else None
3838
+ )
3839
+ instruction = VFPLoadStoreMultipleInstruction(
3840
+ "VSTMDB", Operand(source), Operand(destination), origin=origin
3841
+ )
3842
+ if nervapy.stream.active_stream is not None:
3843
+ nervapy.stream.active_stream.add_instruction(instruction)
3844
+ return instruction
3845
+
3846
+
3847
+ def VPUSH(register_list):
3848
+ origin = (
3849
+ inspect.stack() if nervapy.arm.function.active_function.collect_origin else None
3850
+ )
3851
+ instruction = VFPPushPopInstruction("VPUSH", Operand(register_list), origin=origin)
3852
+ if nervapy.stream.active_stream is not None:
3853
+ nervapy.stream.active_stream.add_instruction(instruction)
3854
+ return instruction
3855
+
3856
+
3857
+ def VPOP(register_list):
3858
+ origin = (
3859
+ inspect.stack() if nervapy.arm.function.active_function.collect_origin else None
3860
+ )
3861
+ instruction = VFPPushPopInstruction("VPOP", Operand(register_list), origin=origin)
3862
+ if nervapy.stream.active_stream is not None:
3863
+ nervapy.stream.active_stream.add_instruction(instruction)
3864
+ return instruction
3865
+
3866
+
3867
+ class VLD1:
3868
+ @staticmethod
3869
+ def I8(address, register_list, increment=None):
3870
+ origin = (
3871
+ inspect.stack()
3872
+ if nervapy.arm.function.active_function.collect_origin
3873
+ else None
3874
+ )
3875
+ instruction = NeonLoadStoreInstruction(
3876
+ "VLD1.8",
3877
+ Operand(address),
3878
+ Operand(register_list),
3879
+ Operand(increment),
3880
+ origin=origin,
3881
+ )
3882
+ if nervapy.stream.active_stream is not None:
3883
+ nervapy.stream.active_stream.add_instruction(instruction)
3884
+ return instruction
3885
+
3886
+ @staticmethod
3887
+ def I16(address, register_list, increment=None):
3888
+ origin = (
3889
+ inspect.stack()
3890
+ if nervapy.arm.function.active_function.collect_origin
3891
+ else None
3892
+ )
3893
+ instruction = NeonLoadStoreInstruction(
3894
+ "VLD1.16",
3895
+ Operand(address),
3896
+ Operand(register_list),
3897
+ Operand(increment),
3898
+ origin=origin,
3899
+ )
3900
+ if nervapy.stream.active_stream is not None:
3901
+ nervapy.stream.active_stream.add_instruction(instruction)
3902
+ return instruction
3903
+
3904
+ @staticmethod
3905
+ def I32(address, register_list, increment=None):
3906
+ origin = (
3907
+ inspect.stack()
3908
+ if nervapy.arm.function.active_function.collect_origin
3909
+ else None
3910
+ )
3911
+ instruction = NeonLoadStoreInstruction(
3912
+ "VLD1.32",
3913
+ Operand(address),
3914
+ Operand(register_list),
3915
+ Operand(increment),
3916
+ origin=origin,
3917
+ )
3918
+ if nervapy.stream.active_stream is not None:
3919
+ nervapy.stream.active_stream.add_instruction(instruction)
3920
+ return instruction
3921
+
3922
+ @staticmethod
3923
+ def I64(address, register_list, increment=None):
3924
+ origin = (
3925
+ inspect.stack()
3926
+ if nervapy.arm.function.active_function.collect_origin
3927
+ else None
3928
+ )
3929
+ instruction = NeonLoadStoreInstruction(
3930
+ "VLD1.64",
3931
+ Operand(address),
3932
+ Operand(register_list),
3933
+ Operand(increment),
3934
+ origin=origin,
3935
+ )
3936
+ if nervapy.stream.active_stream is not None:
3937
+ nervapy.stream.active_stream.add_instruction(instruction)
3938
+ return instruction
3939
+
3940
+ @staticmethod
3941
+ def F32(address, register_list, increment=None):
3942
+ origin = (
3943
+ inspect.stack()
3944
+ if nervapy.arm.function.active_function.collect_origin
3945
+ else None
3946
+ )
3947
+ instruction = NeonLoadStoreInstruction(
3948
+ "VLD1.32",
3949
+ Operand(address),
3950
+ Operand(register_list),
3951
+ Operand(increment),
3952
+ origin=origin,
3953
+ )
3954
+ if nervapy.stream.active_stream is not None:
3955
+ nervapy.stream.active_stream.add_instruction(instruction)
3956
+ return instruction
3957
+
3958
+
3959
+ class VST1:
3960
+ @staticmethod
3961
+ def I8(address, register_list, increment=None):
3962
+ origin = (
3963
+ inspect.stack()
3964
+ if nervapy.arm.function.active_function.collect_origin
3965
+ else None
3966
+ )
3967
+ instruction = NeonLoadStoreInstruction(
3968
+ "VST1.8",
3969
+ Operand(address),
3970
+ Operand(register_list),
3971
+ Operand(increment),
3972
+ origin=origin,
3973
+ )
3974
+ if nervapy.stream.active_stream is not None:
3975
+ nervapy.stream.active_stream.add_instruction(instruction)
3976
+ return instruction
3977
+
3978
+ @staticmethod
3979
+ def I16(address, register_list, increment=None):
3980
+ origin = (
3981
+ inspect.stack()
3982
+ if nervapy.arm.function.active_function.collect_origin
3983
+ else None
3984
+ )
3985
+ instruction = NeonLoadStoreInstruction(
3986
+ "VST1.16",
3987
+ Operand(address),
3988
+ Operand(register_list),
3989
+ Operand(increment),
3990
+ origin=origin,
3991
+ )
3992
+ if nervapy.stream.active_stream is not None:
3993
+ nervapy.stream.active_stream.add_instruction(instruction)
3994
+ return instruction
3995
+
3996
+ @staticmethod
3997
+ def I32(address, register_list, increment=None):
3998
+ origin = (
3999
+ inspect.stack()
4000
+ if nervapy.arm.function.active_function.collect_origin
4001
+ else None
4002
+ )
4003
+ instruction = NeonLoadStoreInstruction(
4004
+ "VST1.32",
4005
+ Operand(address),
4006
+ Operand(register_list),
4007
+ Operand(increment),
4008
+ origin=origin,
4009
+ )
4010
+ if nervapy.stream.active_stream is not None:
4011
+ nervapy.stream.active_stream.add_instruction(instruction)
4012
+ return instruction
4013
+
4014
+ @staticmethod
4015
+ def I64(address, register_list, increment=None):
4016
+ origin = (
4017
+ inspect.stack()
4018
+ if nervapy.arm.function.active_function.collect_origin
4019
+ else None
4020
+ )
4021
+ instruction = NeonLoadStoreInstruction(
4022
+ "VST1.64",
4023
+ Operand(address),
4024
+ Operand(register_list),
4025
+ Operand(increment),
4026
+ origin=origin,
4027
+ )
4028
+ if nervapy.stream.active_stream is not None:
4029
+ nervapy.stream.active_stream.add_instruction(instruction)
4030
+ return instruction
4031
+
4032
+ @staticmethod
4033
+ def F32(address, register_list, increment=None):
4034
+ origin = (
4035
+ inspect.stack()
4036
+ if nervapy.arm.function.active_function.collect_origin
4037
+ else None
4038
+ )
4039
+ instruction = NeonLoadStoreInstruction(
4040
+ "VST1.32",
4041
+ Operand(address),
4042
+ Operand(register_list),
4043
+ Operand(increment),
4044
+ origin=origin,
4045
+ )
4046
+ if nervapy.stream.active_stream is not None:
4047
+ nervapy.stream.active_stream.add_instruction(instruction)
4048
+ return instruction
4049
+
4050
+
4051
+ class VMOV(object):
4052
+ @staticmethod
4053
+ def __new__(cls, destination, source):
4054
+ origin = (
4055
+ inspect.stack()
4056
+ if nervapy.arm.function.active_function.collect_origin
4057
+ else None
4058
+ )
4059
+ instruction = VfpNeonMovInstruction(
4060
+ "VMOV", Operand(destination), Operand(source), origin=origin
4061
+ )
4062
+ if nervapy.stream.active_stream is not None:
4063
+ nervapy.stream.active_stream.add_instruction(instruction)
4064
+ return instruction
4065
+
4066
+ @staticmethod
4067
+ def F32(destination, source):
4068
+ origin = (
4069
+ inspect.stack()
4070
+ if nervapy.arm.function.active_function.collect_origin
4071
+ else None
4072
+ )
4073
+ instruction = VfpNeonMovInstruction(
4074
+ "VMOV.F32", Operand(destination), Operand(source), origin=origin
4075
+ )
4076
+ if nervapy.stream.active_stream is not None:
4077
+ nervapy.stream.active_stream.add_instruction(instruction)
4078
+ return instruction
4079
+
4080
+ @staticmethod
4081
+ def F64(destination, source):
4082
+ origin = (
4083
+ inspect.stack()
4084
+ if nervapy.arm.function.active_function.collect_origin
4085
+ else None
4086
+ )
4087
+ instruction = VfpNeonMovInstruction(
4088
+ "VMOV.F64", Operand(destination), Operand(source), origin=origin
4089
+ )
4090
+ if nervapy.stream.active_stream is not None:
4091
+ nervapy.stream.active_stream.add_instruction(instruction)
4092
+ return instruction