some helper functions

for when i started the assembler div10
in the end i did the div10 in some, so no need
This commit is contained in:
Torsten Ruger
2015-11-13 20:47:08 +02:00
parent 4a8bb32039
commit 9ab3de234d
4 changed files with 15 additions and 0 deletions

View File

@ -119,6 +119,12 @@ module Soml
return reg
end
def copy reg , source
copied = use_reg reg.type
add_code Reister.transfer source , reg , copied
copied
end
# releasing a register (accuired by use_reg) makes it available for use again
# thus avoiding possibly using too many registers
def release_reg reg