aarch64 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (281) hide show
  1. checksums.yaml +7 -0
  2. data/CODE_OF_CONDUCT.md +77 -0
  3. data/Gemfile +3 -0
  4. data/LICENSE +201 -0
  5. data/README.md +77 -0
  6. data/Rakefile +168 -0
  7. data/aarch64.gemspec +21 -0
  8. data/bin/build_instructions.rb +102 -0
  9. data/lib/aarch64/instructions/adc.rb +31 -0
  10. data/lib/aarch64/instructions/adcs.rb +30 -0
  11. data/lib/aarch64/instructions/add_addsub_ext.rb +35 -0
  12. data/lib/aarch64/instructions/add_addsub_imm.rb +32 -0
  13. data/lib/aarch64/instructions/add_addsub_shift.rb +35 -0
  14. data/lib/aarch64/instructions/addg.rb +30 -0
  15. data/lib/aarch64/instructions/adds_addsub_ext.rb +35 -0
  16. data/lib/aarch64/instructions/adds_addsub_imm.rb +33 -0
  17. data/lib/aarch64/instructions/adds_addsub_shift.rb +35 -0
  18. data/lib/aarch64/instructions/adr.rb +28 -0
  19. data/lib/aarch64/instructions/adrp.rb +28 -0
  20. data/lib/aarch64/instructions/and_log_imm.rb +35 -0
  21. data/lib/aarch64/instructions/and_log_shift.rb +35 -0
  22. data/lib/aarch64/instructions/ands_log_imm.rb +35 -0
  23. data/lib/aarch64/instructions/ands_log_shift.rb +35 -0
  24. data/lib/aarch64/instructions/asrv.rb +31 -0
  25. data/lib/aarch64/instructions/autda.rb +32 -0
  26. data/lib/aarch64/instructions/autdb.rb +32 -0
  27. data/lib/aarch64/instructions/autia.rb +35 -0
  28. data/lib/aarch64/instructions/autib.rb +35 -0
  29. data/lib/aarch64/instructions/axflag.rb +18 -0
  30. data/lib/aarch64/instructions/b_cond.rb +26 -0
  31. data/lib/aarch64/instructions/b_uncond.rb +24 -0
  32. data/lib/aarch64/instructions/bc_cond.rb +26 -0
  33. data/lib/aarch64/instructions/bfm.rb +34 -0
  34. data/lib/aarch64/instructions/bic_log_shift.rb +35 -0
  35. data/lib/aarch64/instructions/bics.rb +35 -0
  36. data/lib/aarch64/instructions/bl.rb +24 -0
  37. data/lib/aarch64/instructions/blr.rb +24 -0
  38. data/lib/aarch64/instructions/blra.rb +33 -0
  39. data/lib/aarch64/instructions/br.rb +24 -0
  40. data/lib/aarch64/instructions/bra.rb +33 -0
  41. data/lib/aarch64/instructions/brk.rb +24 -0
  42. data/lib/aarch64/instructions/bti.rb +24 -0
  43. data/lib/aarch64/instructions/cas.rb +41 -0
  44. data/lib/aarch64/instructions/casb.rb +35 -0
  45. data/lib/aarch64/instructions/cash.rb +35 -0
  46. data/lib/aarch64/instructions/casp.rb +41 -0
  47. data/lib/aarch64/instructions/cbnz.rb +29 -0
  48. data/lib/aarch64/instructions/cbz.rb +29 -0
  49. data/lib/aarch64/instructions/ccmn_imm.rb +33 -0
  50. data/lib/aarch64/instructions/ccmn_reg.rb +33 -0
  51. data/lib/aarch64/instructions/ccmp_imm.rb +33 -0
  52. data/lib/aarch64/instructions/ccmp_reg.rb +33 -0
  53. data/lib/aarch64/instructions/cfinv.rb +19 -0
  54. data/lib/aarch64/instructions/clrex.rb +24 -0
  55. data/lib/aarch64/instructions/cls_int.rb +29 -0
  56. data/lib/aarch64/instructions/clz_int.rb +29 -0
  57. data/lib/aarch64/instructions/crc32.rb +35 -0
  58. data/lib/aarch64/instructions/crc32c.rb +35 -0
  59. data/lib/aarch64/instructions/csdb.rb +19 -0
  60. data/lib/aarch64/instructions/csel.rb +33 -0
  61. data/lib/aarch64/instructions/csinc.rb +33 -0
  62. data/lib/aarch64/instructions/csinv.rb +33 -0
  63. data/lib/aarch64/instructions/csneg.rb +33 -0
  64. data/lib/aarch64/instructions/dcps.rb +26 -0
  65. data/lib/aarch64/instructions/dgh.rb +19 -0
  66. data/lib/aarch64/instructions/dmb.rb +24 -0
  67. data/lib/aarch64/instructions/drps.rb +19 -0
  68. data/lib/aarch64/instructions/dsb.rb +25 -0
  69. data/lib/aarch64/instructions/eon.rb +35 -0
  70. data/lib/aarch64/instructions/eor_log_imm.rb +35 -0
  71. data/lib/aarch64/instructions/eor_log_shift.rb +35 -0
  72. data/lib/aarch64/instructions/eret.rb +19 -0
  73. data/lib/aarch64/instructions/ereta.rb +25 -0
  74. data/lib/aarch64/instructions/esb.rb +19 -0
  75. data/lib/aarch64/instructions/extr.rb +34 -0
  76. data/lib/aarch64/instructions/gmi.rb +28 -0
  77. data/lib/aarch64/instructions/hint.rb +26 -0
  78. data/lib/aarch64/instructions/hlt.rb +24 -0
  79. data/lib/aarch64/instructions/hvc.rb +24 -0
  80. data/lib/aarch64/instructions/irg.rb +28 -0
  81. data/lib/aarch64/instructions/isb.rb +24 -0
  82. data/lib/aarch64/instructions/ld64b.rb +26 -0
  83. data/lib/aarch64/instructions/ldadd.rb +41 -0
  84. data/lib/aarch64/instructions/ldaddb.rb +35 -0
  85. data/lib/aarch64/instructions/ldaddh.rb +35 -0
  86. data/lib/aarch64/instructions/ldapr.rb +29 -0
  87. data/lib/aarch64/instructions/ldaprb.rb +26 -0
  88. data/lib/aarch64/instructions/ldaprh.rb +26 -0
  89. data/lib/aarch64/instructions/ldapur_gen.rb +33 -0
  90. data/lib/aarch64/instructions/ldar.rb +29 -0
  91. data/lib/aarch64/instructions/ldaxp.rb +31 -0
  92. data/lib/aarch64/instructions/ldaxr.rb +29 -0
  93. data/lib/aarch64/instructions/ldclr.rb +41 -0
  94. data/lib/aarch64/instructions/ldclrb.rb +37 -0
  95. data/lib/aarch64/instructions/ldeor.rb +41 -0
  96. data/lib/aarch64/instructions/ldg.rb +28 -0
  97. data/lib/aarch64/instructions/ldgm.rb +26 -0
  98. data/lib/aarch64/instructions/ldlar.rb +29 -0
  99. data/lib/aarch64/instructions/ldnp_gen.rb +33 -0
  100. data/lib/aarch64/instructions/ldp_gen.rb +39 -0
  101. data/lib/aarch64/instructions/ldpsw.rb +34 -0
  102. data/lib/aarch64/instructions/ldr_imm_gen.rb +35 -0
  103. data/lib/aarch64/instructions/ldr_imm_unsigned.rb +31 -0
  104. data/lib/aarch64/instructions/ldr_lit_gen.rb +29 -0
  105. data/lib/aarch64/instructions/ldr_reg_gen.rb +35 -0
  106. data/lib/aarch64/instructions/ldra.rb +37 -0
  107. data/lib/aarch64/instructions/ldrb_imm.rb +32 -0
  108. data/lib/aarch64/instructions/ldrb_reg.rb +33 -0
  109. data/lib/aarch64/instructions/ldrb_unsigned.rb +28 -0
  110. data/lib/aarch64/instructions/ldrh_imm.rb +32 -0
  111. data/lib/aarch64/instructions/ldrh_reg.rb +32 -0
  112. data/lib/aarch64/instructions/ldrh_unsigned.rb +28 -0
  113. data/lib/aarch64/instructions/ldrsb_imm.rb +37 -0
  114. data/lib/aarch64/instructions/ldrsb_reg.rb +37 -0
  115. data/lib/aarch64/instructions/ldrsb_unsigned.rb +35 -0
  116. data/lib/aarch64/instructions/ldrsh_imm.rb +37 -0
  117. data/lib/aarch64/instructions/ldrsh_reg.rb +35 -0
  118. data/lib/aarch64/instructions/ldrsh_unsigned.rb +31 -0
  119. data/lib/aarch64/instructions/ldrsw_imm.rb +32 -0
  120. data/lib/aarch64/instructions/ldrsw_lit.rb +26 -0
  121. data/lib/aarch64/instructions/ldrsw_reg.rb +32 -0
  122. data/lib/aarch64/instructions/ldrsw_unsigned.rb +30 -0
  123. data/lib/aarch64/instructions/ldset.rb +41 -0
  124. data/lib/aarch64/instructions/ldsetb.rb +35 -0
  125. data/lib/aarch64/instructions/ldseth.rb +35 -0
  126. data/lib/aarch64/instructions/ldsmax.rb +41 -0
  127. data/lib/aarch64/instructions/ldsmaxb.rb +35 -0
  128. data/lib/aarch64/instructions/ldsmaxh.rb +35 -0
  129. data/lib/aarch64/instructions/ldsmin.rb +41 -0
  130. data/lib/aarch64/instructions/ldsminb.rb +35 -0
  131. data/lib/aarch64/instructions/ldsminh.rb +35 -0
  132. data/lib/aarch64/instructions/ldtr.rb +31 -0
  133. data/lib/aarch64/instructions/ldtrb.rb +28 -0
  134. data/lib/aarch64/instructions/ldtrh.rb +28 -0
  135. data/lib/aarch64/instructions/ldtrsb.rb +31 -0
  136. data/lib/aarch64/instructions/ldtrsh.rb +31 -0
  137. data/lib/aarch64/instructions/ldtrsw.rb +28 -0
  138. data/lib/aarch64/instructions/ldumax.rb +41 -0
  139. data/lib/aarch64/instructions/ldumaxb.rb +35 -0
  140. data/lib/aarch64/instructions/ldumaxh.rb +35 -0
  141. data/lib/aarch64/instructions/ldumin.rb +41 -0
  142. data/lib/aarch64/instructions/lduminb.rb +35 -0
  143. data/lib/aarch64/instructions/lduminh.rb +35 -0
  144. data/lib/aarch64/instructions/ldur_gen.rb +31 -0
  145. data/lib/aarch64/instructions/ldursb.rb +31 -0
  146. data/lib/aarch64/instructions/ldursh.rb +31 -0
  147. data/lib/aarch64/instructions/ldursw.rb +28 -0
  148. data/lib/aarch64/instructions/ldxp.rb +31 -0
  149. data/lib/aarch64/instructions/ldxr.rb +29 -0
  150. data/lib/aarch64/instructions/lslv.rb +31 -0
  151. data/lib/aarch64/instructions/lsrv.rb +31 -0
  152. data/lib/aarch64/instructions/madd.rb +33 -0
  153. data/lib/aarch64/instructions/movk.rb +31 -0
  154. data/lib/aarch64/instructions/movn.rb +31 -0
  155. data/lib/aarch64/instructions/movz.rb +31 -0
  156. data/lib/aarch64/instructions/mrs.rb +34 -0
  157. data/lib/aarch64/instructions/msr_imm.rb +28 -0
  158. data/lib/aarch64/instructions/msr_reg.rb +34 -0
  159. data/lib/aarch64/instructions/msub.rb +33 -0
  160. data/lib/aarch64/instructions/nop.rb +19 -0
  161. data/lib/aarch64/instructions/orn_log_shift.rb +35 -0
  162. data/lib/aarch64/instructions/orr_log_imm.rb +35 -0
  163. data/lib/aarch64/instructions/orr_log_shift.rb +35 -0
  164. data/lib/aarch64/instructions/pacda.rb +29 -0
  165. data/lib/aarch64/instructions/pacdb.rb +29 -0
  166. data/lib/aarch64/instructions/pacga.rb +28 -0
  167. data/lib/aarch64/instructions/pacia.rb +32 -0
  168. data/lib/aarch64/instructions/pacia2.rb +28 -0
  169. data/lib/aarch64/instructions/pacib.rb +32 -0
  170. data/lib/aarch64/instructions/prfm_imm.rb +28 -0
  171. data/lib/aarch64/instructions/prfm_lit.rb +26 -0
  172. data/lib/aarch64/instructions/prfm_reg.rb +32 -0
  173. data/lib/aarch64/instructions/prfum.rb +28 -0
  174. data/lib/aarch64/instructions/psb.rb +19 -0
  175. data/lib/aarch64/instructions/rbit_int.rb +29 -0
  176. data/lib/aarch64/instructions/ret.rb +24 -0
  177. data/lib/aarch64/instructions/reta.rb +25 -0
  178. data/lib/aarch64/instructions/rev.rb +31 -0
  179. data/lib/aarch64/instructions/rmif.rb +28 -0
  180. data/lib/aarch64/instructions/rorv.rb +31 -0
  181. data/lib/aarch64/instructions/sb.rb +19 -0
  182. data/lib/aarch64/instructions/sbc.rb +31 -0
  183. data/lib/aarch64/instructions/sbcs.rb +31 -0
  184. data/lib/aarch64/instructions/sbfm.rb +34 -0
  185. data/lib/aarch64/instructions/sdiv.rb +31 -0
  186. data/lib/aarch64/instructions/setf.rb +27 -0
  187. data/lib/aarch64/instructions/setgp.rb +25 -0
  188. data/lib/aarch64/instructions/setgpn.rb +25 -0
  189. data/lib/aarch64/instructions/setgpt.rb +25 -0
  190. data/lib/aarch64/instructions/setgptn.rb +25 -0
  191. data/lib/aarch64/instructions/setp.rb +25 -0
  192. data/lib/aarch64/instructions/setpn.rb +25 -0
  193. data/lib/aarch64/instructions/setpt.rb +25 -0
  194. data/lib/aarch64/instructions/setptn.rb +25 -0
  195. data/lib/aarch64/instructions/sev.rb +18 -0
  196. data/lib/aarch64/instructions/sevl.rb +18 -0
  197. data/lib/aarch64/instructions/smaddl.rb +30 -0
  198. data/lib/aarch64/instructions/smc.rb +24 -0
  199. data/lib/aarch64/instructions/smsubl.rb +30 -0
  200. data/lib/aarch64/instructions/smulh.rb +28 -0
  201. data/lib/aarch64/instructions/st2g.rb +32 -0
  202. data/lib/aarch64/instructions/st64b.rb +26 -0
  203. data/lib/aarch64/instructions/st64bv.rb +28 -0
  204. data/lib/aarch64/instructions/st64bv0.rb +28 -0
  205. data/lib/aarch64/instructions/stg.rb +32 -0
  206. data/lib/aarch64/instructions/stgm.rb +26 -0
  207. data/lib/aarch64/instructions/stgp.rb +34 -0
  208. data/lib/aarch64/instructions/stllr.rb +29 -0
  209. data/lib/aarch64/instructions/stllrb.rb +26 -0
  210. data/lib/aarch64/instructions/stllrh.rb +26 -0
  211. data/lib/aarch64/instructions/stlr.rb +29 -0
  212. data/lib/aarch64/instructions/stlrb.rb +26 -0
  213. data/lib/aarch64/instructions/stlrh.rb +26 -0
  214. data/lib/aarch64/instructions/stlur_gen.rb +31 -0
  215. data/lib/aarch64/instructions/stlxp.rb +33 -0
  216. data/lib/aarch64/instructions/stlxr.rb +31 -0
  217. data/lib/aarch64/instructions/stlxrb.rb +28 -0
  218. data/lib/aarch64/instructions/stlxrh.rb +28 -0
  219. data/lib/aarch64/instructions/stnp_gen.rb +33 -0
  220. data/lib/aarch64/instructions/stp_gen.rb +39 -0
  221. data/lib/aarch64/instructions/str_imm_gen.rb +37 -0
  222. data/lib/aarch64/instructions/str_imm_unsigned.rb +31 -0
  223. data/lib/aarch64/instructions/str_reg_gen.rb +35 -0
  224. data/lib/aarch64/instructions/strb_imm.rb +32 -0
  225. data/lib/aarch64/instructions/strb_imm_unsigned.rb +28 -0
  226. data/lib/aarch64/instructions/strb_reg.rb +33 -0
  227. data/lib/aarch64/instructions/strh_imm.rb +32 -0
  228. data/lib/aarch64/instructions/strh_imm_unsigned.rb +28 -0
  229. data/lib/aarch64/instructions/strh_reg.rb +32 -0
  230. data/lib/aarch64/instructions/sttr.rb +31 -0
  231. data/lib/aarch64/instructions/stur_gen.rb +31 -0
  232. data/lib/aarch64/instructions/stxp.rb +33 -0
  233. data/lib/aarch64/instructions/stxr.rb +31 -0
  234. data/lib/aarch64/instructions/stxrb.rb +28 -0
  235. data/lib/aarch64/instructions/stxrh.rb +28 -0
  236. data/lib/aarch64/instructions/stz2g.rb +32 -0
  237. data/lib/aarch64/instructions/stzg.rb +32 -0
  238. data/lib/aarch64/instructions/stzgm.rb +26 -0
  239. data/lib/aarch64/instructions/sub_addsub_ext.rb +35 -0
  240. data/lib/aarch64/instructions/sub_addsub_imm.rb +33 -0
  241. data/lib/aarch64/instructions/sub_addsub_shift.rb +35 -0
  242. data/lib/aarch64/instructions/subg.rb +30 -0
  243. data/lib/aarch64/instructions/subp.rb +28 -0
  244. data/lib/aarch64/instructions/subps.rb +28 -0
  245. data/lib/aarch64/instructions/subs_addsub_ext.rb +35 -0
  246. data/lib/aarch64/instructions/subs_addsub_imm.rb +33 -0
  247. data/lib/aarch64/instructions/subs_addsub_shift.rb +35 -0
  248. data/lib/aarch64/instructions/svc.rb +24 -0
  249. data/lib/aarch64/instructions/swp.rb +41 -0
  250. data/lib/aarch64/instructions/swpb.rb +35 -0
  251. data/lib/aarch64/instructions/swph.rb +35 -0
  252. data/lib/aarch64/instructions/sys.rb +32 -0
  253. data/lib/aarch64/instructions/sysl.rb +32 -0
  254. data/lib/aarch64/instructions/tbnz.rb +30 -0
  255. data/lib/aarch64/instructions/tbz.rb +30 -0
  256. data/lib/aarch64/instructions/tsb.rb +18 -0
  257. data/lib/aarch64/instructions/ubfm.rb +34 -0
  258. data/lib/aarch64/instructions/udf_perm_undef.rb +24 -0
  259. data/lib/aarch64/instructions/udiv.rb +31 -0
  260. data/lib/aarch64/instructions/umaddl.rb +30 -0
  261. data/lib/aarch64/instructions/umsubl.rb +30 -0
  262. data/lib/aarch64/instructions/umulh.rb +28 -0
  263. data/lib/aarch64/instructions/wfe.rb +19 -0
  264. data/lib/aarch64/instructions/wfet.rb +24 -0
  265. data/lib/aarch64/instructions/wfi.rb +19 -0
  266. data/lib/aarch64/instructions/wfit.rb +24 -0
  267. data/lib/aarch64/instructions/xaflag.rb +19 -0
  268. data/lib/aarch64/instructions/xpac.rb +28 -0
  269. data/lib/aarch64/instructions/xpaclri.rb +18 -0
  270. data/lib/aarch64/instructions/yield.rb +19 -0
  271. data/lib/aarch64/instructions.rb +266 -0
  272. data/lib/aarch64/system_registers/mrs_msr_64.rb +395 -0
  273. data/lib/aarch64/utils.rb +325 -0
  274. data/lib/aarch64/version.rb +3 -0
  275. data/lib/aarch64.rb +2857 -0
  276. data/test/all_adds_test.rb +129 -0
  277. data/test/base_instructions_test.rb +9263 -0
  278. data/test/dsl_test.rb +11 -0
  279. data/test/helper.rb +51 -0
  280. data/test/not_supported_yet_test.rb +55 -0
  281. metadata +382 -0
data/test/dsl_test.rb ADDED
@@ -0,0 +1,11 @@
1
+ require "helper"
2
+
3
+ class DSLTest < AArch64::Test
4
+ def test_dsl_has_methods
5
+ assert_bytes [0x9f,0x08,0x25,0xab] do |asm|
6
+ asm.pretty do
7
+ asm.cmn x4, w5, uxtb(2)
8
+ end
9
+ end
10
+ end
11
+ end
data/test/helper.rb ADDED
@@ -0,0 +1,51 @@
1
+ require "aarch64"
2
+ require "minitest/autorun"
3
+ require "hatstone"
4
+ require "stringio"
5
+
6
+ module AArch64
7
+ class Test < Minitest::Test
8
+ def disasm code
9
+ hs = Hatstone.new(Hatstone::ARCH_ARM64, Hatstone::MODE_ARM)
10
+ hs.disasm(code, 0x0)
11
+ end
12
+
13
+ def f str
14
+ str.split(" ").map { |x| x.to_i(16) }
15
+ end
16
+
17
+ def assert_bytes bytes
18
+ asm = Assembler.new
19
+ yield asm
20
+ jit_buffer = StringIO.new
21
+ asm.write_to jit_buffer
22
+ if false
23
+ actual_bin = sprintf("%032b", jit_buffer.string.unpack1("L<")).gsub(/([01]{4})/, '\1_').sub(/_$/, '')
24
+ expected_bin = sprintf("%032b", bytes.pack("C4").unpack1("L<")).gsub(/([01]{4})/, '\1_').sub(/_$/, '')
25
+ assert_equal expected_bin, actual_bin
26
+ end
27
+ assert_equal bytes, jit_buffer.string.bytes
28
+ end
29
+
30
+ def assert_insn binary, asm:
31
+ insns = disasm(binary)
32
+ assert_equal 1, insns.length
33
+ insn = insns.first
34
+ assert_equal asm, [insn.mnemonic, insn.op_str].reject(&:empty?).join(" ")
35
+ end
36
+
37
+ def assert_one_insn asm_str
38
+ asm = self.asm
39
+
40
+ if block_given?
41
+ asm = Assembler.new
42
+ yield asm
43
+ end
44
+
45
+ jit_buffer = StringIO.new
46
+ asm.write_to jit_buffer
47
+
48
+ assert_insn(jit_buffer.string, asm: asm_str)
49
+ end
50
+ end
51
+ end
@@ -0,0 +1,55 @@
1
+ require "helper"
2
+
3
+ class NotSupportedYetTest < AArch64::Test
4
+ def setup
5
+ skip "These aren't supported by clang"
6
+ end
7
+
8
+ def test_SETGP
9
+ # SETGE [<Xd>]!, <Xn>!, <Xs>
10
+ # SETGM [<Xd>]!, <Xn>!, <Xs>
11
+ # SETGP [<Xd>]!, <Xn>!, <Xs>
12
+ end
13
+
14
+ def test_SETGPN
15
+ # SETGEN [<Xd>]!, <Xn>!, <Xs>
16
+ # SETGMN [<Xd>]!, <Xn>!, <Xs>
17
+ # SETGPN [<Xd>]!, <Xn>!, <Xs>
18
+ end
19
+
20
+ def test_SETGPT
21
+ # SETGET [<Xd>]!, <Xn>!, <Xs>
22
+ # SETGMT [<Xd>]!, <Xn>!, <Xs>
23
+ # SETGPT [<Xd>]!, <Xn>!, <Xs>
24
+ end
25
+
26
+ def test_SETGPTN
27
+ # SETGETN [<Xd>]!, <Xn>!, <Xs>
28
+ # SETGMTN [<Xd>]!, <Xn>!, <Xs>
29
+ # SETGPTN [<Xd>]!, <Xn>!, <Xs>
30
+ end
31
+
32
+ def test_SETP
33
+ # SETE [<Xd>]!, <Xn>!, <Xs>
34
+ # SETM [<Xd>]!, <Xn>!, <Xs>
35
+ # SETP [<Xd>]!, <Xn>!, <Xs>
36
+ end
37
+
38
+ def test_SETPN
39
+ # SETEN [<Xd>]!, <Xn>!, <Xs>
40
+ # SETMN [<Xd>]!, <Xn>!, <Xs>
41
+ # SETPN [<Xd>]!, <Xn>!, <Xs>
42
+ end
43
+
44
+ def test_SETPT
45
+ # SETET [<Xd>]!, <Xn>!, <Xs>
46
+ # SETMT [<Xd>]!, <Xn>!, <Xs>
47
+ # SETPT [<Xd>]!, <Xn>!, <Xs>
48
+ end
49
+
50
+ def test_SETPTN
51
+ # SETETN [<Xd>]!, <Xn>!, <Xs>
52
+ # SETMTN [<Xd>]!, <Xn>!, <Xs>
53
+ # SETPTN [<Xd>]!, <Xn>!, <Xs>
54
+ end
55
+ end
metadata ADDED
@@ -0,0 +1,382 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: aarch64
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Aaron Patterson
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2022-04-26 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: hatstone
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: 1.0.0
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: 1.0.0
27
+ - !ruby/object:Gem::Dependency
28
+ name: jit_buffer
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: 1.0.0
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: 1.0.0
41
+ - !ruby/object:Gem::Dependency
42
+ name: minitest
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '5.15'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '5.15'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rake
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '13.0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '13.0'
69
+ description: Tired of writing Ruby in Ruby? Now you can write ARM64 assembly in Ruby!
70
+ email: tenderlove@ruby-lang.org
71
+ executables: []
72
+ extensions: []
73
+ extra_rdoc_files: []
74
+ files:
75
+ - CODE_OF_CONDUCT.md
76
+ - Gemfile
77
+ - LICENSE
78
+ - README.md
79
+ - Rakefile
80
+ - aarch64.gemspec
81
+ - bin/build_instructions.rb
82
+ - lib/aarch64.rb
83
+ - lib/aarch64/instructions.rb
84
+ - lib/aarch64/instructions/adc.rb
85
+ - lib/aarch64/instructions/adcs.rb
86
+ - lib/aarch64/instructions/add_addsub_ext.rb
87
+ - lib/aarch64/instructions/add_addsub_imm.rb
88
+ - lib/aarch64/instructions/add_addsub_shift.rb
89
+ - lib/aarch64/instructions/addg.rb
90
+ - lib/aarch64/instructions/adds_addsub_ext.rb
91
+ - lib/aarch64/instructions/adds_addsub_imm.rb
92
+ - lib/aarch64/instructions/adds_addsub_shift.rb
93
+ - lib/aarch64/instructions/adr.rb
94
+ - lib/aarch64/instructions/adrp.rb
95
+ - lib/aarch64/instructions/and_log_imm.rb
96
+ - lib/aarch64/instructions/and_log_shift.rb
97
+ - lib/aarch64/instructions/ands_log_imm.rb
98
+ - lib/aarch64/instructions/ands_log_shift.rb
99
+ - lib/aarch64/instructions/asrv.rb
100
+ - lib/aarch64/instructions/autda.rb
101
+ - lib/aarch64/instructions/autdb.rb
102
+ - lib/aarch64/instructions/autia.rb
103
+ - lib/aarch64/instructions/autib.rb
104
+ - lib/aarch64/instructions/axflag.rb
105
+ - lib/aarch64/instructions/b_cond.rb
106
+ - lib/aarch64/instructions/b_uncond.rb
107
+ - lib/aarch64/instructions/bc_cond.rb
108
+ - lib/aarch64/instructions/bfm.rb
109
+ - lib/aarch64/instructions/bic_log_shift.rb
110
+ - lib/aarch64/instructions/bics.rb
111
+ - lib/aarch64/instructions/bl.rb
112
+ - lib/aarch64/instructions/blr.rb
113
+ - lib/aarch64/instructions/blra.rb
114
+ - lib/aarch64/instructions/br.rb
115
+ - lib/aarch64/instructions/bra.rb
116
+ - lib/aarch64/instructions/brk.rb
117
+ - lib/aarch64/instructions/bti.rb
118
+ - lib/aarch64/instructions/cas.rb
119
+ - lib/aarch64/instructions/casb.rb
120
+ - lib/aarch64/instructions/cash.rb
121
+ - lib/aarch64/instructions/casp.rb
122
+ - lib/aarch64/instructions/cbnz.rb
123
+ - lib/aarch64/instructions/cbz.rb
124
+ - lib/aarch64/instructions/ccmn_imm.rb
125
+ - lib/aarch64/instructions/ccmn_reg.rb
126
+ - lib/aarch64/instructions/ccmp_imm.rb
127
+ - lib/aarch64/instructions/ccmp_reg.rb
128
+ - lib/aarch64/instructions/cfinv.rb
129
+ - lib/aarch64/instructions/clrex.rb
130
+ - lib/aarch64/instructions/cls_int.rb
131
+ - lib/aarch64/instructions/clz_int.rb
132
+ - lib/aarch64/instructions/crc32.rb
133
+ - lib/aarch64/instructions/crc32c.rb
134
+ - lib/aarch64/instructions/csdb.rb
135
+ - lib/aarch64/instructions/csel.rb
136
+ - lib/aarch64/instructions/csinc.rb
137
+ - lib/aarch64/instructions/csinv.rb
138
+ - lib/aarch64/instructions/csneg.rb
139
+ - lib/aarch64/instructions/dcps.rb
140
+ - lib/aarch64/instructions/dgh.rb
141
+ - lib/aarch64/instructions/dmb.rb
142
+ - lib/aarch64/instructions/drps.rb
143
+ - lib/aarch64/instructions/dsb.rb
144
+ - lib/aarch64/instructions/eon.rb
145
+ - lib/aarch64/instructions/eor_log_imm.rb
146
+ - lib/aarch64/instructions/eor_log_shift.rb
147
+ - lib/aarch64/instructions/eret.rb
148
+ - lib/aarch64/instructions/ereta.rb
149
+ - lib/aarch64/instructions/esb.rb
150
+ - lib/aarch64/instructions/extr.rb
151
+ - lib/aarch64/instructions/gmi.rb
152
+ - lib/aarch64/instructions/hint.rb
153
+ - lib/aarch64/instructions/hlt.rb
154
+ - lib/aarch64/instructions/hvc.rb
155
+ - lib/aarch64/instructions/irg.rb
156
+ - lib/aarch64/instructions/isb.rb
157
+ - lib/aarch64/instructions/ld64b.rb
158
+ - lib/aarch64/instructions/ldadd.rb
159
+ - lib/aarch64/instructions/ldaddb.rb
160
+ - lib/aarch64/instructions/ldaddh.rb
161
+ - lib/aarch64/instructions/ldapr.rb
162
+ - lib/aarch64/instructions/ldaprb.rb
163
+ - lib/aarch64/instructions/ldaprh.rb
164
+ - lib/aarch64/instructions/ldapur_gen.rb
165
+ - lib/aarch64/instructions/ldar.rb
166
+ - lib/aarch64/instructions/ldaxp.rb
167
+ - lib/aarch64/instructions/ldaxr.rb
168
+ - lib/aarch64/instructions/ldclr.rb
169
+ - lib/aarch64/instructions/ldclrb.rb
170
+ - lib/aarch64/instructions/ldeor.rb
171
+ - lib/aarch64/instructions/ldg.rb
172
+ - lib/aarch64/instructions/ldgm.rb
173
+ - lib/aarch64/instructions/ldlar.rb
174
+ - lib/aarch64/instructions/ldnp_gen.rb
175
+ - lib/aarch64/instructions/ldp_gen.rb
176
+ - lib/aarch64/instructions/ldpsw.rb
177
+ - lib/aarch64/instructions/ldr_imm_gen.rb
178
+ - lib/aarch64/instructions/ldr_imm_unsigned.rb
179
+ - lib/aarch64/instructions/ldr_lit_gen.rb
180
+ - lib/aarch64/instructions/ldr_reg_gen.rb
181
+ - lib/aarch64/instructions/ldra.rb
182
+ - lib/aarch64/instructions/ldrb_imm.rb
183
+ - lib/aarch64/instructions/ldrb_reg.rb
184
+ - lib/aarch64/instructions/ldrb_unsigned.rb
185
+ - lib/aarch64/instructions/ldrh_imm.rb
186
+ - lib/aarch64/instructions/ldrh_reg.rb
187
+ - lib/aarch64/instructions/ldrh_unsigned.rb
188
+ - lib/aarch64/instructions/ldrsb_imm.rb
189
+ - lib/aarch64/instructions/ldrsb_reg.rb
190
+ - lib/aarch64/instructions/ldrsb_unsigned.rb
191
+ - lib/aarch64/instructions/ldrsh_imm.rb
192
+ - lib/aarch64/instructions/ldrsh_reg.rb
193
+ - lib/aarch64/instructions/ldrsh_unsigned.rb
194
+ - lib/aarch64/instructions/ldrsw_imm.rb
195
+ - lib/aarch64/instructions/ldrsw_lit.rb
196
+ - lib/aarch64/instructions/ldrsw_reg.rb
197
+ - lib/aarch64/instructions/ldrsw_unsigned.rb
198
+ - lib/aarch64/instructions/ldset.rb
199
+ - lib/aarch64/instructions/ldsetb.rb
200
+ - lib/aarch64/instructions/ldseth.rb
201
+ - lib/aarch64/instructions/ldsmax.rb
202
+ - lib/aarch64/instructions/ldsmaxb.rb
203
+ - lib/aarch64/instructions/ldsmaxh.rb
204
+ - lib/aarch64/instructions/ldsmin.rb
205
+ - lib/aarch64/instructions/ldsminb.rb
206
+ - lib/aarch64/instructions/ldsminh.rb
207
+ - lib/aarch64/instructions/ldtr.rb
208
+ - lib/aarch64/instructions/ldtrb.rb
209
+ - lib/aarch64/instructions/ldtrh.rb
210
+ - lib/aarch64/instructions/ldtrsb.rb
211
+ - lib/aarch64/instructions/ldtrsh.rb
212
+ - lib/aarch64/instructions/ldtrsw.rb
213
+ - lib/aarch64/instructions/ldumax.rb
214
+ - lib/aarch64/instructions/ldumaxb.rb
215
+ - lib/aarch64/instructions/ldumaxh.rb
216
+ - lib/aarch64/instructions/ldumin.rb
217
+ - lib/aarch64/instructions/lduminb.rb
218
+ - lib/aarch64/instructions/lduminh.rb
219
+ - lib/aarch64/instructions/ldur_gen.rb
220
+ - lib/aarch64/instructions/ldursb.rb
221
+ - lib/aarch64/instructions/ldursh.rb
222
+ - lib/aarch64/instructions/ldursw.rb
223
+ - lib/aarch64/instructions/ldxp.rb
224
+ - lib/aarch64/instructions/ldxr.rb
225
+ - lib/aarch64/instructions/lslv.rb
226
+ - lib/aarch64/instructions/lsrv.rb
227
+ - lib/aarch64/instructions/madd.rb
228
+ - lib/aarch64/instructions/movk.rb
229
+ - lib/aarch64/instructions/movn.rb
230
+ - lib/aarch64/instructions/movz.rb
231
+ - lib/aarch64/instructions/mrs.rb
232
+ - lib/aarch64/instructions/msr_imm.rb
233
+ - lib/aarch64/instructions/msr_reg.rb
234
+ - lib/aarch64/instructions/msub.rb
235
+ - lib/aarch64/instructions/nop.rb
236
+ - lib/aarch64/instructions/orn_log_shift.rb
237
+ - lib/aarch64/instructions/orr_log_imm.rb
238
+ - lib/aarch64/instructions/orr_log_shift.rb
239
+ - lib/aarch64/instructions/pacda.rb
240
+ - lib/aarch64/instructions/pacdb.rb
241
+ - lib/aarch64/instructions/pacga.rb
242
+ - lib/aarch64/instructions/pacia.rb
243
+ - lib/aarch64/instructions/pacia2.rb
244
+ - lib/aarch64/instructions/pacib.rb
245
+ - lib/aarch64/instructions/prfm_imm.rb
246
+ - lib/aarch64/instructions/prfm_lit.rb
247
+ - lib/aarch64/instructions/prfm_reg.rb
248
+ - lib/aarch64/instructions/prfum.rb
249
+ - lib/aarch64/instructions/psb.rb
250
+ - lib/aarch64/instructions/rbit_int.rb
251
+ - lib/aarch64/instructions/ret.rb
252
+ - lib/aarch64/instructions/reta.rb
253
+ - lib/aarch64/instructions/rev.rb
254
+ - lib/aarch64/instructions/rmif.rb
255
+ - lib/aarch64/instructions/rorv.rb
256
+ - lib/aarch64/instructions/sb.rb
257
+ - lib/aarch64/instructions/sbc.rb
258
+ - lib/aarch64/instructions/sbcs.rb
259
+ - lib/aarch64/instructions/sbfm.rb
260
+ - lib/aarch64/instructions/sdiv.rb
261
+ - lib/aarch64/instructions/setf.rb
262
+ - lib/aarch64/instructions/setgp.rb
263
+ - lib/aarch64/instructions/setgpn.rb
264
+ - lib/aarch64/instructions/setgpt.rb
265
+ - lib/aarch64/instructions/setgptn.rb
266
+ - lib/aarch64/instructions/setp.rb
267
+ - lib/aarch64/instructions/setpn.rb
268
+ - lib/aarch64/instructions/setpt.rb
269
+ - lib/aarch64/instructions/setptn.rb
270
+ - lib/aarch64/instructions/sev.rb
271
+ - lib/aarch64/instructions/sevl.rb
272
+ - lib/aarch64/instructions/smaddl.rb
273
+ - lib/aarch64/instructions/smc.rb
274
+ - lib/aarch64/instructions/smsubl.rb
275
+ - lib/aarch64/instructions/smulh.rb
276
+ - lib/aarch64/instructions/st2g.rb
277
+ - lib/aarch64/instructions/st64b.rb
278
+ - lib/aarch64/instructions/st64bv.rb
279
+ - lib/aarch64/instructions/st64bv0.rb
280
+ - lib/aarch64/instructions/stg.rb
281
+ - lib/aarch64/instructions/stgm.rb
282
+ - lib/aarch64/instructions/stgp.rb
283
+ - lib/aarch64/instructions/stllr.rb
284
+ - lib/aarch64/instructions/stllrb.rb
285
+ - lib/aarch64/instructions/stllrh.rb
286
+ - lib/aarch64/instructions/stlr.rb
287
+ - lib/aarch64/instructions/stlrb.rb
288
+ - lib/aarch64/instructions/stlrh.rb
289
+ - lib/aarch64/instructions/stlur_gen.rb
290
+ - lib/aarch64/instructions/stlxp.rb
291
+ - lib/aarch64/instructions/stlxr.rb
292
+ - lib/aarch64/instructions/stlxrb.rb
293
+ - lib/aarch64/instructions/stlxrh.rb
294
+ - lib/aarch64/instructions/stnp_gen.rb
295
+ - lib/aarch64/instructions/stp_gen.rb
296
+ - lib/aarch64/instructions/str_imm_gen.rb
297
+ - lib/aarch64/instructions/str_imm_unsigned.rb
298
+ - lib/aarch64/instructions/str_reg_gen.rb
299
+ - lib/aarch64/instructions/strb_imm.rb
300
+ - lib/aarch64/instructions/strb_imm_unsigned.rb
301
+ - lib/aarch64/instructions/strb_reg.rb
302
+ - lib/aarch64/instructions/strh_imm.rb
303
+ - lib/aarch64/instructions/strh_imm_unsigned.rb
304
+ - lib/aarch64/instructions/strh_reg.rb
305
+ - lib/aarch64/instructions/sttr.rb
306
+ - lib/aarch64/instructions/stur_gen.rb
307
+ - lib/aarch64/instructions/stxp.rb
308
+ - lib/aarch64/instructions/stxr.rb
309
+ - lib/aarch64/instructions/stxrb.rb
310
+ - lib/aarch64/instructions/stxrh.rb
311
+ - lib/aarch64/instructions/stz2g.rb
312
+ - lib/aarch64/instructions/stzg.rb
313
+ - lib/aarch64/instructions/stzgm.rb
314
+ - lib/aarch64/instructions/sub_addsub_ext.rb
315
+ - lib/aarch64/instructions/sub_addsub_imm.rb
316
+ - lib/aarch64/instructions/sub_addsub_shift.rb
317
+ - lib/aarch64/instructions/subg.rb
318
+ - lib/aarch64/instructions/subp.rb
319
+ - lib/aarch64/instructions/subps.rb
320
+ - lib/aarch64/instructions/subs_addsub_ext.rb
321
+ - lib/aarch64/instructions/subs_addsub_imm.rb
322
+ - lib/aarch64/instructions/subs_addsub_shift.rb
323
+ - lib/aarch64/instructions/svc.rb
324
+ - lib/aarch64/instructions/swp.rb
325
+ - lib/aarch64/instructions/swpb.rb
326
+ - lib/aarch64/instructions/swph.rb
327
+ - lib/aarch64/instructions/sys.rb
328
+ - lib/aarch64/instructions/sysl.rb
329
+ - lib/aarch64/instructions/tbnz.rb
330
+ - lib/aarch64/instructions/tbz.rb
331
+ - lib/aarch64/instructions/tsb.rb
332
+ - lib/aarch64/instructions/ubfm.rb
333
+ - lib/aarch64/instructions/udf_perm_undef.rb
334
+ - lib/aarch64/instructions/udiv.rb
335
+ - lib/aarch64/instructions/umaddl.rb
336
+ - lib/aarch64/instructions/umsubl.rb
337
+ - lib/aarch64/instructions/umulh.rb
338
+ - lib/aarch64/instructions/wfe.rb
339
+ - lib/aarch64/instructions/wfet.rb
340
+ - lib/aarch64/instructions/wfi.rb
341
+ - lib/aarch64/instructions/wfit.rb
342
+ - lib/aarch64/instructions/xaflag.rb
343
+ - lib/aarch64/instructions/xpac.rb
344
+ - lib/aarch64/instructions/xpaclri.rb
345
+ - lib/aarch64/instructions/yield.rb
346
+ - lib/aarch64/system_registers/mrs_msr_64.rb
347
+ - lib/aarch64/utils.rb
348
+ - lib/aarch64/version.rb
349
+ - test/all_adds_test.rb
350
+ - test/base_instructions_test.rb
351
+ - test/dsl_test.rb
352
+ - test/helper.rb
353
+ - test/not_supported_yet_test.rb
354
+ homepage: https://github.com/tenderlove/aarch64
355
+ licenses:
356
+ - Apache-2.0
357
+ metadata: {}
358
+ post_install_message:
359
+ rdoc_options: []
360
+ require_paths:
361
+ - lib
362
+ required_ruby_version: !ruby/object:Gem::Requirement
363
+ requirements:
364
+ - - ">="
365
+ - !ruby/object:Gem::Version
366
+ version: '0'
367
+ required_rubygems_version: !ruby/object:Gem::Requirement
368
+ requirements:
369
+ - - ">="
370
+ - !ruby/object:Gem::Version
371
+ version: '0'
372
+ requirements: []
373
+ rubygems_version: 3.4.0.dev
374
+ signing_key:
375
+ specification_version: 4
376
+ summary: Write ARM64 assembly in Ruby!
377
+ test_files:
378
+ - test/all_adds_test.rb
379
+ - test/base_instructions_test.rb
380
+ - test/dsl_test.rb
381
+ - test/helper.rb
382
+ - test/not_supported_yet_test.rb