summaryrefslogtreecommitdiff
path: root/rvcontroller.lua
diff options
context:
space:
mode:
authorcheapie <cheapiephp@gmail.com>2026-11-04 19:34:00 -0600
committercheapie <cheapiephp@gmail.com>2026-11-04 19:34:00 -0600
commit6fc47c5b8ff009bbae39ac11b57909bff6fb9039 (patch)
treea7082204e46046c8448dfebeb9de6648c1fd05ba /rvcontroller.lua
parent78a0395359778eb1a24fdd9332e7fafa041746c5 (diff)
downloadrvcontroller-6fc47c5b8ff009bbae39ac11b57909bff6fb9039.tar
rvcontroller-6fc47c5b8ff009bbae39ac11b57909bff6fb9039.tar.gz
rvcontroller-6fc47c5b8ff009bbae39ac11b57909bff6fb9039.tar.bz2
rvcontroller-6fc47c5b8ff009bbae39ac11b57909bff6fb9039.tar.xz
rvcontroller-6fc47c5b8ff009bbae39ac11b57909bff6fb9039.zip
Fix some Zicfilp weirdness
Diffstat (limited to 'rvcontroller.lua')
-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)