PyNerva 0.0.7__tar.gz → 0.0.8__tar.gz

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 (177) hide show
  1. {pynerva-0.0.7 → pynerva-0.0.8}/PKG-INFO +1 -1
  2. {pynerva-0.0.7 → pynerva-0.0.8}/nervapy/arm/__init__.py +1 -1
  3. {pynerva-0.0.7 → pynerva-0.0.8}/nervapy/arm/generic.py +41 -0
  4. {pynerva-0.0.7 → pynerva-0.0.8}/pyproject.toml +1 -1
  5. pynerva-0.0.8/tests/arm/test_uxth.py +43 -0
  6. {pynerva-0.0.7 → pynerva-0.0.8}/.gitea/WORKFLOWS.md +0 -0
  7. {pynerva-0.0.7 → pynerva-0.0.8}/.gitea/workflows/code-quality.yml +0 -0
  8. {pynerva-0.0.7 → pynerva-0.0.8}/.gitea/workflows/release.yml +0 -0
  9. {pynerva-0.0.7 → pynerva-0.0.8}/.gitea/workflows/test.yml +0 -0
  10. {pynerva-0.0.7 → pynerva-0.0.8}/.github/WORKFLOWS.md +0 -0
  11. {pynerva-0.0.7 → pynerva-0.0.8}/.github/workflows/code-quality.yml +0 -0
  12. {pynerva-0.0.7 → pynerva-0.0.8}/.github/workflows/publish.yml +0 -0
  13. {pynerva-0.0.7 → pynerva-0.0.8}/.github/workflows/release.yml +0 -0
  14. {pynerva-0.0.7 → pynerva-0.0.8}/.github/workflows/test.yml +0 -0
  15. {pynerva-0.0.7 → pynerva-0.0.8}/.gitignore +0 -0
  16. {pynerva-0.0.7 → pynerva-0.0.8}/.travis.yml +0 -0
  17. {pynerva-0.0.7 → pynerva-0.0.8}/LICENSE.rst +0 -0
  18. {pynerva-0.0.7 → pynerva-0.0.8}/NervaPy.egg-info/PKG-INFO +0 -0
  19. {pynerva-0.0.7 → pynerva-0.0.8}/NervaPy.egg-info/SOURCES.txt +0 -0
  20. {pynerva-0.0.7 → pynerva-0.0.8}/NervaPy.egg-info/dependency_links.txt +0 -0
  21. {pynerva-0.0.7 → pynerva-0.0.8}/NervaPy.egg-info/requires.txt +0 -0
  22. {pynerva-0.0.7 → pynerva-0.0.8}/NervaPy.egg-info/top_level.txt +0 -0
  23. {pynerva-0.0.7 → pynerva-0.0.8}/README.md +0 -0
  24. {pynerva-0.0.7 → pynerva-0.0.8}/README.rst +0 -0
  25. {pynerva-0.0.7 → pynerva-0.0.8}/STRD_IMPLEMENTATION.md +0 -0
  26. {pynerva-0.0.7 → pynerva-0.0.8}/appveyor.yml +0 -0
  27. {pynerva-0.0.7 → pynerva-0.0.8}/codegen/__init__.py +0 -0
  28. {pynerva-0.0.7 → pynerva-0.0.8}/codegen/code.py +0 -0
  29. {pynerva-0.0.7 → pynerva-0.0.8}/codegen/x86_64.json +0 -0
  30. {pynerva-0.0.7 → pynerva-0.0.8}/codegen/x86_64.py +0 -0
  31. {pynerva-0.0.7 → pynerva-0.0.8}/codegen/x86_64_nacl_test.py +0 -0
  32. {pynerva-0.0.7 → pynerva-0.0.8}/codegen/x86_64_test_encoding.py +0 -0
  33. {pynerva-0.0.7 → pynerva-0.0.8}/docs/ARM_BRANCH_INSTRUCTIONS.md +0 -0
  34. {pynerva-0.0.7 → pynerva-0.0.8}/docs/ARM_IMPORT_EXTERNAL_FUNCTIONS.md +0 -0
  35. {pynerva-0.0.7 → pynerva-0.0.8}/docs/ARM_SHIFTED_REGISTER_ADDRESSING.md +0 -0
  36. {pynerva-0.0.7 → pynerva-0.0.8}/docs/ARMv7M_SUPPORT.md +0 -0
  37. {pynerva-0.0.7 → pynerva-0.0.8}/docs/armv7m_register_strategies.py +0 -0
  38. {pynerva-0.0.7 → pynerva-0.0.8}/examples/arm_branch_instructions.py +0 -0
  39. {pynerva-0.0.7 → pynerva-0.0.8}/examples/arm_cortex_m_example.py +0 -0
  40. {pynerva-0.0.7 → pynerva-0.0.8}/examples/arm_import_external_functions.py +0 -0
  41. {pynerva-0.0.7 → pynerva-0.0.8}/examples/arm_ldr_shifted_register.py +0 -0
  42. {pynerva-0.0.7 → pynerva-0.0.8}/examples/arm_rust_integration.py +0 -0
  43. {pynerva-0.0.7 → pynerva-0.0.8}/examples/final_high_register_demo.py +0 -0
  44. {pynerva-0.0.7 → pynerva-0.0.8}/examples/final_implementation_summary.py +0 -0
  45. {pynerva-0.0.7 → pynerva-0.0.8}/examples/go-generate/dot_product.go +0 -0
  46. {pynerva-0.0.7 → pynerva-0.0.8}/examples/go-generate/dot_product.py +0 -0
  47. {pynerva-0.0.7 → pynerva-0.0.8}/examples/go-generate/dot_product_test.go +0 -0
  48. {pynerva-0.0.7 → pynerva-0.0.8}/examples/go-generate/main.go +0 -0
  49. {pynerva-0.0.7 → pynerva-0.0.8}/examples/kernels.rs +0 -0
  50. {pynerva-0.0.7 → pynerva-0.0.8}/examples/make/Makefile +0 -0
  51. {pynerva-0.0.7 → pynerva-0.0.8}/examples/make/matmul-opt.py +0 -0
  52. {pynerva-0.0.7 → pynerva-0.0.8}/examples/make/matmul-ref.c +0 -0
  53. {pynerva-0.0.7 → pynerva-0.0.8}/examples/make/test.c +0 -0
  54. {pynerva-0.0.7 → pynerva-0.0.8}/examples/nmake/Makefile +0 -0
  55. {pynerva-0.0.7 → pynerva-0.0.8}/examples/nmake/test.cpp +0 -0
  56. {pynerva-0.0.7 → pynerva-0.0.8}/examples/nmake/transpose4x4-opt.py +0 -0
  57. {pynerva-0.0.7 → pynerva-0.0.8}/examples/nmake/transpose4x4-ref.cpp +0 -0
  58. {pynerva-0.0.7 → pynerva-0.0.8}/examples/test_high_register_strategies.py +0 -0
  59. {pynerva-0.0.7 → pynerva-0.0.8}/examples/test_register_constraints.py +0 -0
  60. {pynerva-0.0.7 → pynerva-0.0.8}/examples/test_simple_strategies.py +0 -0
  61. {pynerva-0.0.7 → pynerva-0.0.8}/logo/college-of-computing.gif +0 -0
  62. {pynerva-0.0.7 → pynerva-0.0.8}/logo/hpcgarage.png +0 -0
  63. {pynerva-0.0.7 → pynerva-0.0.8}/logo/peachpy.png +0 -0
  64. {pynerva-0.0.7 → pynerva-0.0.8}/nervapy/__init__.py +0 -0
  65. {pynerva-0.0.7 → pynerva-0.0.8}/nervapy/abi.py +0 -0
  66. {pynerva-0.0.7 → pynerva-0.0.8}/nervapy/arm/__main__.py +0 -0
  67. {pynerva-0.0.7 → pynerva-0.0.8}/nervapy/arm/abi.py +0 -0
  68. {pynerva-0.0.7 → pynerva-0.0.8}/nervapy/arm/formats.py +0 -0
  69. {pynerva-0.0.7 → pynerva-0.0.8}/nervapy/arm/function.py +0 -0
  70. {pynerva-0.0.7 → pynerva-0.0.8}/nervapy/arm/instructions.py +0 -0
  71. {pynerva-0.0.7 → pynerva-0.0.8}/nervapy/arm/isa.py +0 -0
  72. {pynerva-0.0.7 → pynerva-0.0.8}/nervapy/arm/literal_pool.py +0 -0
  73. {pynerva-0.0.7 → pynerva-0.0.8}/nervapy/arm/microarchitecture.py +0 -0
  74. {pynerva-0.0.7 → pynerva-0.0.8}/nervapy/arm/pseudo.py +0 -0
  75. {pynerva-0.0.7 → pynerva-0.0.8}/nervapy/arm/registers.py +0 -0
  76. {pynerva-0.0.7 → pynerva-0.0.8}/nervapy/arm/vfpneon.py +0 -0
  77. {pynerva-0.0.7 → pynerva-0.0.8}/nervapy/arm.py +0 -0
  78. {pynerva-0.0.7 → pynerva-0.0.8}/nervapy/c/__init__.py +0 -0
  79. {pynerva-0.0.7 → pynerva-0.0.8}/nervapy/c/types.py +0 -0
  80. {pynerva-0.0.7 → pynerva-0.0.8}/nervapy/codegen.py +0 -0
  81. {pynerva-0.0.7 → pynerva-0.0.8}/nervapy/common/__init__.py +0 -0
  82. {pynerva-0.0.7 → pynerva-0.0.8}/nervapy/common/function.py +0 -0
  83. {pynerva-0.0.7 → pynerva-0.0.8}/nervapy/common/regalloc.py +0 -0
  84. {pynerva-0.0.7 → pynerva-0.0.8}/nervapy/constant_data.py +0 -0
  85. {pynerva-0.0.7 → pynerva-0.0.8}/nervapy/encoder.py +0 -0
  86. {pynerva-0.0.7 → pynerva-0.0.8}/nervapy/formats/__init__.py +0 -0
  87. {pynerva-0.0.7 → pynerva-0.0.8}/nervapy/formats/elf/__init__.py +0 -0
  88. {pynerva-0.0.7 → pynerva-0.0.8}/nervapy/formats/elf/file.py +0 -0
  89. {pynerva-0.0.7 → pynerva-0.0.8}/nervapy/formats/elf/image.py +0 -0
  90. {pynerva-0.0.7 → pynerva-0.0.8}/nervapy/formats/elf/section.py +0 -0
  91. {pynerva-0.0.7 → pynerva-0.0.8}/nervapy/formats/elf/symbol.py +0 -0
  92. {pynerva-0.0.7 → pynerva-0.0.8}/nervapy/formats/macho/__init__.py +0 -0
  93. {pynerva-0.0.7 → pynerva-0.0.8}/nervapy/formats/macho/file.py +0 -0
  94. {pynerva-0.0.7 → pynerva-0.0.8}/nervapy/formats/macho/image.py +0 -0
  95. {pynerva-0.0.7 → pynerva-0.0.8}/nervapy/formats/macho/section.py +0 -0
  96. {pynerva-0.0.7 → pynerva-0.0.8}/nervapy/formats/macho/symbol.py +0 -0
  97. {pynerva-0.0.7 → pynerva-0.0.8}/nervapy/formats/mscoff/__init__.py +0 -0
  98. {pynerva-0.0.7 → pynerva-0.0.8}/nervapy/formats/mscoff/image.py +0 -0
  99. {pynerva-0.0.7 → pynerva-0.0.8}/nervapy/formats/mscoff/section.py +0 -0
  100. {pynerva-0.0.7 → pynerva-0.0.8}/nervapy/formats/mscoff/symbol.py +0 -0
  101. {pynerva-0.0.7 → pynerva-0.0.8}/nervapy/function.py +0 -0
  102. {pynerva-0.0.7 → pynerva-0.0.8}/nervapy/literal.py +0 -0
  103. {pynerva-0.0.7 → pynerva-0.0.8}/nervapy/loader.py +0 -0
  104. {pynerva-0.0.7 → pynerva-0.0.8}/nervapy/name.py +0 -0
  105. {pynerva-0.0.7 → pynerva-0.0.8}/nervapy/parse.py +0 -0
  106. {pynerva-0.0.7 → pynerva-0.0.8}/nervapy/stream.py +0 -0
  107. {pynerva-0.0.7 → pynerva-0.0.8}/nervapy/util.py +0 -0
  108. {pynerva-0.0.7 → pynerva-0.0.8}/nervapy/writer.py +0 -0
  109. {pynerva-0.0.7 → pynerva-0.0.8}/nervapy/x86_64/__init__.py +0 -0
  110. {pynerva-0.0.7 → pynerva-0.0.8}/nervapy/x86_64/__main__.py +0 -0
  111. {pynerva-0.0.7 → pynerva-0.0.8}/nervapy/x86_64/abi.py +0 -0
  112. {pynerva-0.0.7 → pynerva-0.0.8}/nervapy/x86_64/amd.py +0 -0
  113. {pynerva-0.0.7 → pynerva-0.0.8}/nervapy/x86_64/avx.py +0 -0
  114. {pynerva-0.0.7 → pynerva-0.0.8}/nervapy/x86_64/crypto.py +0 -0
  115. {pynerva-0.0.7 → pynerva-0.0.8}/nervapy/x86_64/encoding.py +0 -0
  116. {pynerva-0.0.7 → pynerva-0.0.8}/nervapy/x86_64/fma.py +0 -0
  117. {pynerva-0.0.7 → pynerva-0.0.8}/nervapy/x86_64/function.py +0 -0
  118. {pynerva-0.0.7 → pynerva-0.0.8}/nervapy/x86_64/generic.py +0 -0
  119. {pynerva-0.0.7 → pynerva-0.0.8}/nervapy/x86_64/instructions.py +0 -0
  120. {pynerva-0.0.7 → pynerva-0.0.8}/nervapy/x86_64/isa.py +0 -0
  121. {pynerva-0.0.7 → pynerva-0.0.8}/nervapy/x86_64/lower.py +0 -0
  122. {pynerva-0.0.7 → pynerva-0.0.8}/nervapy/x86_64/mask.py +0 -0
  123. {pynerva-0.0.7 → pynerva-0.0.8}/nervapy/x86_64/meta.py +0 -0
  124. {pynerva-0.0.7 → pynerva-0.0.8}/nervapy/x86_64/mmxsse.py +0 -0
  125. {pynerva-0.0.7 → pynerva-0.0.8}/nervapy/x86_64/nacl.py +0 -0
  126. {pynerva-0.0.7 → pynerva-0.0.8}/nervapy/x86_64/operand.py +0 -0
  127. {pynerva-0.0.7 → pynerva-0.0.8}/nervapy/x86_64/options.py +0 -0
  128. {pynerva-0.0.7 → pynerva-0.0.8}/nervapy/x86_64/pseudo.py +0 -0
  129. {pynerva-0.0.7 → pynerva-0.0.8}/nervapy/x86_64/registers.py +0 -0
  130. {pynerva-0.0.7 → pynerva-0.0.8}/nervapy/x86_64/types.py +0 -0
  131. {pynerva-0.0.7 → pynerva-0.0.8}/nervapy/x86_64/uarch.py +0 -0
  132. {pynerva-0.0.7 → pynerva-0.0.8}/pytest.ini +0 -0
  133. {pynerva-0.0.7 → pynerva-0.0.8}/requirements.txt +0 -0
  134. {pynerva-0.0.7 → pynerva-0.0.8}/sphinx/conf.py +0 -0
  135. {pynerva-0.0.7 → pynerva-0.0.8}/sphinx/index.rst +0 -0
  136. {pynerva-0.0.7 → pynerva-0.0.8}/sphinx/nervapy.rst +0 -0
  137. {pynerva-0.0.7 → pynerva-0.0.8}/tests/__init__.py +0 -0
  138. {pynerva-0.0.7 → pynerva-0.0.8}/tests/arm/test_and_w_eor_w.py +0 -0
  139. {pynerva-0.0.7 → pynerva-0.0.8}/tests/arm/test_arm.py +0 -0
  140. {pynerva-0.0.7 → pynerva-0.0.8}/tests/arm/test_armv7m.py +0 -0
  141. {pynerva-0.0.7 → pynerva-0.0.8}/tests/arm/test_armv7m_registers.py +0 -0
  142. {pynerva-0.0.7 → pynerva-0.0.8}/tests/arm/test_armv8m.py +0 -0
  143. {pynerva-0.0.7 → pynerva-0.0.8}/tests/arm/test_barrel_shifter.py +0 -0
  144. {pynerva-0.0.7 → pynerva-0.0.8}/tests/arm/test_cortex_m33_fpu.py +0 -0
  145. {pynerva-0.0.7 → pynerva-0.0.8}/tests/arm/test_dead_register_allocation.py +0 -0
  146. {pynerva-0.0.7 → pynerva-0.0.8}/tests/arm/test_helium_phase1.py +0 -0
  147. {pynerva-0.0.7 → pynerva-0.0.8}/tests/arm/test_live_registers.py +0 -0
  148. {pynerva-0.0.7 → pynerva-0.0.8}/tests/arm/test_mov_w_32bit.py +0 -0
  149. {pynerva-0.0.7 → pynerva-0.0.8}/tests/arm/test_movw_32bit.py +0 -0
  150. {pynerva-0.0.7 → pynerva-0.0.8}/tests/arm/test_multiply_instructions.py +0 -0
  151. {pynerva-0.0.7 → pynerva-0.0.8}/tests/arm/test_preserve8.py +0 -0
  152. {pynerva-0.0.7 → pynerva-0.0.8}/tests/arm/test_register_count.py +0 -0
  153. {pynerva-0.0.7 → pynerva-0.0.8}/tests/arm/test_register_overflow.py +0 -0
  154. {pynerva-0.0.7 → pynerva-0.0.8}/tests/arm/test_stack_alignment.py +0 -0
  155. {pynerva-0.0.7 → pynerva-0.0.8}/tests/requirements.txt +0 -0
  156. {pynerva-0.0.7 → pynerva-0.0.8}/tests/test_elf.py +0 -0
  157. {pynerva-0.0.7 → pynerva-0.0.8}/tests/test_literal.py +0 -0
  158. {pynerva-0.0.7 → pynerva-0.0.8}/tests/x86_64/__init__.py +0 -0
  159. {pynerva-0.0.7 → pynerva-0.0.8}/tests/x86_64/encoding/__init__.py +0 -0
  160. {pynerva-0.0.7 → pynerva-0.0.8}/tests/x86_64/encoding/test_amd.py +0 -0
  161. {pynerva-0.0.7 → pynerva-0.0.8}/tests/x86_64/encoding/test_avx.py +0 -0
  162. {pynerva-0.0.7 → pynerva-0.0.8}/tests/x86_64/encoding/test_crypto.py +0 -0
  163. {pynerva-0.0.7 → pynerva-0.0.8}/tests/x86_64/encoding/test_fma.py +0 -0
  164. {pynerva-0.0.7 → pynerva-0.0.8}/tests/x86_64/encoding/test_generic.py +0 -0
  165. {pynerva-0.0.7 → pynerva-0.0.8}/tests/x86_64/encoding/test_imm.py +0 -0
  166. {pynerva-0.0.7 → pynerva-0.0.8}/tests/x86_64/encoding/test_mask.py +0 -0
  167. {pynerva-0.0.7 → pynerva-0.0.8}/tests/x86_64/encoding/test_mmxsse.py +0 -0
  168. {pynerva-0.0.7 → pynerva-0.0.8}/tests/x86_64/test_analysis.py +0 -0
  169. {pynerva-0.0.7 → pynerva-0.0.8}/tests/x86_64/test_function.py +0 -0
  170. {pynerva-0.0.7 → pynerva-0.0.8}/tests/x86_64/test_golang.py +0 -0
  171. {pynerva-0.0.7 → pynerva-0.0.8}/tests/x86_64/test_labels.py +0 -0
  172. {pynerva-0.0.7 → pynerva-0.0.8}/tests/x86_64/test_load.py +0 -0
  173. {pynerva-0.0.7 → pynerva-0.0.8}/tests/x86_64/test_register_allocation.py +0 -0
  174. {pynerva-0.0.7 → pynerva-0.0.8}/tests/x86_64/test_register_constraints.py +0 -0
  175. {pynerva-0.0.7 → pynerva-0.0.8}/tests/x86_64/test_relocation.py +0 -0
  176. {pynerva-0.0.7 → pynerva-0.0.8}/tests/x86_64/test_return.py +0 -0
  177. {pynerva-0.0.7 → pynerva-0.0.8}/uv.lock +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: PyNerva
3
- Version: 0.0.7
3
+ Version: 0.0.8
4
4
  Summary: Framework for exploring advanced program synthesis and transformation techniques
5
5
  Project-URL: Homepage, https://github.com/kriskwiatkowski/NervaPy.git
6
6
  Author-email: Kris Kwiatkowski <kris@amongbytes.com>
@@ -93,7 +93,7 @@ from nervapy.arm.generic import (ADC, ADCCC, ADCCS, ADCEQ, ADCGE, ADCGT, ADCHI,
93
93
  TSTCS, TSTEQ, TSTGE, TSTGT, TSTHI, TSTHS,
94
94
  TSTLE, TSTLO, TSTLS, TSTLT, TSTMI, TSTNE,
95
95
  TSTPL, TSTVC, TSTVS, TT, TTA, TTAT, TTT,
96
- UMAAL, UMAALGE, UMLAL, UMULL, B)
96
+ UMAAL, UMAALGE, UMLAL, UMULL, UXTH, B)
97
97
  from nervapy.arm.literal_pool import LDR_LITERAL, LDRL
98
98
  from nervapy.arm.microarchitecture import Microarchitecture
99
99
  from nervapy.arm.pseudo import (ALIGN, ASSUME, IMPORT, INIT, LABEL, LOAD,
@@ -9509,6 +9509,47 @@ class BitFieldInstruction(Instruction):
9509
9509
  def get_output_registers_list(self):
9510
9510
  return self.operands[0].get_registers_list()
9511
9511
 
9512
+
9513
+ class UnsignedExtendHalfwordInstruction(Instruction):
9514
+ """UXTH - zero-extend the low halfword of a register."""
9515
+
9516
+ def __init__(self, destination, source, origin=None):
9517
+ from nervapy.arm.function import active_function
9518
+ from nervapy.arm.isa import Extension
9519
+
9520
+ if not (
9521
+ destination.is_general_purpose_register()
9522
+ and source.is_general_purpose_register()
9523
+ ):
9524
+ raise ValueError(
9525
+ "UXTH destination and source operands must be general-purpose registers"
9526
+ )
9527
+ if active_function and Extension.V6 not in active_function.target.extensions:
9528
+ raise ValueError("UXTH is not supported on the current target")
9529
+ super(UnsignedExtendHalfwordInstruction, self).__init__(
9530
+ "UXTH", [destination, source], origin=origin
9531
+ )
9532
+
9533
+ def get_input_registers_list(self):
9534
+ return self.operands[1].get_registers_list()
9535
+
9536
+ def get_output_registers_list(self):
9537
+ return self.operands[0].get_registers_list()
9538
+
9539
+
9540
+ def UXTH(destination, source):
9541
+ """UXTH - zero-extend bits 0-15 of *source* into *destination*."""
9542
+ origin = (
9543
+ inspect.stack() if nervapy.arm.function.active_function.collect_origin else None
9544
+ )
9545
+ instruction = UnsignedExtendHalfwordInstruction(
9546
+ Operand(destination), Operand(source), origin=origin
9547
+ )
9548
+ if nervapy.stream.active_stream is not None:
9549
+ nervapy.stream.active_stream.add_instruction(instruction)
9550
+ return instruction
9551
+
9552
+
9512
9553
  def BFI(destination, source, lsb, width):
9513
9554
  """BFI - Bit Field Insert (Thumb-2 / ARMv7-M, ARMv8-M.main).
9514
9555
 
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "PyNerva"
3
- version = "0.0.7"
3
+ version = "0.0.8"
4
4
  description = "Framework for exploring advanced program synthesis and transformation techniques"
5
5
  authors = [{ name = "Kris Kwiatkowski", email = "kris@amongbytes.com" }]
6
6
  keywords = [
@@ -0,0 +1,43 @@
1
+ import unittest
2
+
3
+ from nervapy import *
4
+ from nervapy.arm import *
5
+ from nervapy.arm.abi import arm_gnueabihf
6
+ from nervapy.arm.microarchitecture import Microarchitecture
7
+
8
+
9
+ class TestUXTH(unittest.TestCase):
10
+ def test_emits_zero_extend_halfword(self):
11
+ with Function(
12
+ "zero_extend_halfword",
13
+ (),
14
+ target=Microarchitecture.ARM11,
15
+ abi=arm_gnueabihf,
16
+ report_generation=False,
17
+ ) as function:
18
+ UXTH(r0, r1)
19
+ RETURN()
20
+
21
+ self.assertIn("UXTH r0, r1", function.assembly)
22
+
23
+ def test_requires_armv6(self):
24
+ with self.assertRaisesRegex(ValueError, "not supported"):
25
+ with Function(
26
+ "unsupported_uxth",
27
+ (),
28
+ target=Microarchitecture.ARM9,
29
+ abi=arm_gnueabihf,
30
+ report_generation=False,
31
+ ):
32
+ UXTH(r0, r1)
33
+
34
+ def test_rejects_non_register_operands(self):
35
+ with self.assertRaisesRegex(ValueError, "general-purpose registers"):
36
+ with Function(
37
+ "invalid_uxth",
38
+ (),
39
+ target=Microarchitecture.ARM11,
40
+ abi=arm_gnueabihf,
41
+ report_generation=False,
42
+ ):
43
+ UXTH(r0, 1)
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes