From dbcd39c27794b11f2587d356de7d84436c8470ea Mon Sep 17 00:00:00 2001 From: Torsten Ruger Date: Sat, 14 Nov 2015 00:22:23 +0200 Subject: [PATCH] helper do get the register no as int for arm --- lib/register/register_value.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/register/register_value.rb b/lib/register/register_value.rb index b41c6dec..66e7b362 100644 --- a/lib/register/register_value.rb +++ b/lib/register/register_value.rb @@ -23,6 +23,10 @@ module Register s end + def reg_no + @type.to_s[1 .. -1].to_i + end + def self.look_like_reg is_it return true if is_it.is_a? RegisterValue return false unless is_it.is_a? Symbol