@@ -41,7 +41,7 @@ call_primitive_0_test() ->
4141 Stream = ? BACKEND :stream (State1 ),
4242 Dump =
4343 <<
44- " 0: f9400050 ldr x16, [x2]\n "
44+ " 0: f9400050 ldr x16, [x2]\n "
4545 " 4: a9bf03fe stp x30, x0, [sp, #-16]!\n "
4646 " 8: a9bf0be1 stp x1, x2, [sp, #-16]!\n "
4747 " c: d63f0200 blr x16\n "
@@ -58,7 +58,7 @@ call_primitive_1_test() ->
5858 Stream = ? BACKEND :stream (State1 ),
5959 Dump =
6060 <<
61- " 0: f9400450 ldr x16, [x2, #8]\n "
61+ " 0: f9400450 ldr x16, [x2, #8]\n "
6262 " 4: a9bf03fe stp x30, x0, [sp, #-16]!\n "
6363 " 8: a9bf0be1 stp x1, x2, [sp, #-16]!\n "
6464 " c: d63f0200 blr x16\n "
@@ -149,20 +149,22 @@ call_primitive_extended_regs_test() ->
149149call_ext_only_test () ->
150150 State0 = ? BACKEND :new (? JIT_VARIANT_PIC , jit_stream_binary , jit_stream_binary :new (0 )),
151151 State1 = ? BACKEND :decrement_reductions_and_maybe_schedule_next (State0 ),
152- State2 = ? BACKEND :call_primitive_last (State1 , ? PRIM_CALL_EXT , [ctx , jit_state , - 1 ]),
152+ State2 = ? BACKEND :call_primitive_last (State1 , ? PRIM_CALL_EXT , [ctx , jit_state , 2 , 2 , - 1 ]),
153153 Stream = ? BACKEND :stream (State2 ),
154154 Dump = <<
155- " 0: f9400827 ldr x7 , [x1, #16]\n "
155+ " 0: b9401027 ldr w7 , [x1, #16]\n "
156156 " 4: f10004e7 subs x7, x7, #0x1\n "
157- " 8: f9000827 str x7 , [x1, #16]\n "
157+ " 8: b9001027 str w7 , [x1, #16]\n "
158158 " c: 540000a1 b.ne 0x20 // b.any\n "
159159 " 10: 10000087 adr x7, 0x20\n "
160160 " 14: f9000427 str x7, [x1, #8]\n "
161161 " 18: f9400847 ldr x7, [x2, #16]\n "
162162 " 1c: d61f00e0 br x7\n "
163163 " 20: f9401047 ldr x7, [x2, #32]\n "
164- " 24: 92800002 mov x2, #0xffffffffffffffff // #-1\n "
165- " 28: d61f00e0 br x7"
164+ " 24: d2800042 mov x2, #0x2 // #2\n "
165+ " 28: d2800043 mov x3, #0x2 // #2\n "
166+ " 2c: 92800004 mov x4, #0xffffffffffffffff // #-1\n "
167+ " 30: d61f00e0 br x7"
166168 >>,
167169 ? assertEqual (dump_to_bin (Dump ), Stream ).
168170
@@ -172,9 +174,9 @@ call_ext_last_test() ->
172174 State2 = ? BACKEND :call_primitive_last (State1 , ? PRIM_CALL_EXT , [ctx , jit_state , 2 , 2 , 10 ]),
173175 Stream = ? BACKEND :stream (State2 ),
174176 Dump = <<
175- " 0: f9400827 ldr x7 , [x1, #16]\n "
177+ " 0: b9401027 ldr w7 , [x1, #16]\n "
176178 " 4: f10004e7 subs x7, x7, #0x1\n "
177- " 8: f9000827 str x7 , [x1, #16]\n "
179+ " 8: b9001027 str w7 , [x1, #16]\n "
178180 " c: 540000a1 b.ne 0x20 // b.any\n "
179181 " 10: 10000087 adr x7, 0x20\n "
180182 " 14: f9000427 str x7, [x1, #8]\n "
@@ -241,9 +243,9 @@ call_only_or_schedule_next_and_label_relocation_test() ->
241243 " 0: 1400000d b 0x34\n "
242244 " 4: 14000002 b 0xc\n "
243245 " 8: 14000009 b 0x2c\n "
244- " c: f9400827 ldr x7 , [x1, #16]\n "
246+ " c: b9401027 ldr w7 , [x1, #16]\n "
245247 " 10: f10004e7 subs x7, x7, #0x1\n "
246- " 14: f9000827 str x7 , [x1, #16]\n "
248+ " 14: b9001027 str w7 , [x1, #16]\n "
247249 " 18: 540000a1 b.ne 0x2c // b.any\n "
248250 " 1c: 10000087 adr x7, 0x2c\n "
249251 " 20: f9000427 str x7, [x1, #8]\n "
@@ -413,9 +415,9 @@ call_ext_test() ->
413415 ? BACKEND :assert_all_native_free (State2 ),
414416 Stream = ? BACKEND :stream (State2 ),
415417 Dump = <<
416- " 0: f9400827 ldr x7 , [x1, #16]\n "
418+ " 0: b9401027 ldr w7 , [x1, #16]\n "
417419 " 4: f10004e7 subs x7, x7, #0x1\n "
418- " 8: f9000827 str x7 , [x1, #16]\n "
420+ " 8: b9001027 str w7 , [x1, #16]\n "
419421 " c: 540000a1 b.ne 0x20 // b.any\n "
420422 " 10: 10000087 adr x7, 0x20\n "
421423 " 14: f9000427 str x7, [x1, #8]\n "
@@ -465,9 +467,9 @@ call_fun_test() ->
465467 ? BACKEND :assert_all_native_free (State9 ),
466468 Stream = ? BACKEND :stream (State9 ),
467469 Dump = <<
468- " 0: f9400827 ldr x7 , [x1, #16]\n "
470+ " 0: b9401027 ldr w7 , [x1, #16]\n "
469471 " 4: f10004e7 subs x7, x7, #0x1\n "
470- " 8: f9000827 str x7 , [x1, #16]\n "
472+ " 8: b9001027 str w7 , [x1, #16]\n "
471473 " c: 540000a1 b.ne 0x20 // b.any\n "
472474 " 10: 10000087 adr x7, 0x20\n "
473475 " 14: f9000427 str x7, [x1, #8]\n "
0 commit comments