aarch64 1.0.1 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/Rakefile +37 -0
- data/aarch64.gemspec +1 -0
- data/lib/aarch64/instructions/adc.rb +10 -10
- data/lib/aarch64/instructions/adcs.rb +10 -10
- data/lib/aarch64/instructions/add_addsub_ext.rb +14 -14
- data/lib/aarch64/instructions/add_addsub_imm.rb +12 -12
- data/lib/aarch64/instructions/add_addsub_shift.rb +14 -14
- data/lib/aarch64/instructions/addg.rb +10 -10
- data/lib/aarch64/instructions/adds_addsub_ext.rb +14 -14
- data/lib/aarch64/instructions/adds_addsub_imm.rb +12 -12
- data/lib/aarch64/instructions/adds_addsub_shift.rb +14 -14
- data/lib/aarch64/instructions/adr.rb +7 -7
- data/lib/aarch64/instructions/adrp.rb +7 -7
- data/lib/aarch64/instructions/and_log_imm.rb +14 -14
- data/lib/aarch64/instructions/and_log_shift.rb +14 -14
- data/lib/aarch64/instructions/ands_log_imm.rb +14 -14
- data/lib/aarch64/instructions/ands_log_shift.rb +14 -14
- data/lib/aarch64/instructions/asrv.rb +10 -10
- data/lib/aarch64/instructions/autda.rb +9 -12
- data/lib/aarch64/instructions/autdb.rb +9 -12
- data/lib/aarch64/instructions/autia.rb +9 -12
- data/lib/aarch64/instructions/autib.rb +9 -12
- data/lib/aarch64/instructions/axflag.rb +1 -1
- data/lib/aarch64/instructions/b_cond.rb +5 -5
- data/lib/aarch64/instructions/b_uncond.rb +3 -3
- data/lib/aarch64/instructions/bc_cond.rb +5 -5
- data/lib/aarch64/instructions/bfm.rb +13 -13
- data/lib/aarch64/instructions/bic_log_shift.rb +14 -14
- data/lib/aarch64/instructions/bics.rb +14 -14
- data/lib/aarch64/instructions/bl.rb +3 -3
- data/lib/aarch64/instructions/blr.rb +4 -4
- data/lib/aarch64/instructions/blra.rb +10 -10
- data/lib/aarch64/instructions/br.rb +4 -4
- data/lib/aarch64/instructions/bra.rb +10 -10
- data/lib/aarch64/instructions/brk.rb +3 -3
- data/lib/aarch64/instructions/bti.rb +3 -3
- data/lib/aarch64/instructions/cas.rb +14 -14
- data/lib/aarch64/instructions/casb.rb +12 -12
- data/lib/aarch64/instructions/cash.rb +12 -12
- data/lib/aarch64/instructions/casp.rb +14 -14
- data/lib/aarch64/instructions/cbnz.rb +7 -7
- data/lib/aarch64/instructions/cbz.rb +7 -7
- data/lib/aarch64/instructions/ccmn_imm.rb +12 -12
- data/lib/aarch64/instructions/ccmn_reg.rb +12 -12
- data/lib/aarch64/instructions/ccmp_imm.rb +12 -12
- data/lib/aarch64/instructions/ccmp_reg.rb +12 -12
- data/lib/aarch64/instructions/cfinv.rb +2 -9
- data/lib/aarch64/instructions/clrex.rb +3 -3
- data/lib/aarch64/instructions/cls_int.rb +8 -8
- data/lib/aarch64/instructions/clz_int.rb +8 -8
- data/lib/aarch64/instructions/crc32.rb +12 -12
- data/lib/aarch64/instructions/crc32c.rb +12 -12
- data/lib/aarch64/instructions/csdb.rb +1 -1
- data/lib/aarch64/instructions/csel.rb +12 -12
- data/lib/aarch64/instructions/csinc.rb +12 -12
- data/lib/aarch64/instructions/csinv.rb +12 -12
- data/lib/aarch64/instructions/csneg.rb +12 -12
- data/lib/aarch64/instructions/dcps.rb +5 -5
- data/lib/aarch64/instructions/dgh.rb +1 -1
- data/lib/aarch64/instructions/dmb.rb +3 -3
- data/lib/aarch64/instructions/drps.rb +2 -9
- data/lib/aarch64/instructions/dsb.rb +3 -3
- data/lib/aarch64/instructions/eon.rb +14 -14
- data/lib/aarch64/instructions/eor_log_imm.rb +14 -14
- data/lib/aarch64/instructions/eor_log_shift.rb +14 -14
- data/lib/aarch64/instructions/eret.rb +2 -9
- data/lib/aarch64/instructions/ereta.rb +3 -3
- data/lib/aarch64/instructions/esb.rb +1 -1
- data/lib/aarch64/instructions/extr.rb +13 -13
- data/lib/aarch64/instructions/gmi.rb +8 -8
- data/lib/aarch64/instructions/hint.rb +5 -5
- data/lib/aarch64/instructions/hlt.rb +3 -3
- data/lib/aarch64/instructions/hvc.rb +3 -3
- data/lib/aarch64/instructions/irg.rb +8 -8
- data/lib/aarch64/instructions/isb.rb +3 -3
- data/lib/aarch64/instructions/ld64b.rb +6 -6
- data/lib/aarch64/instructions/ldadd.rb +14 -14
- data/lib/aarch64/instructions/ldaddb.rb +12 -12
- data/lib/aarch64/instructions/ldaddh.rb +12 -12
- data/lib/aarch64/instructions/ldapr.rb +8 -8
- data/lib/aarch64/instructions/ldaprb.rb +6 -6
- data/lib/aarch64/instructions/ldaprh.rb +6 -6
- data/lib/aarch64/instructions/ldapur_gen.rb +12 -12
- data/lib/aarch64/instructions/ldar.rb +8 -8
- data/lib/aarch64/instructions/ldaxp.rb +10 -10
- data/lib/aarch64/instructions/ldaxr.rb +8 -8
- data/lib/aarch64/instructions/ldclr.rb +14 -14
- data/lib/aarch64/instructions/ldclrb.rb +14 -14
- data/lib/aarch64/instructions/ldeor.rb +14 -14
- data/lib/aarch64/instructions/ldg.rb +8 -8
- data/lib/aarch64/instructions/ldgm.rb +6 -6
- data/lib/aarch64/instructions/ldlar.rb +8 -8
- data/lib/aarch64/instructions/ldnp_gen.rb +12 -12
- data/lib/aarch64/instructions/ldp_gen.rb +14 -14
- data/lib/aarch64/instructions/ldpsw.rb +12 -12
- data/lib/aarch64/instructions/ldr_imm_gen.rb +12 -12
- data/lib/aarch64/instructions/ldr_imm_unsigned.rb +10 -10
- data/lib/aarch64/instructions/ldr_lit_gen.rb +7 -7
- data/lib/aarch64/instructions/ldr_reg_gen.rb +14 -14
- data/lib/aarch64/instructions/ldra.rb +14 -14
- data/lib/aarch64/instructions/ldrb_imm.rb +10 -10
- data/lib/aarch64/instructions/ldrb_reg.rb +12 -12
- data/lib/aarch64/instructions/ldrb_unsigned.rb +8 -8
- data/lib/aarch64/instructions/ldrh_imm.rb +10 -10
- data/lib/aarch64/instructions/ldrh_reg.rb +12 -12
- data/lib/aarch64/instructions/ldrh_unsigned.rb +8 -8
- data/lib/aarch64/instructions/ldrsb_imm.rb +12 -12
- data/lib/aarch64/instructions/ldrsb_reg.rb +14 -14
- data/lib/aarch64/instructions/ldrsb_unsigned.rb +10 -10
- data/lib/aarch64/instructions/ldrsh_imm.rb +12 -12
- data/lib/aarch64/instructions/ldrsh_reg.rb +14 -14
- data/lib/aarch64/instructions/ldrsh_unsigned.rb +10 -10
- data/lib/aarch64/instructions/ldrsw_imm.rb +10 -10
- data/lib/aarch64/instructions/ldrsw_lit.rb +5 -5
- data/lib/aarch64/instructions/ldrsw_reg.rb +12 -12
- data/lib/aarch64/instructions/ldrsw_unsigned.rb +8 -8
- data/lib/aarch64/instructions/ldset.rb +14 -14
- data/lib/aarch64/instructions/ldsetb.rb +12 -12
- data/lib/aarch64/instructions/ldseth.rb +12 -12
- data/lib/aarch64/instructions/ldsmax.rb +14 -14
- data/lib/aarch64/instructions/ldsmaxb.rb +12 -12
- data/lib/aarch64/instructions/ldsmaxh.rb +12 -12
- data/lib/aarch64/instructions/ldsmin.rb +14 -14
- data/lib/aarch64/instructions/ldsminb.rb +12 -12
- data/lib/aarch64/instructions/ldsminh.rb +12 -12
- data/lib/aarch64/instructions/ldtr.rb +10 -10
- data/lib/aarch64/instructions/ldtrb.rb +8 -8
- data/lib/aarch64/instructions/ldtrh.rb +8 -8
- data/lib/aarch64/instructions/ldtrsb.rb +10 -10
- data/lib/aarch64/instructions/ldtrsh.rb +10 -10
- data/lib/aarch64/instructions/ldtrsw.rb +8 -8
- data/lib/aarch64/instructions/ldumax.rb +14 -14
- data/lib/aarch64/instructions/ldumaxb.rb +12 -12
- data/lib/aarch64/instructions/ldumaxh.rb +12 -12
- data/lib/aarch64/instructions/ldumin.rb +14 -14
- data/lib/aarch64/instructions/lduminb.rb +12 -12
- data/lib/aarch64/instructions/lduminh.rb +12 -12
- data/lib/aarch64/instructions/ldur_gen.rb +10 -10
- data/lib/aarch64/instructions/ldursb.rb +10 -10
- data/lib/aarch64/instructions/ldursh.rb +10 -10
- data/lib/aarch64/instructions/ldursw.rb +8 -8
- data/lib/aarch64/instructions/ldxp.rb +10 -10
- data/lib/aarch64/instructions/ldxr.rb +8 -8
- data/lib/aarch64/instructions/lslv.rb +10 -10
- data/lib/aarch64/instructions/lsrv.rb +10 -10
- data/lib/aarch64/instructions/madd.rb +12 -12
- data/lib/aarch64/instructions/movk.rb +10 -10
- data/lib/aarch64/instructions/movn.rb +10 -10
- data/lib/aarch64/instructions/movz.rb +10 -10
- data/lib/aarch64/instructions/mrs.rb +14 -14
- data/lib/aarch64/instructions/msr_imm.rb +7 -7
- data/lib/aarch64/instructions/msr_reg.rb +14 -14
- data/lib/aarch64/instructions/msub.rb +12 -12
- data/lib/aarch64/instructions/nop.rb +1 -1
- data/lib/aarch64/instructions/orn_log_shift.rb +14 -14
- data/lib/aarch64/instructions/orr_log_imm.rb +14 -14
- data/lib/aarch64/instructions/orr_log_shift.rb +14 -14
- data/lib/aarch64/instructions/pacda.rb +8 -8
- data/lib/aarch64/instructions/pacdb.rb +8 -8
- data/lib/aarch64/instructions/pacga.rb +8 -8
- data/lib/aarch64/instructions/pacia.rb +8 -8
- data/lib/aarch64/instructions/pacia2.rb +5 -5
- data/lib/aarch64/instructions/pacib.rb +8 -8
- data/lib/aarch64/instructions/prfm_imm.rb +8 -8
- data/lib/aarch64/instructions/prfm_lit.rb +8 -8
- data/lib/aarch64/instructions/prfm_reg.rb +12 -12
- data/lib/aarch64/instructions/prfum.rb +8 -8
- data/lib/aarch64/instructions/psb.rb +2 -9
- data/lib/aarch64/instructions/rbit_int.rb +8 -8
- data/lib/aarch64/instructions/ret.rb +4 -4
- data/lib/aarch64/instructions/reta.rb +3 -3
- data/lib/aarch64/instructions/rev.rb +10 -10
- data/lib/aarch64/instructions/rmif.rb +8 -8
- data/lib/aarch64/instructions/rorv.rb +10 -10
- data/lib/aarch64/instructions/sb.rb +1 -1
- data/lib/aarch64/instructions/sbc.rb +10 -10
- data/lib/aarch64/instructions/sbcs.rb +10 -10
- data/lib/aarch64/instructions/sbfm.rb +13 -13
- data/lib/aarch64/instructions/sdiv.rb +10 -10
- data/lib/aarch64/instructions/setf.rb +6 -6
- data/lib/aarch64/instructions/sev.rb +1 -7
- data/lib/aarch64/instructions/sevl.rb +1 -1
- data/lib/aarch64/instructions/smaddl.rb +10 -10
- data/lib/aarch64/instructions/smc.rb +3 -3
- data/lib/aarch64/instructions/smsubl.rb +10 -10
- data/lib/aarch64/instructions/smulh.rb +8 -8
- data/lib/aarch64/instructions/st2g.rb +10 -10
- data/lib/aarch64/instructions/st64b.rb +6 -6
- data/lib/aarch64/instructions/st64bv.rb +8 -8
- data/lib/aarch64/instructions/st64bv0.rb +8 -8
- data/lib/aarch64/instructions/stg.rb +10 -10
- data/lib/aarch64/instructions/stgm.rb +6 -6
- data/lib/aarch64/instructions/stgp.rb +12 -12
- data/lib/aarch64/instructions/stllr.rb +8 -8
- data/lib/aarch64/instructions/stllrb.rb +6 -6
- data/lib/aarch64/instructions/stllrh.rb +6 -6
- data/lib/aarch64/instructions/stlr.rb +8 -8
- data/lib/aarch64/instructions/stlrb.rb +6 -6
- data/lib/aarch64/instructions/stlrh.rb +6 -6
- data/lib/aarch64/instructions/stlur_gen.rb +10 -10
- data/lib/aarch64/instructions/stlxp.rb +12 -12
- data/lib/aarch64/instructions/stlxr.rb +10 -10
- data/lib/aarch64/instructions/stlxrb.rb +8 -8
- data/lib/aarch64/instructions/stlxrh.rb +8 -8
- data/lib/aarch64/instructions/stnp_gen.rb +12 -12
- data/lib/aarch64/instructions/stp_gen.rb +14 -14
- data/lib/aarch64/instructions/str_imm_gen.rb +12 -12
- data/lib/aarch64/instructions/str_imm_unsigned.rb +10 -10
- data/lib/aarch64/instructions/str_reg_gen.rb +14 -14
- data/lib/aarch64/instructions/strb_imm.rb +10 -10
- data/lib/aarch64/instructions/strb_imm_unsigned.rb +8 -8
- data/lib/aarch64/instructions/strb_reg.rb +12 -12
- data/lib/aarch64/instructions/strh_imm.rb +10 -10
- data/lib/aarch64/instructions/strh_imm_unsigned.rb +8 -8
- data/lib/aarch64/instructions/strh_reg.rb +12 -12
- data/lib/aarch64/instructions/sttr.rb +10 -10
- data/lib/aarch64/instructions/stur_gen.rb +10 -10
- data/lib/aarch64/instructions/stxp.rb +12 -12
- data/lib/aarch64/instructions/stxr.rb +10 -10
- data/lib/aarch64/instructions/stxrb.rb +8 -8
- data/lib/aarch64/instructions/stxrh.rb +8 -8
- data/lib/aarch64/instructions/stz2g.rb +10 -10
- data/lib/aarch64/instructions/stzg.rb +10 -10
- data/lib/aarch64/instructions/stzgm.rb +6 -6
- data/lib/aarch64/instructions/sub_addsub_ext.rb +14 -14
- data/lib/aarch64/instructions/sub_addsub_imm.rb +12 -12
- data/lib/aarch64/instructions/sub_addsub_shift.rb +14 -14
- data/lib/aarch64/instructions/subg.rb +10 -10
- data/lib/aarch64/instructions/subp.rb +8 -8
- data/lib/aarch64/instructions/subps.rb +8 -8
- data/lib/aarch64/instructions/subs_addsub_ext.rb +14 -14
- data/lib/aarch64/instructions/subs_addsub_imm.rb +12 -12
- data/lib/aarch64/instructions/subs_addsub_shift.rb +14 -14
- data/lib/aarch64/instructions/svc.rb +3 -3
- data/lib/aarch64/instructions/swp.rb +14 -14
- data/lib/aarch64/instructions/swpb.rb +12 -12
- data/lib/aarch64/instructions/swph.rb +12 -12
- data/lib/aarch64/instructions/sys.rb +12 -12
- data/lib/aarch64/instructions/sysl.rb +12 -12
- data/lib/aarch64/instructions/tbnz.rb +9 -9
- data/lib/aarch64/instructions/tbz.rb +9 -9
- data/lib/aarch64/instructions/tsb.rb +1 -7
- data/lib/aarch64/instructions/ubfm.rb +13 -13
- data/lib/aarch64/instructions/udf_perm_undef.rb +3 -3
- data/lib/aarch64/instructions/udiv.rb +10 -10
- data/lib/aarch64/instructions/umaddl.rb +10 -10
- data/lib/aarch64/instructions/umsubl.rb +10 -10
- data/lib/aarch64/instructions/umulh.rb +8 -8
- data/lib/aarch64/instructions/wfe.rb +2 -9
- data/lib/aarch64/instructions/wfet.rb +4 -4
- data/lib/aarch64/instructions/wfi.rb +1 -1
- data/lib/aarch64/instructions/wfit.rb +4 -4
- data/lib/aarch64/instructions/xaflag.rb +1 -1
- data/lib/aarch64/instructions/xpac.rb +6 -6
- data/lib/aarch64/instructions/xpaclri.rb +1 -1
- data/lib/aarch64/instructions/yield.rb +2 -9
- data/lib/aarch64/instructions.rb +26 -8
- data/lib/aarch64/parser.rb +227 -0
- data/lib/aarch64/parser.tab.rb +6534 -0
- data/lib/aarch64/parser.y +1394 -0
- data/lib/aarch64/utils.rb +34 -0
- data/lib/aarch64/version.rb +1 -1
- data/lib/aarch64.rb +128 -58
- data/test/base_instructions_test.rb +34 -4
- data/test/helper.rb +48 -8
- data/test/parser_test.rb +1820 -0
- metadata +25 -14
- data/lib/aarch64/instructions/setgp.rb +0 -25
- data/lib/aarch64/instructions/setgpn.rb +0 -25
- data/lib/aarch64/instructions/setgpt.rb +0 -25
- data/lib/aarch64/instructions/setgptn.rb +0 -25
- data/lib/aarch64/instructions/setp.rb +0 -25
- data/lib/aarch64/instructions/setpn.rb +0 -25
- data/lib/aarch64/instructions/setpt.rb +0 -25
- data/lib/aarch64/instructions/setptn.rb +0 -25
@@ -8,30 +8,30 @@ module AArch64
|
|
8
8
|
# LDP <Xt1>, <Xt2>, [<Xn|SP>, #<imm>]!
|
9
9
|
# LDP <Wt1>, <Wt2>, [<Xn|SP>{, #<imm>}]
|
10
10
|
# LDP <Xt1>, <Xt2>, [<Xn|SP>{, #<imm>}]
|
11
|
-
class LDP_gen
|
11
|
+
class LDP_gen < Instruction
|
12
12
|
def initialize rt, rt2, rn, imm7, mode, opc
|
13
|
-
@rt = rt
|
14
|
-
@rt2 = rt2
|
15
|
-
@rn = rn
|
16
|
-
@imm7 = imm7
|
17
|
-
@mode = mode
|
18
|
-
@opc = opc
|
13
|
+
@rt = check_mask(rt, 0x1f)
|
14
|
+
@rt2 = check_mask(rt2, 0x1f)
|
15
|
+
@rn = check_mask(rn, 0x1f)
|
16
|
+
@imm7 = check_mask(imm7, 0x7f)
|
17
|
+
@mode = check_mask(mode, 0x07)
|
18
|
+
@opc = check_mask(opc, 0x03)
|
19
19
|
end
|
20
20
|
|
21
21
|
def encode
|
22
|
-
LDP_gen(@opc, @mode, @imm7, @rt2
|
22
|
+
LDP_gen(@opc, @mode, @imm7, @rt2, @rn, @rt)
|
23
23
|
end
|
24
24
|
|
25
25
|
private
|
26
26
|
|
27
27
|
def LDP_gen opc, mode, imm7, rt2, rn, rt
|
28
28
|
insn = 0b00_101_0_000_1_0000000_00000_00000_00000
|
29
|
-
insn |= ((opc
|
30
|
-
insn |= ((mode
|
31
|
-
insn |= ((imm7
|
32
|
-
insn |= ((rt2
|
33
|
-
insn |= ((rn
|
34
|
-
insn |= (rt
|
29
|
+
insn |= ((opc) << 30)
|
30
|
+
insn |= ((mode) << 23)
|
31
|
+
insn |= ((imm7) << 15)
|
32
|
+
insn |= ((rt2) << 10)
|
33
|
+
insn |= ((rn) << 5)
|
34
|
+
insn |= (rt)
|
35
35
|
insn
|
36
36
|
end
|
37
37
|
end
|
@@ -5,28 +5,28 @@ module AArch64
|
|
5
5
|
# LDPSW <Xt1>, <Xt2>, [<Xn|SP>], #<imm>
|
6
6
|
# LDPSW <Xt1>, <Xt2>, [<Xn|SP>, #<imm>]!
|
7
7
|
# LDPSW <Xt1>, <Xt2>, [<Xn|SP>{, #<imm>}]
|
8
|
-
class LDPSW
|
8
|
+
class LDPSW < Instruction
|
9
9
|
def initialize rt, rt2, rn, imm7, mode
|
10
|
-
@rt = rt
|
11
|
-
@rt2 = rt2
|
12
|
-
@rn = rn
|
13
|
-
@imm7 = imm7
|
14
|
-
@mode = mode
|
10
|
+
@rt = check_mask(rt, 0x1f)
|
11
|
+
@rt2 = check_mask(rt2, 0x1f)
|
12
|
+
@rn = check_mask(rn, 0x1f)
|
13
|
+
@imm7 = check_mask(imm7, 0x7f)
|
14
|
+
@mode = check_mask(mode, 0x07)
|
15
15
|
end
|
16
16
|
|
17
17
|
def encode
|
18
|
-
LDPSW(@mode, @imm7, @rt2
|
18
|
+
LDPSW(@mode, @imm7, @rt2, @rn, @rt)
|
19
19
|
end
|
20
20
|
|
21
21
|
private
|
22
22
|
|
23
23
|
def LDPSW mode, imm7, rt2, rn, rt
|
24
24
|
insn = 0b01_101_0_000_1_0000000_00000_00000_00000
|
25
|
-
insn |= ((mode
|
26
|
-
insn |= ((imm7
|
27
|
-
insn |= ((rt2
|
28
|
-
insn |= ((rn
|
29
|
-
insn |= (rt
|
25
|
+
insn |= ((mode) << 23)
|
26
|
+
insn |= ((imm7) << 15)
|
27
|
+
insn |= ((rt2) << 10)
|
28
|
+
insn |= ((rn) << 5)
|
29
|
+
insn |= (rt)
|
30
30
|
insn
|
31
31
|
end
|
32
32
|
end
|
@@ -6,28 +6,28 @@ module AArch64
|
|
6
6
|
# LDR <Xt>, [<Xn|SP>], #<simm>
|
7
7
|
# LDR <Wt>, [<Xn|SP>, #<simm>]!
|
8
8
|
# LDR <Xt>, [<Xn|SP>, #<simm>]!
|
9
|
-
class LDR_imm_gen
|
9
|
+
class LDR_imm_gen < Instruction
|
10
10
|
def initialize rt, rn, imm9, size, mode
|
11
|
-
@rt = rt
|
12
|
-
@rn = rn
|
13
|
-
@imm9 = imm9
|
14
|
-
@size = size
|
15
|
-
@mode = mode
|
11
|
+
@rt = check_mask(rt, 0x1f)
|
12
|
+
@rn = check_mask(rn, 0x1f)
|
13
|
+
@imm9 = check_mask(imm9, 0x1ff)
|
14
|
+
@size = check_mask(size, 0x03)
|
15
|
+
@mode = check_mask(mode, 0x03)
|
16
16
|
end
|
17
17
|
|
18
18
|
def encode
|
19
|
-
LDR_imm_gen(@size, @imm9, @mode, @rn
|
19
|
+
LDR_imm_gen(@size, @imm9, @mode, @rn, @rt)
|
20
20
|
end
|
21
21
|
|
22
22
|
private
|
23
23
|
|
24
24
|
def LDR_imm_gen size, imm9, mode, rn, rt
|
25
25
|
insn = 0b00_111_0_00_01_0_000000000_00_00000_00000
|
26
|
-
insn |= ((size
|
27
|
-
insn |= ((imm9
|
28
|
-
insn |= ((mode
|
29
|
-
insn |= ((rn
|
30
|
-
insn |= (rt
|
26
|
+
insn |= ((size) << 30)
|
27
|
+
insn |= ((imm9) << 12)
|
28
|
+
insn |= ((mode) << 10)
|
29
|
+
insn |= ((rn) << 5)
|
30
|
+
insn |= (rt)
|
31
31
|
insn
|
32
32
|
end
|
33
33
|
end
|
@@ -4,26 +4,26 @@ module AArch64
|
|
4
4
|
# Load Register (immediate)
|
5
5
|
# LDR <Wt>, [<Xn|SP>{, #<pimm>}]
|
6
6
|
# LDR <Xt>, [<Xn|SP>{, #<pimm>}]
|
7
|
-
class LDR_imm_unsigned
|
7
|
+
class LDR_imm_unsigned < Instruction
|
8
8
|
def initialize rt, rn, imm12, size
|
9
|
-
@rt = rt
|
10
|
-
@rn = rn
|
11
|
-
@imm12 = imm12
|
12
|
-
@size = size
|
9
|
+
@rt = check_mask(rt, 0x1f)
|
10
|
+
@rn = check_mask(rn, 0x1f)
|
11
|
+
@imm12 = check_mask(imm12, 0xfff)
|
12
|
+
@size = check_mask(size, 0x03)
|
13
13
|
end
|
14
14
|
|
15
15
|
def encode
|
16
|
-
LDR_imm_gen(@size, @imm12, @rn
|
16
|
+
LDR_imm_gen(@size, @imm12, @rn, @rt)
|
17
17
|
end
|
18
18
|
|
19
19
|
private
|
20
20
|
|
21
21
|
def LDR_imm_gen size, imm12, rn, rt
|
22
22
|
insn = 0b00_111_0_01_01_000000000000_00000_00000
|
23
|
-
insn |= ((size
|
24
|
-
insn |= ((imm12
|
25
|
-
insn |= ((rn
|
26
|
-
insn |= (rt
|
23
|
+
insn |= ((size) << 30)
|
24
|
+
insn |= ((imm12) << 10)
|
25
|
+
insn |= ((rn) << 5)
|
26
|
+
insn |= (rt)
|
27
27
|
insn
|
28
28
|
end
|
29
29
|
end
|
@@ -4,24 +4,24 @@ module AArch64
|
|
4
4
|
# Load Register (literal)
|
5
5
|
# LDR <Wt>, <label>
|
6
6
|
# LDR <Xt>, <label>
|
7
|
-
class LDR_lit_gen
|
7
|
+
class LDR_lit_gen < Instruction
|
8
8
|
def initialize rt, imm19, size
|
9
|
-
@rt = rt
|
9
|
+
@rt = check_mask(rt, 0x1f)
|
10
10
|
@imm19 = imm19
|
11
|
-
@size = size
|
11
|
+
@size = check_mask(size, 0x3)
|
12
12
|
end
|
13
13
|
|
14
14
|
def encode
|
15
|
-
LDR_lit_gen(@size, @imm19
|
15
|
+
LDR_lit_gen(@size, check_mask(unwrap_label(@imm19), 0x7ffff), @rt)
|
16
16
|
end
|
17
17
|
|
18
18
|
private
|
19
19
|
|
20
20
|
def LDR_lit_gen size, imm19, rt
|
21
21
|
insn = 0b00_011_0_00_0000000000000000000_00000
|
22
|
-
insn |= (
|
23
|
-
insn |= (
|
24
|
-
insn |=
|
22
|
+
insn |= (size << 30)
|
23
|
+
insn |= (imm19 << 5)
|
24
|
+
insn |= rt
|
25
25
|
insn
|
26
26
|
end
|
27
27
|
end
|
@@ -4,30 +4,30 @@ module AArch64
|
|
4
4
|
# Load Register (register)
|
5
5
|
# LDR <Wt>, [<Xn|SP>, (<Wm>|<Xm>){, <extend> {<amount>}}]
|
6
6
|
# LDR <Xt>, [<Xn|SP>, (<Wm>|<Xm>){, <extend> {<amount>}}]
|
7
|
-
class LDR_reg_gen
|
7
|
+
class LDR_reg_gen < Instruction
|
8
8
|
def initialize rt, rn, rm, size, option, s
|
9
|
-
@rt = rt
|
10
|
-
@rn = rn
|
11
|
-
@rm = rm
|
12
|
-
@size = size
|
13
|
-
@option = option
|
14
|
-
@s = s
|
9
|
+
@rt = check_mask(rt, 0x1f)
|
10
|
+
@rn = check_mask(rn, 0x1f)
|
11
|
+
@rm = check_mask(rm, 0x1f)
|
12
|
+
@size = check_mask(size, 0x03)
|
13
|
+
@option = check_mask(option, 0x07)
|
14
|
+
@s = check_mask(s, 0x01)
|
15
15
|
end
|
16
16
|
|
17
17
|
def encode
|
18
|
-
LDR_reg_gen(@size, @rm
|
18
|
+
LDR_reg_gen(@size, @rm, @option, @s, @rn, @rt)
|
19
19
|
end
|
20
20
|
|
21
21
|
private
|
22
22
|
|
23
23
|
def LDR_reg_gen size, rm, option, s, rn, rt
|
24
24
|
insn = 0b00_111_0_00_01_1_00000_000_0_10_00000_00000
|
25
|
-
insn |= ((size
|
26
|
-
insn |= ((rm
|
27
|
-
insn |= ((option
|
28
|
-
insn |= ((s
|
29
|
-
insn |= ((rn
|
30
|
-
insn |= (rt
|
25
|
+
insn |= ((size) << 30)
|
26
|
+
insn |= ((rm) << 16)
|
27
|
+
insn |= ((option) << 13)
|
28
|
+
insn |= ((s) << 12)
|
29
|
+
insn |= ((rn) << 5)
|
30
|
+
insn |= (rt)
|
31
31
|
insn
|
32
32
|
end
|
33
33
|
end
|
@@ -6,30 +6,30 @@ module AArch64
|
|
6
6
|
# LDRAA <Xt>, [<Xn|SP>{, #<simm>}]!
|
7
7
|
# LDRAB <Xt>, [<Xn|SP>{, #<simm>}]
|
8
8
|
# LDRAB <Xt>, [<Xn|SP>{, #<simm>}]!
|
9
|
-
class LDRA
|
9
|
+
class LDRA < Instruction
|
10
10
|
def initialize rt, rn, imm9, m, w, s
|
11
|
-
@rt = rt
|
12
|
-
@rn = rn
|
13
|
-
@imm9 = imm9
|
14
|
-
@m = m
|
15
|
-
@w = w
|
16
|
-
@s = s
|
11
|
+
@rt = check_mask(rt, 0x1f)
|
12
|
+
@rn = check_mask(rn, 0x1f)
|
13
|
+
@imm9 = check_mask(imm9, 0x1ff)
|
14
|
+
@m = check_mask(m, 0x01)
|
15
|
+
@w = check_mask(w, 0x01)
|
16
|
+
@s = check_mask(s, 0x01)
|
17
17
|
end
|
18
18
|
|
19
19
|
def encode
|
20
|
-
LDRA(@m, @s, @imm9, @w, @rn
|
20
|
+
LDRA(@m, @s, @imm9, @w, @rn, @rt)
|
21
21
|
end
|
22
22
|
|
23
23
|
private
|
24
24
|
|
25
25
|
def LDRA m, s, imm9, w, rn, rt
|
26
26
|
insn = 0b11_111_0_00_0_0_1_000000000_0_1_00000_00000
|
27
|
-
insn |= ((m
|
28
|
-
insn |= ((s
|
29
|
-
insn |= ((imm9
|
30
|
-
insn |= ((w
|
31
|
-
insn |= ((rn
|
32
|
-
insn |= (rt
|
27
|
+
insn |= ((m) << 23)
|
28
|
+
insn |= ((s) << 22)
|
29
|
+
insn |= ((imm9) << 12)
|
30
|
+
insn |= ((w) << 11)
|
31
|
+
insn |= ((rn) << 5)
|
32
|
+
insn |= (rt)
|
33
33
|
insn
|
34
34
|
end
|
35
35
|
end
|
@@ -5,26 +5,26 @@ module AArch64
|
|
5
5
|
# LDRB <Wt>, [<Xn|SP>], #<simm>
|
6
6
|
# LDRB <Wt>, [<Xn|SP>, #<simm>]!
|
7
7
|
# LDRB <Wt>, [<Xn|SP>{, #<pimm>}]
|
8
|
-
class LDRB_imm
|
8
|
+
class LDRB_imm < Instruction
|
9
9
|
def initialize rt, rn, imm9, option
|
10
|
-
@rt = rt
|
11
|
-
@rn = rn
|
12
|
-
@imm9 = imm9
|
13
|
-
@option = option
|
10
|
+
@rt = check_mask(rt, 0x1f)
|
11
|
+
@rn = check_mask(rn, 0x1f)
|
12
|
+
@imm9 = check_mask(imm9, 0x1ff)
|
13
|
+
@option = check_mask(option, 0x03)
|
14
14
|
end
|
15
15
|
|
16
16
|
def encode
|
17
|
-
LDRB_imm(@imm9, @option, @rn
|
17
|
+
LDRB_imm(@imm9, @option, @rn, @rt)
|
18
18
|
end
|
19
19
|
|
20
20
|
private
|
21
21
|
|
22
22
|
def LDRB_imm imm9, option, rn, rt
|
23
23
|
insn = 0b00_111_0_00_01_0_000000000_01_00000_00000
|
24
|
-
insn |= ((imm9
|
25
|
-
insn |= ((option
|
26
|
-
insn |= ((rn
|
27
|
-
insn |= (rt
|
24
|
+
insn |= ((imm9) << 12)
|
25
|
+
insn |= ((option) << 10)
|
26
|
+
insn |= ((rn) << 5)
|
27
|
+
insn |= (rt)
|
28
28
|
insn
|
29
29
|
end
|
30
30
|
end
|
@@ -4,28 +4,28 @@ module AArch64
|
|
4
4
|
# Load Register Byte (register)
|
5
5
|
# LDRB <Wt>, [<Xn|SP>, (<Wm>|<Xm>), <extend> {<amount>}]
|
6
6
|
# LDRB <Wt>, [<Xn|SP>, <Xm>{, LSL <amount>}]
|
7
|
-
class LDRB_reg
|
7
|
+
class LDRB_reg < Instruction
|
8
8
|
def initialize rt, rn, rm, s, option
|
9
|
-
@rt = rt
|
10
|
-
@rn = rn
|
11
|
-
@rm = rm
|
12
|
-
@s = s
|
13
|
-
@option = option
|
9
|
+
@rt = check_mask(rt, 0x1f)
|
10
|
+
@rn = check_mask(rn, 0x1f)
|
11
|
+
@rm = check_mask(rm, 0x1f)
|
12
|
+
@s = check_mask(s, 0x01)
|
13
|
+
@option = check_mask(option, 0x07)
|
14
14
|
end
|
15
15
|
|
16
16
|
def encode
|
17
|
-
LDRB_reg(@rm
|
17
|
+
LDRB_reg(@rm, @option, @s, @rn, @rt)
|
18
18
|
end
|
19
19
|
|
20
20
|
private
|
21
21
|
|
22
22
|
def LDRB_reg rm, option, s, rn, rt
|
23
23
|
insn = 0b00_111_0_00_01_1_00000_000_0_10_00000_00000
|
24
|
-
insn |= ((rm
|
25
|
-
insn |= ((option
|
26
|
-
insn |= ((s
|
27
|
-
insn |= ((rn
|
28
|
-
insn |= (rt
|
24
|
+
insn |= ((rm) << 16)
|
25
|
+
insn |= ((option) << 13)
|
26
|
+
insn |= ((s) << 12)
|
27
|
+
insn |= ((rn) << 5)
|
28
|
+
insn |= (rt)
|
29
29
|
insn
|
30
30
|
end
|
31
31
|
end
|
@@ -3,24 +3,24 @@ module AArch64
|
|
3
3
|
# LDRB (immediate) -- A64
|
4
4
|
# Load Register Byte (immediate)
|
5
5
|
# LDRB <Wt>, [<Xn|SP>{, #<pimm>}]
|
6
|
-
class LDRB_unsigned
|
6
|
+
class LDRB_unsigned < Instruction
|
7
7
|
def initialize rt, rn, imm12
|
8
|
-
@rt = rt
|
9
|
-
@rn = rn
|
10
|
-
@imm12 = imm12
|
8
|
+
@rt = check_mask(rt, 0x1f)
|
9
|
+
@rn = check_mask(rn, 0x1f)
|
10
|
+
@imm12 = check_mask(imm12, 0xfff)
|
11
11
|
end
|
12
12
|
|
13
13
|
def encode
|
14
|
-
LDRB_imm(@imm12, @rn
|
14
|
+
LDRB_imm(@imm12, @rn, @rt)
|
15
15
|
end
|
16
16
|
|
17
17
|
private
|
18
18
|
|
19
19
|
def LDRB_imm imm12, rn, rt
|
20
20
|
insn = 0b00_111_0_01_01_0_00000000000_00000_00000
|
21
|
-
insn |= ((imm12
|
22
|
-
insn |= ((rn
|
23
|
-
insn |= (rt
|
21
|
+
insn |= ((imm12) << 10)
|
22
|
+
insn |= ((rn) << 5)
|
23
|
+
insn |= (rt)
|
24
24
|
insn
|
25
25
|
end
|
26
26
|
end
|
@@ -5,26 +5,26 @@ module AArch64
|
|
5
5
|
# LDRH <Wt>, [<Xn|SP>], #<simm>
|
6
6
|
# LDRH <Wt>, [<Xn|SP>, #<simm>]!
|
7
7
|
# LDRH <Wt>, [<Xn|SP>{, #<pimm>}]
|
8
|
-
class LDRH_imm
|
8
|
+
class LDRH_imm < Instruction
|
9
9
|
def initialize rt, rn, imm9, option
|
10
|
-
@rt = rt
|
11
|
-
@rn = rn
|
12
|
-
@imm9 = imm9
|
13
|
-
@option = option
|
10
|
+
@rt = check_mask(rt, 0x1f)
|
11
|
+
@rn = check_mask(rn, 0x1f)
|
12
|
+
@imm9 = check_mask(imm9, 0x1ff)
|
13
|
+
@option = check_mask(option, 0x03)
|
14
14
|
end
|
15
15
|
|
16
16
|
def encode
|
17
|
-
LDRH_imm(@imm9, @option, @rn
|
17
|
+
LDRH_imm(@imm9, @option, @rn, @rt)
|
18
18
|
end
|
19
19
|
|
20
20
|
private
|
21
21
|
|
22
22
|
def LDRH_imm imm9, option, rn, rt
|
23
23
|
insn = 0b01_111_0_00_01_0_000000000_01_00000_00000
|
24
|
-
insn |= ((imm9
|
25
|
-
insn |= ((option
|
26
|
-
insn |= ((rn
|
27
|
-
insn |= (rt
|
24
|
+
insn |= ((imm9) << 12)
|
25
|
+
insn |= ((option) << 10)
|
26
|
+
insn |= ((rn) << 5)
|
27
|
+
insn |= (rt)
|
28
28
|
insn
|
29
29
|
end
|
30
30
|
end
|
@@ -3,28 +3,28 @@ module AArch64
|
|
3
3
|
# LDRH (register) -- A64
|
4
4
|
# Load Register Halfword (register)
|
5
5
|
# LDRH <Wt>, [<Xn|SP>, (<Wm>|<Xm>){, <extend> {<amount>}}]
|
6
|
-
class LDRH_reg
|
6
|
+
class LDRH_reg < Instruction
|
7
7
|
def initialize rt, rn, rm, s, option
|
8
|
-
@rt = rt
|
9
|
-
@rn = rn
|
10
|
-
@rm = rm
|
11
|
-
@s = s
|
12
|
-
@option = option
|
8
|
+
@rt = check_mask(rt, 0x1f)
|
9
|
+
@rn = check_mask(rn, 0x1f)
|
10
|
+
@rm = check_mask(rm, 0x1f)
|
11
|
+
@s = check_mask(s, 0x01)
|
12
|
+
@option = check_mask(option, 0x07)
|
13
13
|
end
|
14
14
|
|
15
15
|
def encode
|
16
|
-
LDRH_reg(@rm
|
16
|
+
LDRH_reg(@rm, @option, @s, @rn, @rt)
|
17
17
|
end
|
18
18
|
|
19
19
|
private
|
20
20
|
|
21
21
|
def LDRH_reg rm, option, s, rn, rt
|
22
22
|
insn = 0b01_111_0_00_01_1_00000_000_0_10_00000_00000
|
23
|
-
insn |= ((rm
|
24
|
-
insn |= ((option
|
25
|
-
insn |= ((s
|
26
|
-
insn |= ((rn
|
27
|
-
insn |= (rt
|
23
|
+
insn |= ((rm) << 16)
|
24
|
+
insn |= ((option) << 13)
|
25
|
+
insn |= ((s) << 12)
|
26
|
+
insn |= ((rn) << 5)
|
27
|
+
insn |= (rt)
|
28
28
|
insn
|
29
29
|
end
|
30
30
|
end
|
@@ -3,24 +3,24 @@ module AArch64
|
|
3
3
|
# LDRH (immediate) -- A64
|
4
4
|
# Load Register Halfword (immediate)
|
5
5
|
# LDRH <Wt>, [<Xn|SP>{, #<pimm>}]
|
6
|
-
class LDRH_unsigned
|
6
|
+
class LDRH_unsigned < Instruction
|
7
7
|
def initialize rt, rn, imm12
|
8
|
-
@rt = rt
|
9
|
-
@rn = rn
|
10
|
-
@imm12 = imm12
|
8
|
+
@rt = check_mask(rt, 0x1f)
|
9
|
+
@rn = check_mask(rn, 0x1f)
|
10
|
+
@imm12 = check_mask(imm12, 0xfff)
|
11
11
|
end
|
12
12
|
|
13
13
|
def encode
|
14
|
-
LDRH_unsigned(@imm12, @rn
|
14
|
+
LDRH_unsigned(@imm12, @rn, @rt)
|
15
15
|
end
|
16
16
|
|
17
17
|
private
|
18
18
|
|
19
19
|
def LDRH_unsigned imm12, rn, rt
|
20
20
|
insn = 0b01_111_0_01_01_0_00000000000_00000_00000
|
21
|
-
insn |= ((imm12
|
22
|
-
insn |= ((rn
|
23
|
-
insn |= (rt
|
21
|
+
insn |= ((imm12) << 9)
|
22
|
+
insn |= ((rn) << 5)
|
23
|
+
insn |= (rt)
|
24
24
|
insn
|
25
25
|
end
|
26
26
|
end
|
@@ -8,28 +8,28 @@ module AArch64
|
|
8
8
|
# LDRSB <Xt>, [<Xn|SP>, #<simm>]!
|
9
9
|
# LDRSB <Wt>, [<Xn|SP>{, #<pimm>}]
|
10
10
|
# LDRSB <Xt>, [<Xn|SP>{, #<pimm>}]
|
11
|
-
class LDRSB_imm
|
11
|
+
class LDRSB_imm < Instruction
|
12
12
|
def initialize rt, rn, imm9, option, opc
|
13
|
-
@rt = rt
|
14
|
-
@rn = rn
|
15
|
-
@imm9 = imm9
|
16
|
-
@option = option
|
17
|
-
@opc = opc
|
13
|
+
@rt = check_mask(rt, 0x1f)
|
14
|
+
@rn = check_mask(rn, 0x1f)
|
15
|
+
@imm9 = check_mask(imm9, 0x1ff)
|
16
|
+
@option = check_mask(option, 0x03)
|
17
|
+
@opc = check_mask(opc, 0x03)
|
18
18
|
end
|
19
19
|
|
20
20
|
def encode
|
21
|
-
LDRSB_imm(@opc, @imm9, @option, @rn
|
21
|
+
LDRSB_imm(@opc, @imm9, @option, @rn, @rt)
|
22
22
|
end
|
23
23
|
|
24
24
|
private
|
25
25
|
|
26
26
|
def LDRSB_imm opc, imm9, option, rn, rt
|
27
27
|
insn = 0b00_111_0_00_00_0_000000000_01_00000_00000
|
28
|
-
insn |= ((opc
|
29
|
-
insn |= ((imm9
|
30
|
-
insn |= ((option
|
31
|
-
insn |= ((rn
|
32
|
-
insn |= (rt
|
28
|
+
insn |= ((opc) << 22)
|
29
|
+
insn |= ((imm9) << 12)
|
30
|
+
insn |= ((option) << 10)
|
31
|
+
insn |= ((rn) << 5)
|
32
|
+
insn |= (rt)
|
33
33
|
insn
|
34
34
|
end
|
35
35
|
end
|
@@ -6,30 +6,30 @@ module AArch64
|
|
6
6
|
# LDRSB <Wt>, [<Xn|SP>, <Xm>{, LSL <amount>}]
|
7
7
|
# LDRSB <Xt>, [<Xn|SP>, (<Wm>|<Xm>), <extend> {<amount>}]
|
8
8
|
# LDRSB <Xt>, [<Xn|SP>, <Xm>{, LSL <amount>}]
|
9
|
-
class LDRSB_reg
|
9
|
+
class LDRSB_reg < Instruction
|
10
10
|
def initialize rt, rn, rm, s, option, opc
|
11
|
-
@rt = rt
|
12
|
-
@rn = rn
|
13
|
-
@rm = rm
|
14
|
-
@s = s
|
15
|
-
@option = option
|
16
|
-
@opc = opc
|
11
|
+
@rt = check_mask(rt, 0x1f)
|
12
|
+
@rn = check_mask(rn, 0x1f)
|
13
|
+
@rm = check_mask(rm, 0x1f)
|
14
|
+
@s = check_mask(s, 0x01)
|
15
|
+
@option = check_mask(option, 0x07)
|
16
|
+
@opc = check_mask(opc, 0x03)
|
17
17
|
end
|
18
18
|
|
19
19
|
def encode
|
20
|
-
LDRSB_reg(@opc, @rm
|
20
|
+
LDRSB_reg(@opc, @rm, @option, @s, @rn, @rt)
|
21
21
|
end
|
22
22
|
|
23
23
|
private
|
24
24
|
|
25
25
|
def LDRSB_reg opc, rm, option, s, rn, rt
|
26
26
|
insn = 0b00_111_0_00_00_1_00000_000_0_10_00000_00000
|
27
|
-
insn |= ((opc
|
28
|
-
insn |= ((rm
|
29
|
-
insn |= ((option
|
30
|
-
insn |= ((s
|
31
|
-
insn |= ((rn
|
32
|
-
insn |= (rt
|
27
|
+
insn |= ((opc) << 22)
|
28
|
+
insn |= ((rm) << 16)
|
29
|
+
insn |= ((option) << 13)
|
30
|
+
insn |= ((s) << 12)
|
31
|
+
insn |= ((rn) << 5)
|
32
|
+
insn |= (rt)
|
33
33
|
insn
|
34
34
|
end
|
35
35
|
end
|
@@ -8,26 +8,26 @@ module AArch64
|
|
8
8
|
# LDRSB <Xt>, [<Xn|SP>, #<simm>]!
|
9
9
|
# LDRSB <Wt>, [<Xn|SP>{, #<pimm>}]
|
10
10
|
# LDRSB <Xt>, [<Xn|SP>{, #<pimm>}]
|
11
|
-
class LDRSB_unsigned
|
11
|
+
class LDRSB_unsigned < Instruction
|
12
12
|
def initialize rt, rn, imm12, opc
|
13
|
-
@rt = rt
|
14
|
-
@rn = rn
|
15
|
-
@imm12 = imm12
|
16
|
-
@opc = opc
|
13
|
+
@rt = check_mask(rt, 0x1f)
|
14
|
+
@rn = check_mask(rn, 0x1f)
|
15
|
+
@imm12 = check_mask(imm12, 0xfff)
|
16
|
+
@opc = check_mask(opc, 0x03)
|
17
17
|
end
|
18
18
|
|
19
19
|
def encode
|
20
|
-
LDRSB_unsigned(@opc, @imm12, @rn
|
20
|
+
LDRSB_unsigned(@opc, @imm12, @rn, @rt)
|
21
21
|
end
|
22
22
|
|
23
23
|
private
|
24
24
|
|
25
25
|
def LDRSB_unsigned opc, imm12, rn, rt
|
26
26
|
insn = 0b00_111_0_01_00_0_00000000000_00000_00000
|
27
|
-
insn |= ((opc
|
28
|
-
insn |= ((imm12
|
29
|
-
insn |= ((rn
|
30
|
-
insn |= (rt
|
27
|
+
insn |= ((opc) << 22)
|
28
|
+
insn |= ((imm12) << 10)
|
29
|
+
insn |= ((rn) << 5)
|
30
|
+
insn |= (rt)
|
31
31
|
insn
|
32
32
|
end
|
33
33
|
end
|