Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

update m0 tests to use new deref_* ops

  • Loading branch information...
commit 80eecc20beb830529aba2f99b15de7eecae390a5 1 parent 983bc85
Jimmy Zhuo authored
Showing with 154 additions and 154 deletions.
  1. +3 −3 t/m0/integration/m0_add_i.m0
  2. +6 −6 t/m0/integration/m0_add_n.m0
  3. +3 −3 t/m0/integration/m0_and.m0
  4. +8 −8 t/m0/integration/m0_args.m0
  5. +3 −3 t/m0/integration/m0_ashr.m0
  6. +8 −8 t/m0/integration/m0_chunk_name_const.m0
  7. +7 −7 t/m0/integration/m0_convert_i_n.m0
  8. +4 −4 t/m0/integration/m0_deref.m0
  9. +3 −3 t/m0/integration/m0_div_i.m0
  10. +6 −6 t/m0/integration/m0_div_n.m0
  11. +6 −6 t/m0/integration/m0_goto_chunk.m0
  12. +9 −9 t/m0/integration/m0_hash.m0
  13. +3 −3 t/m0/integration/m0_labels_with_goto.m0
  14. +2 −2 t/m0/integration/m0_labels_without_goto.m0
  15. +3 −3 t/m0/integration/m0_lshr.m0
  16. +1 −1  t/m0/integration/m0_metadata_basic.m0
  17. +3 −3 t/m0/integration/m0_mod_i.m0
  18. +6 −6 t/m0/integration/m0_mod_n.m0
  19. +3 −3 t/m0/integration/m0_mult_i.m0
  20. +6 −6 t/m0/integration/m0_mult_n.m0
  21. +2 −2 t/m0/integration/m0_noop.m0
  22. +3 −3 t/m0/integration/m0_or.m0
  23. +28 −28 t/m0/integration/m0_poke_caller.m0
  24. +4 −4 t/m0/integration/m0_set.m0
  25. +4 −4 t/m0/integration/m0_set_imm.m0
  26. +5 −5 t/m0/integration/m0_set_ref.m0
  27. +3 −3 t/m0/integration/m0_shl.m0
  28. +3 −3 t/m0/integration/m0_sub_i.m0
  29. +6 −6 t/m0/integration/m0_sub_n.m0
  30. +3 −3 t/m0/integration/m0_xor.m0
View
6 t/m0/integration/m0_add_i.m0
@@ -8,7 +8,7 @@
.bytecode
set_imm S0, 0, 0
- deref S0, CONSTS, S0
+ deref_s S0, CONSTS, S0
set_imm I0, 0, 1
print_s I0, S0, x
@@ -23,12 +23,12 @@
addi_nok:
set_imm S0, 0, 1
- deref S0, CONSTS, S0
+ deref_s S0, CONSTS, S0
print_s I0, S0, x
addi_ok:
set_imm S0, 0, 2
- deref S0, CONSTS, S0
+ deref_s S0, CONSTS, S0
print_s I0, S0, x
# This code isn't really PASM, but the highlighting works well.
View
12 t/m0/integration/m0_add_n.m0
@@ -11,17 +11,17 @@
.bytecode
set_imm S0, 0, 0
- deref S0, CONSTS, S0
+ deref_s S0, CONSTS, S0
set_imm I0, 0, 1
print_s I0, S0, x
set_imm N0, 0, 3
- deref N0, CONSTS, N0
+ deref_n N0, CONSTS, N0
set_imm N1, 0, 4
- deref N1, CONSTS, N1
+ deref_n N1, CONSTS, N1
add_n N2, N1, N0
set_imm N3, 0, 5
- deref N3, CONSTS, N3
+ deref_n N3, CONSTS, N3
sub_n N4, N3, N2
goto_if addn_nok, N4
@@ -29,12 +29,12 @@
addn_nok:
set_imm S0, 0, 1
- deref S0, CONSTS, S0
+ deref_s S0, CONSTS, S0
print_s I0, S0, x
addn_ok:
set_imm S0, 0, 2
- deref S0, CONSTS, S0
+ deref_s S0, CONSTS, S0
print_s I0, S0, x
# This code isn't really PASM, but the highlighting works well.
View
6 t/m0/integration/m0_and.m0
@@ -8,7 +8,7 @@
.bytecode
set_imm S0, 0, 0
- deref S0, CONSTS, S0
+ deref_s S0, CONSTS, S0
set_imm I0, 0, 1
print_s I0, S0, x
@@ -23,12 +23,12 @@
and_nok:
set_imm S0, 0, 1
- deref S0, CONSTS, S0
+ deref_s S0, CONSTS, S0
print_s I0, S0, x
and_ok:
set_imm S0, 0, 2
- deref S0, CONSTS, S0
+ deref_s S0, CONSTS, S0
print_s I0, S0, x
# This code isn't really PASM, but the highlighting works well.
View
16 t/m0/integration/m0_args.m0
@@ -12,12 +12,12 @@
set_imm I0, 0, 0
set_imm S0, 0, 0
- deref S0, CONSTS, S0
+ deref_s S0, CONSTS, S0
print_s I0, S0, x
# I1 is the arg count
set_imm I1, 0, ARGC
- deref I1, INTERP, I1
+ deref_i I1, INTERP, I1
# I2 is the expected arg count
set_imm I2, 0, 6
@@ -28,13 +28,13 @@
argc_nok:
set_imm S0, 0, 3
- deref S0, CONSTS, S0
+ deref_s S0, CONSTS, S0
print_s I0, S0, x
goto argv_test, x
argc_ok:
set_imm S0, 0, 2
- deref S0, CONSTS, S0
+ deref_s S0, CONSTS, S0
print_s I0, S0, x
goto argv_test, x
@@ -44,20 +44,20 @@ argv_test:
set_imm I0, 0, 0
set_imm I1, 0, 1
set_imm S0, 0, ARGV
- deref S0, INTERP, S0
- deref S0, S0, I1
+ deref_s S0, INTERP, S0
+ deref_s S0, S0, I1
# TODO: test S0 eq 'kittens'
argv_nok:
set_imm S0, 0, 5
- deref S0, CONSTS, S0
+ deref_s S0, CONSTS, S0
print_s I0, S0, x
goto end, x
argv_ok:
set_imm S0, 0, 4
- deref S0, CONSTS, S0
+ deref_s S0, CONSTS, S0
print_s I0, S0, x
goto end, x
View
6 t/m0/integration/m0_ashr.m0
@@ -8,7 +8,7 @@
.bytecode
set_imm S0, 0, 0
- deref S0, CONSTS, S0
+ deref_s S0, CONSTS, S0
set_imm I0, 0, 1
print_s I0, S0, x
@@ -26,12 +26,12 @@
ashr_nok:
set_imm S0, 0, 1
- deref S0, CONSTS, S0
+ deref_s S0, CONSTS, S0
print_s I0, S0, x
ashr_ok:
set_imm S0, 0, 2
- deref S0, CONSTS, S0
+ deref_s S0, CONSTS, S0
print_s I0, S0, x
# This code isn't really PASM, but the highlighting works well.
View
16 t/m0/integration/m0_chunk_name_const.m0
@@ -9,15 +9,15 @@
set_imm I0, 0, 1
set_imm I1, 0, 0
set_imm S0, 0, 1
- deref S0, CONSTS, S0
+ deref_s S0, CONSTS, S0
print_s I0, S0, x
set_imm S1, 0, 2
- deref S1, CONSTS, S1
+ deref_s S1, CONSTS, S1
print_s I0, S1, x
set_imm P0, 0, 0
- deref P0, CONSTS, P0
+ deref_p P0, CONSTS, P0
goto_chunk P0, I1, x
.chunk "the_second_chunk"
@@ -27,11 +27,11 @@
.metadata
.bytecode
set_imm S1, 0, 1
- deref S1, CONSTS, S1
+ deref_s S1, CONSTS, S1
print_s I0, S1, x
set_imm P0, 0, 0
- deref P0, CONSTS, P0
+ deref_p P0, CONSTS, P0
goto_chunk P0, I1, x
.chunk "chunk3"
@@ -41,11 +41,11 @@
.metadata
.bytecode
set_imm S1, 0, 1
- deref S1, CONSTS, S1
+ deref_s S1, CONSTS, S1
print_s I0, S1, x
set_imm P0, 0, 0
- deref P0, CONSTS, P0
+ deref_p P0, CONSTS, P0
goto_chunk P0, I1, x
.chunk "4thchunk"
@@ -54,7 +54,7 @@
.metadata
.bytecode
set_imm S1, 0, 0
- deref S1, CONSTS, S1
+ deref_s S1, CONSTS, S1
print_s I0, S1, x
exit I1, x, x
View
14 t/m0/integration/m0_convert_i_n.m0
@@ -11,7 +11,7 @@
.bytecode
set_imm S0, 0, 0
- deref S0, CONSTS, S0
+ deref_s S0, CONSTS, S0
set_imm I0, 0, 1
print_s I0, S0, x
@@ -20,7 +20,7 @@
# N1 = 99.0 (from constants segment)
set_imm N1, 0, 3
- deref N1, CONSTS, N1
+ deref_n N1, CONSTS, N1
# N2 = 99 (from convert_i_n)
convert_i_n I2, N1, x
@@ -31,12 +31,12 @@
convert_i_n_nok1:
set_imm S0, 0, 1
- deref S0, CONSTS, S0
+ deref_s S0, CONSTS, S0
print_s I0, S0, x
convert_i_n_ok1:
set_imm S0, 0, 2
- deref S0, CONSTS, S0
+ deref_s S0, CONSTS, S0
print_s I0, S0, x
# I1 = -23
@@ -46,7 +46,7 @@ convert_i_n_ok1:
# N1 = -23.0 (from constants segment)
set_imm N1, 0, 4
- deref N1, CONSTS, N1
+ deref_n N1, CONSTS, N1
# N2 = -23 (from convert_i_n)
convert_i_n I2, N1, x
@@ -57,12 +57,12 @@ convert_i_n_ok1:
convert_i_n_nok2:
set_imm S0, 0, 1
- deref S0, CONSTS, S0
+ deref_s S0, CONSTS, S0
print_s I0, S0, x
convert_i_n_ok2:
set_imm S0, 0, 5
- deref S0, CONSTS, S0
+ deref_s S0, CONSTS, S0
print_s I0, S0, x
# This code isn't really PASM, but the highlighting works well.
View
8 t/m0/integration/m0_deref.m0
@@ -9,12 +9,12 @@
.bytecode
set_imm S0, 0, 0
- deref S0, CONSTS, S0
+ deref_s S0, CONSTS, S0
set_imm I0, 0, 1
print_s I0, S0, x
set_imm N0, 0, 3
- deref N0, CONSTS, N0
+ deref_n N0, CONSTS, N0
set_imm N1, 0, 99
sub_i N0, N0, N1
@@ -23,12 +23,12 @@
deref_nok:
set_imm S0, 0, 1
- deref S0, CONSTS, S0
+ deref_s S0, CONSTS, S0
print_s I0, S0, x
deref_ok:
set_imm S0, 0, 2
- deref S0, CONSTS, S0
+ deref_s S0, CONSTS, S0
print_s I0, S0, x
# This code isn't really PASM, but the highlighting works well.
View
6 t/m0/integration/m0_div_i.m0
@@ -8,7 +8,7 @@
.bytecode
set_imm S0, 0, 0
- deref S0, CONSTS, S0
+ deref_s S0, CONSTS, S0
set_imm I0, 0, 1
print_s I0, S0, x
@@ -23,12 +23,12 @@
divi_nok:
set_imm S0, 0, 1
- deref S0, CONSTS, S0
+ deref_s S0, CONSTS, S0
print_s I0, S0, x
divi_ok:
set_imm S0, 0, 2
- deref S0, CONSTS, S0
+ deref_s S0, CONSTS, S0
print_s I0, S0, x
View
12 t/m0/integration/m0_div_n.m0
@@ -11,17 +11,17 @@
.bytecode
set_imm S0, 0, 0
- deref S0, CONSTS, S0
+ deref_s S0, CONSTS, S0
set_imm I0, 0, 1
print_s I0, S0, x
set_imm N0, 0, 3
- deref N0, CONSTS, N0
+ deref_n N0, CONSTS, N0
set_imm N1, 0, 4
- deref N1, CONSTS, N1
+ deref_n N1, CONSTS, N1
div_n N2, N0, N1
set_imm N3, 0, 5
- deref N3, CONSTS, N3
+ deref_n N3, CONSTS, N3
sub_n N4, N3, N2
goto_if divn_nok, N4
@@ -29,12 +29,12 @@
divn_nok:
set_imm S0, 0, 1
- deref S0, CONSTS, S0
+ deref_s S0, CONSTS, S0
print_s I0, S0, x
divn_ok:
set_imm S0, 0, 2
- deref S0, CONSTS, S0
+ deref_s S0, CONSTS, S0
print_s I0, S0, x
# This code isn't really PASM, but the highlighting works well.
View
12 t/m0/integration/m0_goto_chunk.m0
@@ -10,26 +10,26 @@
# print "1..2"
set_imm S0, 0, 0
- deref S0, CONSTS, S0
+ deref_s S0, CONSTS, S0
set_imm I0, 0, 1
print_s I0, S0, x
# print "ok 1 "....
set_imm S1, 0, 1
- deref S1, CONSTS, S1
+ deref_s S1, CONSTS, S1
print_s I0, S1, x
# goto_chunk "goto_chunk_helper"
set_imm S1, 0, 2
- deref S1, CONSTS, S1
+ deref_s S1, CONSTS, S1
set_imm I1, 0, 0
set_imm P0, 0, 2
- deref P0, CONSTS, P0
+ deref_p P0, CONSTS, P0
goto_chunk P0, I1, x
# print "nok 2"....
set_imm S1, 0, 3
- deref S1, CONSTS, S1
+ deref_s S1, CONSTS, S1
print_s I0, S1, x
.chunk "goto_chunk_helper"
@@ -38,7 +38,7 @@
.metadata
.bytecode
set_imm S0, 0, 0
- deref S0, CONSTS, S0
+ deref_s S0, CONSTS, S0
set_imm I0, 0, 1
print_s I0, S0, x
View
18 t/m0/integration/m0_hash.m0
@@ -20,7 +20,7 @@
set_imm I0, 0, 1
set_imm S0, 0, 0
- deref S0, CONSTS, S0
+ deref_s S0, CONSTS, S0
print_s I0, S0, x
##################################
@@ -30,14 +30,14 @@ hash_calc_init:
# set up some constants for debugging output
set_imm S10, 0, 5
- deref S10, CONSTS, S10
+ deref_s S10, CONSTS, S10
set_imm S11, 0, 6
- deref S11, CONSTS, S11
+ deref_s S11, CONSTS, S11
set_imm S12, 0, 7
- deref S12, CONSTS, S12
+ deref_s S12, CONSTS, S12
set_imm S0, 0, 3
- deref S0, CONSTS, S0
+ deref_s S0, CONSTS, S0
# I1 = number of bytes in string
set_imm I1, 0, 0
@@ -72,7 +72,7 @@ hash_loop_start:
set_imm I10, 0, 1
print_i I0, I10, x
set_imm S11, 0, 6
- deref S11, CONSTS, S11
+ deref_s S11, CONSTS, S11
print_s I0, S11, x
print_i I0, I3, x
print_s I0, S12, x
@@ -117,7 +117,7 @@ end_debug_3:
set_imm I10, 0, 4
print_i I0, I10, x
set_imm S11, 0, 8
- deref S11, CONSTS, S11
+ deref_s S11, CONSTS, S11
print_s I0, S11, x
print_i I0, I4, x
print_s I0, S12, x
@@ -137,7 +137,7 @@ hash_loop_end:
# I4 contains the calculated hash
# store known-good hash in I1
set_imm I1, 0, 4
- deref I1, CONSTS, I1
+ deref_i I1, CONSTS, I1
sub_i I1, I1, I4
@@ -154,7 +154,7 @@ hash_test_ok:
goto print_result, x
print_result:
- deref S0, CONSTS, S0
+ deref_s S0, CONSTS, S0
print_s I0, S0, x
# This code isn't really PASM, but the highlighting works well.
View
6 t/m0/integration/m0_labels_with_goto.m0
@@ -9,15 +9,15 @@
# test that the assembler generate code for a goto
# S0 = "1..1"
set_imm S0, 0, 0
- deref S0, CONSTS, S0
+ deref_s S0, CONSTS, S0
# S1 = "ok 1 ..."
set_imm S1, 0, 1
- deref S1, CONSTS, S1
+ deref_s S1, CONSTS, S1
# S2 = "n"
set_imm S2, 0, 2
- deref S2, CONSTS, S2
+ deref_s S2, CONSTS, S2
set_imm I0, 0, 1
View
4 t/m0/integration/m0_labels_without_goto.m0
@@ -9,9 +9,9 @@
label0:
label333:
label1: set_imm S0, 0, 0
- deref S0, CONSTS, S0
+ deref_s S0, CONSTS, S0
label2: set_imm S1, 0, 1
- deref S1, CONSTS, S1
+ deref_s S1, CONSTS, S1
set_imm I0, 0, 1
label_99: print_s I0, S0, 42
label: print_s I0, S1, 42
View
6 t/m0/integration/m0_lshr.m0
@@ -8,7 +8,7 @@
.bytecode
set_imm S0, 0, 0
- deref S0, CONSTS, S0
+ deref_s S2, CONSTS, S0
set_imm I0, 0, 1
print_s I0, S0, x
@@ -23,12 +23,12 @@
lshr_nok:
set_imm S0, 0, 1
- deref S0, CONSTS, S0
+ deref_s S0, CONSTS, S0
print_s I0, S0, x
lshr_ok:
set_imm S0, 0, 2
- deref S0, CONSTS, S0
+ deref_s S0, CONSTS, S0
print_s I0, S0, x
# This code isn't really PASM, but the highlighting works well.
View
2  t/m0/integration/m0_metadata_basic.m0
@@ -10,7 +10,7 @@
set_imm I0, 0, 1
set_imm S0, 0, 0
- deref S0, CONSTS, S0
+ deref_s S0, CONSTS, S0
print_s I0, S0, x
# This code isn't really PASM, but the highlighting works well.
View
6 t/m0/integration/m0_mod_i.m0
@@ -8,7 +8,7 @@
.bytecode
set_imm S0, 0, 0
- deref S0, CONSTS, S0
+ deref_s S0, CONSTS, S0
set_imm I0, 0, 1
print_s I0, S0, x
@@ -23,12 +23,12 @@
modi_nok:
set_imm S0, 0, 1
- deref S0, CONSTS, S0
+ deref_s S0, CONSTS, S0
print_s I0, S0, x
modi_ok:
set_imm S0, 0, 2
- deref S0, CONSTS, S0
+ deref_s S0, CONSTS, S0
print_s I0, S0, x
View
12 t/m0/integration/m0_mod_n.m0
@@ -11,17 +11,17 @@
.bytecode
set_imm S0, 0, 0
- deref S0, CONSTS, S0
+ deref_s S0, CONSTS, S0
set_imm I0, 0, 1
print_s I0, S0, x
set_imm N0, 0, 3
- deref N0, CONSTS, N0
+ deref_n N0, CONSTS, N0
set_imm N1, 0, 4
- deref N1, CONSTS, N1
+ deref_n N1, CONSTS, N1
mod_n N2, N0, N1
set_imm N3, 0, 5
- deref N3, CONSTS, N3
+ deref_n N3, CONSTS, N3
sub_n N4, N3, N2
goto_if modn_nok, N4
@@ -29,12 +29,12 @@
modn_nok:
set_imm S0, 0, 1
- deref S0, CONSTS, S0
+ deref_s S0, CONSTS, S0
print_s I0, S0, x
modn_ok:
set_imm S0, 0, 2
- deref S0, CONSTS, S0
+ deref_s S0, CONSTS, S0
print_s I0, S0, x
View
6 t/m0/integration/m0_mult_i.m0
@@ -8,7 +8,7 @@
.bytecode
set_imm S0, 0, 0
- deref S0, CONSTS, S0
+ deref_s S0, CONSTS, S0
set_imm I0, 0, 1
print_s I0, S0, x
@@ -23,12 +23,12 @@
multi_nok:
set_imm S0, 0, 1
- deref S0, CONSTS, S0
+ deref_s S0, CONSTS, S0
print_s I0, S0, x
multi_ok:
set_imm S0, 0, 2
- deref S0, CONSTS, S0
+ deref_s S0, CONSTS, S0
print_s I0, S0, x
View
12 t/m0/integration/m0_mult_n.m0
@@ -11,17 +11,17 @@
.bytecode
set_imm S0, 0, 0
- deref S0, CONSTS, S0
+ deref_s S0, CONSTS, S0
set_imm I0, 0, 1
print_s I0, S0, x
set_imm N0, 0, 3
- deref N0, CONSTS, N0
+ deref_n N0, CONSTS, N0
set_imm N1, 0, 4
- deref N1, CONSTS, N1
+ deref_n N1, CONSTS, N1
mult_n N2, N1, N0
set_imm N3, 0, 5
- deref N3, CONSTS, N3
+ deref_n N3, CONSTS, N3
sub_n N4, N3, N2
goto_if multn_nok, N4
@@ -29,12 +29,12 @@
multn_nok:
set_imm S0, 0, 1
- deref S0, CONSTS, S0
+ deref_s S0, CONSTS, S0
print_s I0, S0, x
multn_ok:
set_imm S0, 0, 2
- deref S0, CONSTS, S0
+ deref_s S0, CONSTS, S0
print_s I0, S0, x
# This code isn't really PASM, but the highlighting works well.
View
4 t/m0/integration/m0_noop.m0
@@ -8,11 +8,11 @@
noop x, x, x
# S0 = "1..1"
set_imm S0, 0, 0
-deref S0, CONSTS, S0
+deref_s S0, CONSTS, S0
noop x, x, x
# S1 = "ok 1 noop doesn't do anything"
set_imm S1, 0, 1
-deref S1, CONSTS, S1
+deref_s S1, CONSTS, S1
noop x, x, x
# I0 = 1 (stdout)
set_imm I0, 0, 1
View
6 t/m0/integration/m0_or.m0
@@ -8,7 +8,7 @@
.bytecode
set_imm S0, 0, 0
- deref S0, CONSTS, S0
+ deref_s S0, CONSTS, S0
set_imm I0, 0, 1
print_s I0, S0, x
@@ -23,12 +23,12 @@
or_nok:
set_imm S0, 0, 1
- deref S0, CONSTS, S0
+ deref_s S0, CONSTS, S0
print_s I0, S0, x
or_ok:
set_imm S0, 0, 2
- deref S0, CONSTS, S0
+ deref_s S0, CONSTS, S0
print_s I0, S0, x
# This code isn't really PASM, but the highlighting works well.
View
56 t/m0/integration/m0_poke_caller.m0
@@ -32,11 +32,11 @@
set_imm I0, 0, 1
set_imm S0, 0, 0
- deref S0, CONSTS, S0
+ deref_s S0, CONSTS, S0
print_s I0, S0, x
# print "ok 1 control flow in 'caller' at start"
set_imm S0, 0, 1
- deref S0, CONSTS, S0
+ deref_s S0, CONSTS, S0
print_s I0, S0, x
# print value of I23
@@ -44,7 +44,7 @@
# check that I23 == 9999
set_imm I1, 0, 8
- deref I1, CONSTS, I1
+ deref_i I1, CONSTS, I1
sub_i I1, I1, I23
goto_if preinvoke_nok, I1
@@ -52,17 +52,17 @@
preinvoke_nok:
set_imm S1, 0, 6
- deref S1, CONSTS, S1
+ deref_s S1, CONSTS, S1
print_s I0, S1, x
preinvoke_ok:
set_imm S1, 0, 7
- deref S1, CONSTS, S1
+ deref_s S1, CONSTS, S1
print_s I0, S1, x
print_i I0, I23, x
set_imm S2, 0, 9
- deref S2, CONSTS, S2
+ deref_s S2, CONSTS, S2
print_s I0, S2, x
# create a new call frame
@@ -134,7 +134,7 @@ init_cf_pc:
post_set:
# put the name of the target chunk into S0
set_imm P0, 0, 3
- deref P0, CONSTS, P0
+ deref_p P0, CONSTS, P0
# put the target PC into I0
set_imm I0, 0, 0
goto_chunk P0, I0, x
@@ -171,12 +171,12 @@ invoke_cf:
# print "caller at end "
set_imm S3, 0, 4
- deref S3, CONSTS, S3
+ deref_s S3, CONSTS, S3
print_s I0, S3, x
# print value I23
set_imm S4, 0, 2
- deref S4, CONSTS, S4
+ deref_s S4, CONSTS, S4
print_s I0, S4, 99
print_i I0, I23, x
print_s I0, S2, x
@@ -204,42 +204,42 @@ invoke_cf:
# print "ok 3 "...
set_imm I0, 0, 1
set_imm S0, 0, 0
- deref S0, CONSTS, S0
+ deref_s S0, CONSTS, S0
print_s I0, S0, x
#print value I23
set_imm I23, 99, 99
set_imm I1, 0, 8
- deref I1, CONSTS, I1
+ deref_i I1, CONSTS, I1
sub_i I1, I1, I23
goto_if callee_i23_nok, I1
goto callee_i23_ok, x
callee_i23_nok:
- set_imm S1, 0, 9
- deref S1, CONSTS, S1
- print_s I0, S1, x
+ set_imm S1, 0, 9
+ deref_s S1, CONSTS, S1
+ print_s I0, S1, x
callee_i23_ok:
- set_imm S1, 0, 6
- deref S1, CONSTS, S1
- print_s I0, S1, x
- print_i I0, I23, x
+ set_imm S1, 0, 6
+ deref_s S1, CONSTS, S1
+ print_s I0, S1, x
+ print_i I0, I23, x
set_imm S1, 0, 7
- deref S1, CONSTS, S1
+ deref_s S1, CONSTS, S1
print_s I0, S1, x
set_imm S3, 0, 4
- deref S3, CONSTS, S3
+ deref_s S3, CONSTS, S3
# poke into the parent call frame
set_imm I2, 0, I23
- deref I2, PCF, I2
+ deref_i I2, PCF, I2
set_imm I1, 0, 11
- deref I1, CONSTS, I1
+ deref_i I1, CONSTS, I1
sub_i I1, I1, I2
goto_if caller_i23_nok, I1
@@ -247,28 +247,28 @@ callee_i23_ok:
caller_i23_nok:
set_imm S1, 0, 9
- deref S1, CONSTS, S1
+ deref_s S1, CONSTS, S1
print_s I0, S1, x
caller_i23_ok:
set_imm S1, 0, 10
- deref S1, CONSTS, S1
+ deref_s S1, CONSTS, S1
print_s I0, S1, x
print_i I0, I2, x
set_imm S1, 0, 7
- deref S1, CONSTS, S1
+ deref_s S1, CONSTS, S1
print_s I0, S1, x
# figure out return PC and chunk
# P0 is the parent call frame
set_imm I3, 0, PCF
- deref P0, CF, I3
+ deref_p P0, CF, I3
# I4 is the parent call frame's RETPC
set_imm I4, 0, RETPC
- deref I4, P0, I4
+ deref_i I4, P0, I4
# S3 is the parent call frame's CHUNK
set_imm I3, 0, CHUNK
- deref I3, CONSTS, I3
+ deref_i I3, CONSTS, I3
goto_chunk I3, I4, x
# This code should be unreachable.
View
8 t/m0/integration/m0_set.m0
@@ -9,12 +9,12 @@
.bytecode
set_imm S0, 0, 0
- deref S0, CONSTS, S0
+ deref_s S0, CONSTS, S0
set_imm I0, 0, 1
print_s I0, S0, x
set_imm N0, 0, 3
- deref N0, CONSTS, N0
+ deref_n N0, CONSTS, N0
set N1, N0, x
set_imm N0, 0, 99
sub_i N0, N0, N1
@@ -24,12 +24,12 @@
set_nok:
set_imm S0, 0, 1
- deref S0, CONSTS, S0
+ deref_s S0, CONSTS, S0
print_s I0, S0, x
set_ok:
set_imm S0, 0, 2
- deref S0, CONSTS, S0
+ deref_s S0, CONSTS, S0
print_s I0, S0, x
# This code isn't really PASM, but the highlighting works well.
View
8 t/m0/integration/m0_set_imm.m0
@@ -9,12 +9,12 @@
.bytecode
set_imm S0, 0, 0
- deref S0, CONSTS, S0
+ deref_s S0, CONSTS, S0
set_imm I0, 0, 1
print_s I0, S0, x
set_imm N0, 0, 3
- deref N0, CONSTS, N0
+ deref_n N0, CONSTS, N0
set_imm N1, 0, 99
sub_i N0, N0, N1
@@ -23,12 +23,12 @@
set_imm_nok:
set_imm S0, 0, 1
- deref S0, CONSTS, S0
+ deref_s S0, CONSTS, S0
print_s I0, S0, x
set_imm_ok:
set_imm S0, 0, 2
- deref S0, CONSTS, S0
+ deref_s S0, CONSTS, S0
print_s I0, S0, x
# This code isn't really PASM, but the highlighting works well.
View
10 t/m0/integration/m0_set_ref.m0
@@ -10,15 +10,15 @@
.bytecode
set_imm S0, 0, 0
- deref S0, CONSTS, S0
+ deref_s S0, CONSTS, S0
set_imm I0, 0, 1
print_s I0, S0, x
set_imm N0, 0, 4
- deref N0, CONSTS, N0
+ deref_n N0, CONSTS, N0
set_imm N1, 0, 4
- deref N1, CONSTS, N1
+ deref_n N1, CONSTS, N1
sub_i N0, N0, N1
goto_if set_ref_nok, N0
@@ -26,12 +26,12 @@
set_ref_nok:
set_imm S0, 0, 1
- deref S0, CONSTS, S0
+ deref_s S0, CONSTS, S0
print_s I0, S0, x
set_ref_ok:
set_imm S0, 0, 2
- deref S0, CONSTS, S0
+ deref_s S0, CONSTS, S0
print_s I0, S0, x
# This code isn't really PASM, but the highlighting works well.
View
6 t/m0/integration/m0_shl.m0
@@ -8,7 +8,7 @@
.bytecode
set_imm S0, 0, 0
- deref S0, CONSTS, S0
+ deref_s S0, CONSTS, S0
set_imm I0, 0, 1
print_s I0, S0, x
@@ -23,12 +23,12 @@
shl_nok:
set_imm S0, 0, 1
- deref S0, CONSTS, S0
+ deref_s S0, CONSTS, S0
print_s I0, S0, x
shl_ok:
set_imm S0, 0, 2
- deref S0, CONSTS, S0
+ deref_s S0, CONSTS, S0
print_s I0, S0, x
# This code isn't really PASM, but the highlighting works well.
View
6 t/m0/integration/m0_sub_i.m0
@@ -8,7 +8,7 @@
.bytecode
set_imm S0, 0, 0
- deref S0, CONSTS, S0
+ deref_s S0, CONSTS, S0
set_imm I0, 0, 1
print_s I0, S0, x
@@ -23,12 +23,12 @@
subi_nok:
set_imm S0, 0, 1
- deref S0, CONSTS, S0
+ deref_s S0, CONSTS, S0
print_s I0, S0, x
subi_ok:
set_imm S0, 0, 2
- deref S0, CONSTS, S0
+ deref_s S0, CONSTS, S0
print_s I0, S0, x
View
12 t/m0/integration/m0_sub_n.m0
@@ -11,17 +11,17 @@
.bytecode
set_imm S0, 0, 0
- deref S0, CONSTS, S0
+ deref_s S0, CONSTS, S0
set_imm I0, 0, 1
print_s I0, S0, x
set_imm N0, 0, 3
- deref N0, CONSTS, N0
+ deref_n N0, CONSTS, N0
set_imm N1, 0, 4
- deref N1, CONSTS, N1
+ deref_n N1, CONSTS, N1
sub_n N2, N0, N1
set_imm N3, 0, 5
- deref N3, CONSTS, N3
+ deref_n N3, CONSTS, N3
sub_n N4, N3, N2
goto_if subn_nok, N4
@@ -29,12 +29,12 @@
subn_nok:
set_imm S0, 0, 1
- deref S0, CONSTS, S0
+ deref_s S0, CONSTS, S0
print_s I0, S0, x
subn_ok:
set_imm S0, 0, 2
- deref S0, CONSTS, S0
+ deref_s S0, CONSTS, S0
print_s I0, S0, x
# This code isn't really PASM, but the highlighting works well.
View
6 t/m0/integration/m0_xor.m0
@@ -8,7 +8,7 @@
.bytecode
set_imm S0, 0, 0
- deref S0, CONSTS, S0
+ deref_s S0, CONSTS, S0
set_imm I0, 0, 1
print_s I0, S0, x
@@ -23,12 +23,12 @@
xor_nok:
set_imm S0, 0, 1
- deref S0, CONSTS, S0
+ deref_s S0, CONSTS, S0
print_s I0, S0, x
xor_ok:
set_imm S0, 0, 2
- deref S0, CONSTS, S0
+ deref_s S0, CONSTS, S0
print_s I0, S0, x
# This code isn't really PASM, but the highlighting works well.
Please sign in to comment.
Something went wrong with that request. Please try again.