diff --git a/mach/vc4/as/mach4.c b/mach/vc4/as/mach4.c index 73cbea8e4..4c87209ee 100644 --- a/mach/vc4/as/mach4.c +++ b/mach/vc4/as/mach4.c @@ -22,8 +22,8 @@ operation | OP_BRANCH CC GPR ',' '#' absexp ',' expr { branch_addcmp_lit_lit_instr($2, 0, $3, $6, &$8); } | OP_ADDCMPB GPR ',' GPR ',' GPR ',' expr { branch_addcmp_reg_reg_instr(ALWAYS, $2, $4, $6, &$8); } | OP_ADDCMPB CC GPR ',' GPR ',' GPR ',' expr { branch_addcmp_reg_reg_instr($2, $3, $5, $7, &$9); } - | OP_ADDCMPB GPR ',' '#' absexp ',' GPR ',' expr { branch_addcmp_reg_reg_instr(ALWAYS, $2, $5, $7, &$9); } - | OP_ADDCMPB CC GPR ',' '#' absexp ',' GPR ',' expr { branch_addcmp_reg_reg_instr($2, $3, $6, $8, &$10); } + | OP_ADDCMPB GPR ',' '#' absexp ',' GPR ',' expr { branch_addcmp_lit_reg_instr(ALWAYS, $2, $5, $7, &$9); } + | OP_ADDCMPB CC GPR ',' '#' absexp ',' GPR ',' expr { branch_addcmp_lit_reg_instr($2, $3, $6, $8, &$10); } | OP_ADDCMPB GPR ',' GPR ',' '#' absexp ',' expr { branch_addcmp_reg_lit_instr(ALWAYS, $2, $4, $7, &$9); } | OP_ADDCMPB CC GPR ',' GPR ',' '#' absexp ',' expr { branch_addcmp_reg_lit_instr($2, $3, $5, $8, &$10); } | OP_ADDCMPB GPR ',' '#' absexp ',' '#' absexp ',' expr { branch_addcmp_lit_lit_instr(ALWAYS, $2, $5, $8, &$10); } diff --git a/mach/vc4/ncg/table b/mach/vc4/ncg/table index fd9a106e8..c8dbcb77c 100644 --- a/mach/vc4/ncg/table +++ b/mach/vc4/ncg/table @@ -1044,17 +1044,17 @@ PATTERNS pat zle call anyz("b.le") /* Branch if signed top <= 0 */ proc anyb example beq - with GPR+CONST GPRI STACK + with GPRI+CONST GPRI STACK gen cmp %2, %1 beq[1] {LABEL, $1} - pat beq call anyz("b.eq") /* Branch if signed second == top */ - pat bne call anyz("b.ne") /* Branch if signed second != top */ - pat bgt call anyz("b.gt") /* Branch if signed second > top */ - pat bge call anyz("b.ge") /* Branch if signed second >= top */ - pat blt call anyz("b.lt") /* Branch if signed second < top */ - pat ble call anyz("b.le") /* Branch if signed second <= top */ + pat beq call anyb("b.eq") /* Branch if signed second == top */ + pat bne call anyb("b.ne") /* Branch if signed second != top */ + pat bgt call anyb("b.gt") /* Branch if signed second > top */ + pat bge call anyb("b.ge") /* Branch if signed second >= top */ + pat blt call anyb("b.lt") /* Branch if signed second < top */ + pat ble call anyb("b.le") /* Branch if signed second <= top */ proc cmu_z example cmu zeq with GPR+CONST GPRI STACK