Permalink
Browse files

Update deref calls to use registers instead of values.

  • Loading branch information...
1 parent 3d278b2 commit ad01bd6062d08bbff923b680d2bfc4784204d28c @nbrown nbrown committed Apr 9, 2012
@@ -17,14 +17,15 @@
set_imm N0, 0, 3
deref N0, CONSTS, N0
- deref N0, N0, 0
+ set_imm I1, 0, 0
+ deref N0, N0, I1
set_imm N1, 0, 4
deref N1, CONSTS, N1
- deref N1, N1, 0
+ deref N1, N1, I1
add_n N2, N1, N0
set_imm N3, 0, 5
deref N3, CONSTS, N3
- deref N3, N3, 0
+ deref N3, N3, I1
sub_n N4, N3, N2
goto_if addn_nok, N4
@@ -21,7 +21,8 @@
# N1 = 99.0 (from constants segment)
set_imm N1, 0, 3
deref N1, CONSTS, N1
- deref N1, N1, 0
+ set_imm I3, 0, 0
+ deref N1, N1, I3
# N2 = 99 (from convert_i_n)
convert_i_n I2, N1, x
@@ -48,7 +49,8 @@ convert_i_n_ok1:
# N1 = -23.0 (from constants segment)
set_imm N1, 0, 4
deref N1, CONSTS, N1
- deref N1, N1, 0
+ set_imm I3, 0, 0
+ deref N1, N1, I3
# N2 = -23 (from convert_i_n)
convert_i_n I2, N1, x
@@ -15,7 +15,8 @@
set_imm N0, 0, 3
deref N0, CONSTS, N0
- deref N0, N0, 0
+ set_imm I1, 0, 0
+ deref N0, N0, I1
set_imm N1, 0, 99
sub_i N0, N0, N1
@@ -17,14 +17,15 @@
set_imm N0, 0, 3
deref N0, CONSTS, N0
- deref N0, N0, 0
+ set_imm I1, 0, 0
+ deref N0, N0, I1
set_imm N1, 0, 4
deref N1, CONSTS, N1
- deref N1, N1, 0
+ deref N1, N1, I1
div_n N2, N0, N1
set_imm N3, 0, 5
deref N3, CONSTS, N3
- deref N3, N3, 0
+ deref N3, N3, I1
sub_n N4, N3, N2
goto_if divn_nok, N4
@@ -17,14 +17,15 @@
set_imm N0, 0, 3
deref N0, CONSTS, N0
- deref N0, N0, 0
+ set_imm I1, 0, 0
+ deref N0, N0, I1
set_imm N1, 0, 4
deref N1, CONSTS, N1
- deref N1, N1, 0
+ deref N1, N1, I1
mod_n N2, N0, N1
set_imm N3, 0, 5
deref N3, CONSTS, N3
- deref N3, N3, 0
+ deref N3, N3, I1
sub_n N4, N3, N2
goto_if modn_nok, N4
@@ -17,14 +17,15 @@
set_imm N0, 0, 3
deref N0, CONSTS, N0
- deref N0, N0, 0
+ set_imm I1, 0, 0
+ deref N0, N0, I1
set_imm N1, 0, 4
deref N1, CONSTS, N1
- deref N1, N1, 0
+ deref N1, N1, I1
mult_n N2, N1, N0
set_imm N3, 0, 5
deref N3, CONSTS, N3
- deref N3, N3, 0
+ deref N3, N3, I1
sub_n N4, N3, N2
goto_if multn_nok, N4
@@ -45,7 +45,8 @@
# check that I23 == 9999
set_imm I1, 0, 8
deref I1, CONSTS, I1
- deref I1, I1, 0
+ set_imm I2, 0, 0
+ deref I1, I1, I2
sub_i I1, I1, I23
goto_if preinvoke_nok, I1
@@ -212,6 +213,8 @@ invoke_cf:
set_imm I23, 99, 99
set_imm I1, 0, 8
deref I1, CONSTS, I1
+ set_imm I2, 0, 0
+ deref I1, I1, I2
sub_i I1, I1, I23
goto_if callee_i23_nok, I1
@@ -241,6 +244,8 @@ callee_i23_ok:
set_imm I1, 0, 11
deref I1, CONSTS, I1
+ set_imm I3, 0, 0
+ deref I1, I1, I3
sub_i I1, I1, I2
goto_if caller_i23_nok, I1
@@ -15,7 +15,8 @@
set_imm N0, 0, 3
deref N0, CONSTS, N0
- deref N0, N0, 0
+ set_imm I1, 0, 0
+ deref N0, N0, I1
set N1, N0, x
set_imm N0, 0, 99
sub_i N0, N0, N1
@@ -15,7 +15,8 @@
set_imm N0, 0, 3
deref N0, CONSTS, N0
- deref N0, N0, 0
+ set_imm I1, 0, 0
+ deref N0, N0, I1
set_imm N1, 0, 99
sub_i N0, N0, N1
@@ -16,11 +16,12 @@
set_imm N0, 0, 4
deref N0, CONSTS, N0
- deref N0, N0, 0
+ set_imm I1, 0, 0
+ deref N0, N0, I1
set_imm N1, 0, 4
deref N1, CONSTS, N1
- deref N1, N1, 0
+ deref N1, N1, I1
sub_i N0, N0, N1
goto_if set_ref_nok, N0
@@ -17,14 +17,15 @@
set_imm N0, 0, 3
deref N0, CONSTS, N0
- deref N0, N0, 0
+ set_imm I1, 0, 0
+ deref N0, N0, I1
set_imm N1, 0, 4
deref N1, CONSTS, N1
- deref N1, N1, 0
+ deref N1, N1, I1
sub_n N2, N0, N1
set_imm N3, 0, 5
deref N3, CONSTS, N3
- deref N3, N3, 0
+ deref N3, N3, I1
sub_n N4, N3, N2
goto_if subn_nok, N4

0 comments on commit ad01bd6

Please sign in to comment.