diff --git a/src/cowbe/arch8080.cow.ng b/src/cowbe/arch8080.cow.ng index 9d057ec9..034665e7 100644 --- a/src/cowbe/arch8080.cow.ng +++ b/src/cowbe/arch8080.cow.ng @@ -1085,16 +1085,16 @@ gen bc|de|hl := SUB2(bc|de|hl:lhs, CONSTANT():c) uses a aluop2i($lhs, $c.value as uint16, $$, "sui", "sbi"); } -gen de := DIVU2(de, bc) uses a +gen de := DIVU2(de, bc) uses a|hl { dvrmu2(); } gen hl := REMU2(de, bc) uses a { dvrmu2(); } -gen de := DIVS2(de, bc) uses a +gen de := DIVS2(de, bc) uses a|hl { dvrms2(); } -gen hl := REMS2(de, bc) uses a +gen hl := REMS2(de, bc) uses a|hl { dvrms2(); } gen hl := MUL2(hl, de) uses a|bc diff --git a/src/cowbe/archz80.cow.ng b/src/cowbe/archz80.cow.ng index 726d6a60..9060474a 100644 --- a/src/cowbe/archz80.cow.ng +++ b/src/cowbe/archz80.cow.ng @@ -1423,16 +1423,16 @@ gen hl := SUB2(hl:lhs, bc|de:rhs) %} -gen bc := DIVU2(bc, de) uses a +gen bc := DIVU2(bc, de) uses a|hl { E_dvrmu2(); } gen hl := REMU2(bc, de) uses a { E_dvrmu2(); } -gen bc := DIVS2(bc, de) uses a +gen bc := DIVS2(bc, de) uses a|hl { E_dvrms2(); } -gen de := REMS2(bc, de) uses a +gen de := REMS2(bc, de) uses a|hl { E_dvrms2(); } gen hl := MUL2(de, bc) uses a @@ -1550,7 +1550,7 @@ gen hlhl := REMU4(bcbc, dede) uses a gen bcbc := DIVS4(bcbc, dede) uses a|hlhl { E_callhelper("_dvrms4"); } -gen dede := REMS4(bcbc, dede) uses a +gen dede := REMS4(bcbc, dede) uses a|hlhl { E_callhelper("_dvrms4"); } gen hlhl := AND4(dede, hlhl) uses a