From 0643b966419d19c4c3d2db854df6cfc1c24d183d Mon Sep 17 00:00:00 2001 From: Torsten Ruger Date: Tue, 17 Nov 2015 02:28:47 +0200 Subject: [PATCH] update arm and small code changes from the fact that just loading a variable does not change status flags --- Gemfile.lock | 2 +- lib/soml/parfait/integer.soml | 3 +-- test/compiler/fragments/test_functions.rb | 4 ++-- test/parfait/helper.rb | 1 + 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 16292c3d..b68cda37 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,6 +1,6 @@ GIT remote: git://github.com/salama/salama-arm.git - revision: c711d34418f08bb2d7c5fea3cbe4149bdd22aa61 + revision: 0a950de25a9d286fccf7d33834534a0c3a6d2682 specs: salama-arm (0.3.0) diff --git a/lib/soml/parfait/integer.soml b/lib/soml/parfait/integer.soml index e25576d2..75c8329e 100644 --- a/lib/soml/parfait/integer.soml +++ b/lib/soml/parfait/integer.soml @@ -69,9 +69,8 @@ class Integer < Value tmp2 = me + tmp2 tmp2 = tmp2 << 1 - minus_10 = tmp2 - minus_10 - if_minus(minus_10) + if_minus(tmp2 - minus_10) me = me + 1 end return me diff --git a/test/compiler/fragments/test_functions.rb b/test/compiler/fragments/test_functions.rb index 4006be0a..2c07f813 100644 --- a/test/compiler/fragments/test_functions.rb +++ b/test/compiler/fragments/test_functions.rb @@ -8,7 +8,7 @@ class TestFunctions < MiniTest::Test class Object int times(int a, int b) - if_zero( b ) + if_zero( b + 0) a = 0 else int m = b - 1 @@ -29,7 +29,7 @@ class Object end end HERE - @length = 483 + @length = 505 check_return 80 end diff --git a/test/parfait/helper.rb b/test/parfait/helper.rb index 462b521a..a7a450f1 100644 --- a/test/parfait/helper.rb +++ b/test/parfait/helper.rb @@ -41,6 +41,7 @@ HERE def connected return @@conn if defined?(@@conn) + return @@conn = false begin box = Rye::Box.new("localhost" , :port => 2222 , :user => "pi") box.pwd