From 43e08af5c5740b3e15e103fba6d00d0e656c88af Mon Sep 17 00:00:00 2001 From: Connor Olding Date: Sat, 23 Apr 2016 16:43:43 -0700 Subject: [PATCH] fix some branch pseudo-instructions; fix example --- example.lua | 5 ++++- lips/overrides.lua | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/example.lua b/example.lua index d2d248a..e76873c 100644 --- a/example.lua +++ b/example.lua @@ -1,3 +1,6 @@ package.path = package.path..";?/init.lua" local lips = require "lips" -lips('example.asm') +local err = lips('example.asm', nil, {offset=0}) +if err then + print(err) +end diff --git a/lips/overrides.lua b/lips/overrides.lua index 55f231d..70ac6ea 100644 --- a/lips/overrides.lua +++ b/lips/overrides.lua @@ -262,7 +262,7 @@ function overrides.BLEI(self, name) end self:push_new('BEQ', reg, 'R0', beq_offset) - self:push_new('SLT', 'AT', reg, immediate) + self:push_new('SLTI', 'AT', reg, immediate) self:push_new(branch, 'AT', 'R0', offset) end