@@ -13132,7 +13132,7 @@ (define_expand "movsi_to_cr_one"
(unspec:CC [(match_operand:SI 1 "gpc_reg_operand")
(match_dup 2)] UNSPEC_MOVESI_TO_CR))]
""
- "operands[2] = GEN_INT (1 << (75 - REGNO (operands[0])));")
+ "operands[2] = GEN_INT (1 << (7 - (REGNO (operands[0]) - CR0_REGNO)));")
(define_insn "*movsi_to_cr"
[(match_parallel 0 "mtcrf_operation"
@@ -13159,7 +13159,7 @@ (define_insn "*mtcrfsi"
"REG_P (operands[0])
&& CR_REGNO_P (REGNO (operands[0]))
&& CONST_INT_P (operands[2])
- && INTVAL (operands[2]) == 1 << (75 - REGNO (operands[0]))"
+ && INTVAL (operands[2]) == 1 << (7 - (REGNO (operands[0]) - CR0_REGNO))"
"mtcrf %R0,%1"
[(set_attr "type" "mtcr")])