@@ -1221,6 +1221,9 @@ gen STORE4(CONSTANT():c, DEREF4(ADDRESS():a)) uses hl
12211221gen a := ADD1(a, b|d|h:lhs)
12221222 { E_add(REG_A, $lhs); }
12231223
1224+ gen a := ADD1(a, DEREF1(hl))
1225+ { R_flush(REG_A); E("\tadd a,(hl)\n"); }
1226+
12241227gen a|b|d|h := ADD1($$, CONSTANT(value==-1))
12251228 { E_dec($$); }
12261229
@@ -1233,6 +1236,9 @@ gen a := ADD1(a, CONSTANT():c)
12331236gen a := SUB1(a, b|d|h:rhs)
12341237 { E_sub($rhs); }
12351238
1239+ gen a := SUB1(a, DEREF1(hl))
1240+ { R_flush(REG_A); E("\tsub a,(hl)\n"); }
1241+
12361242gen a|b|d|h := SUB1($$, CONSTANT(value==1))
12371243 { E_dec($$); }
12381244
@@ -1254,18 +1260,27 @@ gen a := NEG1(b|d|h:lhs)
12541260gen a := OR1(a, b|d|h:lhs)
12551261 { E_or($lhs); }
12561262
1263+ gen a := OR1(a, DEREF1(hl))
1264+ { R_flush(REG_A); E("\tor a,(hl)\n"); }
1265+
12571266gen a := OR1(a, CONSTANT():c)
12581267 { E_ori($c.value as uint8); }
12591268
12601269gen a := AND1(a, b|d|h:lhs)
12611270 { E_and($lhs); }
12621271
1272+ gen a := AND1(a, DEREF1(hl))
1273+ { R_flush(REG_A); E("\tand a,(hl)\n"); }
1274+
12631275gen a := AND1(a, CONSTANT():c)
12641276 { E_andi($c.value as uint8); }
12651277
12661278gen a := EOR1(a, b|d|h:lhs)
12671279 { E_xor($lhs); }
12681280
1281+ gen a := EOR1(a, DEREF1(hl))
1282+ { R_flush(REG_A); E("\txor a,(hl)\n"); }
1283+
12691284gen a := EOR1(a, CONSTANT():c)
12701285 { E_xori($c.value as uint8); }
12711286
0 commit comments