From a1ecea341a9bebbbf43a478a049860a62302c897 Mon Sep 17 00:00:00 2001 From: Simon Forman Date: Sat, 9 Nov 2019 14:02:18 -0800 Subject: [PATCH] Minor refactor. --- thun/compiler.markII.pl | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/thun/compiler.markII.pl b/thun/compiler.markII.pl index 39d6f93..f361283 100644 --- a/thun/compiler.markII.pl +++ b/thun/compiler.markII.pl @@ -190,11 +190,10 @@ language. ⟐(if_zero(Reg, Label)) --> [sub_imm(Reg, Reg, 0), eq_offset(Label)]. ⟐(sub_base_from_offset(Reg, Base)) --> - [sub_imm(Reg, Reg, 0), - eq_offset(LABEL), % if the offset is zero don't subtract the Base address. it's empty list. - sub(Reg, Reg, Base), - and_imm(Reg, Reg, 0x7fff), % Mask off high bits. - label(LABEL)]. + ⟐(if_zero(Reg, Label)), % if the offset is zero don't subtract + [sub(Reg, Reg, Base), % the Base address, it's the empty list. + and_imm(Reg, Reg, 0x7fff), % Mask off high bits. + label(Label)]. do :- -- 2.11.0