summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--rvcontroller.lua5
1 files changed, 1 insertions, 4 deletions
diff --git a/rvcontroller.lua b/rvcontroller.lua
index 40978ca..d6381e2 100644
--- a/rvcontroller.lua
+++ b/rvcontroller.lua
@@ -2828,16 +2828,13 @@ local function run(limit)
first = false
local instruction = readram(mem.registers.pc,4,true)
if mem.lpe and mem.mlpe then
- if instruction%2^12 == 0x017 and mem.registers.pc%4 == 0 and (math.floor(instruction/2^12) == mem.lplabel or math.floor(instruction/2^12) == 0) then
+ if instruction%2^12 == 0x017 and mem.registers.pc%4 == 0 and (math.floor(instruction/2^12) == math.floor(getreg(7)/2^12) or math.floor(instruction/2^12) == 0) then
mem.lpe = false
else
trap(18,2)
end
end
mem.lpe = mem.mlpe and checklpe(instruction)
- if mem.lpe then
- mem.lplabel = math.floor(getreg(7)/2^12)
- end
if instruction%4 == 3 or not mem.isa.c then
if mem.registers.pc%4 ~= 0 and not mem.isa.c then
local _,stop = trap(0)