simon 01/09/03 09:43:17
Modified: . opcode_table
Log:
Since we specify the opcode number, we can rearrange to a more
human-friendly ordering.
Revision Changes Path
1.2 +30 -12 parrot/opcode_table
Index: opcode_table
===================================================================
RCS file: /home/perlcvs/parrot/opcode_table,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -w -r1.1 -r1.2
--- opcode_table 2001/08/29 12:07:03 1.1
+++ opcode_table 2001/09/03 16:43:17 1.2
@@ -8,34 +8,52 @@
# The arg_types are the types to be packed (integer, number, whatever)
# not the type of the register or anything. So N3 is still an i, since that
# 3 specifying the register should be packed as an integer.
+
+# Integer ops
+
0 set_i_ic 2 i i
1 add_i 3 i i i
7 sub_i 3 i i i
8 mul_i 3 i i i
9 div_i 3 i i i
-2 eq_i_ic 4 i i i i
-3 time_i 1 i
-4 print_i 1 i
-5 branch_ic 1 i
-6 end 0
-10 if_i_ic 3 i i i
11 inc_i 1 i
12 inc_i_ic 2 i i
13 dec_i 1 i
14 dec_i_ic 2 i i
-15 jump_i 1 i
+
+# NUM ops
+
16 set_n_nc 2 i n
17 add_n 3 i i i
18 sub_n 3 i i i
19 mul_n 3 i i i
20 div_n 3 i i i
-21 eq_n_ic 4 i i i i
-22 time_n 1 i
-23 print_n 1 i
-24 if_n_ic 3 i i i
25 inc_n 1 i
26 inc_n_nc 2 i n
27 dec_n 1 i
28 dec_n_nc 2 i n
+
+# Comparators
+
+2 eq_i_ic 4 i i i i
+21 eq_n_ic 4 i i i i
+
+# Flow control
+
+6 end 0
+15 jump_i 1 i
+5 branch_ic 1 i
+10 if_i_ic 3 i i i
+24 if_n_ic 3 i i i
+
+# Convertors
+
29 iton_n_i 2 i i
30 ntoi_i_n 2 i i
\ No newline at end of file
+
+# Miscellaneous ops
+
+3 time_i 1 i
+4 print_i 1 i
+22 time_n 1 i
+23 print_n 1 i