===================================================================
@@ -318,69 +318,69 @@
[(match_operand:QI 1 "general_operand" "A,A,A")
(match_operand:QI 2 "general_operand" "ISqi,i,v")])
(label_ref (match_operand 3 "" ""))
(pc)))]
"rl78_real_insns_ok ()"
"@
- cmp\t%1, %2 \;xor1 CY,%1.7\;not1 CY\;sk%c0 \;br\t!!%3
- cmp\t%1, %2 \;xor1 CY,%1.7\;sk%c0 \;br\t!!%3
- cmp\t%1, %2 \;xor1 CY,%1.7\;xor1 CY,%2.7\;sk%c0 \;br\t!!%3"
+ cmp\t%1, %2 \;xor1 CY,%1.7\;not1 CY\;sk%C0 \;br\t!!%3
+ cmp\t%1, %2 \;xor1 CY,%1.7\;sk%C0 \;br\t!!%3
+ cmp\t%1, %2 \;xor1 CY,%1.7\;xor1 CY,%2.7\;sk%C0 \;br\t!!%3"
)
(define_insn "*cbranchqi4_real"
[(set (pc) (if_then_else
(match_operator 0 "rl78_cmp_operator_real"
[(match_operand:QI 1 "general_operand" "Wabvaxbc,a, v,bcdehl")
(match_operand:QI 2 "general_operand" "M, irvWabWhlWh1Whb,i,a")])
(label_ref (match_operand 3 "" ""))
(pc)))]
"rl78_real_insns_ok ()"
"@
- cmp0\t%1 \;sk%c0 \;br\t!!%3
- cmp\t%1, %2 \;sk%c0 \;br\t!!%3
- cmp\t%1, %2 \;sk%c0 \;br\t!!%3
- cmp\t%1, %2 \;sk%c0 \;br\t!!%3"
+ cmp0\t%1 \;sk%C0 \;br\t!!%3
+ cmp\t%1, %2 \;sk%C0 \;br\t!!%3
+ cmp\t%1, %2 \;sk%C0 \;br\t!!%3
+ cmp\t%1, %2 \;sk%C0 \;br\t!!%3"
)
(define_insn "*cbranchhi4_real_signed"
[(set (pc) (if_then_else
(match_operator 0 "rl78_cmp_operator_signed"
[(match_operand:HI 1 "general_operand" "A,A,A,vR")
(match_operand:HI 2 "general_operand" "IShi,i,v,1")])
(label_ref (match_operand 3))
(pc)))]
"rl78_real_insns_ok ()"
"@
- cmpw\t%1, %2 \;xor1 CY,%Q1.7\;not1 CY\;sk%c0 \;br\t!!%3
- cmpw\t%1, %2 \;xor1 CY,%Q1.7\;sk%c0 \;br\t!!%3
- cmpw\t%1, %2 \;xor1 CY,%Q1.7\;xor1 CY,%Q2.7\;sk%c0 \;br\t!!%3
+ cmpw\t%1, %2 \;xor1 CY,%Q1.7\;not1 CY\;sk%C0 \;br\t!!%3
+ cmpw\t%1, %2 \;xor1 CY,%Q1.7\;sk%C0 \;br\t!!%3
+ cmpw\t%1, %2 \;xor1 CY,%Q1.7\;xor1 CY,%Q2.7\;sk%C0 \;br\t!!%3
%z0\t!!%3"
)
(define_insn "cbranchhi4_real"
[(set (pc) (if_then_else
(match_operator 0 "rl78_cmp_operator_real"
[(match_operand:HI 1 "general_operand" "A,vR")
(match_operand:HI 2 "general_operand" "iBDTvWabWhlWh1,1")])
(label_ref (match_operand 3 "" ""))
(pc)))]
"rl78_real_insns_ok ()"
"@
- cmpw\t%1, %2 \;sk%c0 \;br\t!!%3
+ cmpw\t%1, %2 \;sk%C0 \;br\t!!%3
%z0\t!!%3"
)
(define_insn "cbranchhi4_real_inverted"
[(set (pc) (if_then_else
(match_operator 0 "rl78_cmp_operator_real"
[(match_operand:HI 1 "general_operand" "A")
(match_operand:HI 2 "general_operand" "iBDTvWabWhlWh1")])
(pc)
(label_ref (match_operand 3 "" ""))))]
"rl78_real_insns_ok ()"
- "cmpw\t%1, %2 \;sk%c0 \;br\t!!%3"
+ "cmpw\t%1, %2 \;sk%C0 \;br\t!!%3"
)
(define_insn "*cbranchsi4_real_lt"
[(set (pc) (if_then_else
(lt (match_operand:SI 0 "general_operand" "U,vWabWhlWh1")
(const_int 0))
@@ -416,28 +416,28 @@
(label_ref (match_operand 3 "" ""))
(pc)))
(clobber (reg:HI AX_REG))
]
"rl78_real_insns_ok ()"
"@
- movw ax,%H1 \;cmpw ax, %H2 \;xor1 CY,a.7\;not1 CY\; movw ax,%h1 \;sknz \;cmpw ax, %h2 \;sk%c0 \;br\t!!%3
- movw ax,%H1 \;cmpw ax, %H2 \;xor1 CY,a.7\; movw ax,%h1 \;sknz \;cmpw ax, %h2 \;sk%c0 \;br\t!!%3
- movw ax,%H1 \;cmpw ax, %H2 \;xor1 CY,a.7\;xor1 CY,%E2.7\;movw ax,%h1 \;sknz \;cmpw ax, %h2 \;sk%c0 \;br\t!!%3"
+ movw ax,%H1 \;cmpw ax, %H2 \;xor1 CY,a.7\;not1 CY\; movw ax,%h1 \;sknz \;cmpw ax, %h2 \;sk%C0 \;br\t!!%3
+ movw ax,%H1 \;cmpw ax, %H2 \;xor1 CY,a.7\; movw ax,%h1 \;sknz \;cmpw ax, %h2 \;sk%C0 \;br\t!!%3
+ movw ax,%H1 \;cmpw ax, %H2 \;xor1 CY,a.7\;xor1 CY,%E2.7\;movw ax,%h1 \;sknz \;cmpw ax, %h2 \;sk%C0 \;br\t!!%3"
)
(define_insn "*cbranchsi4_real"
[(set (pc) (if_then_else
(match_operator 0 "rl78_cmp_operator_real"
[(match_operand:SI 1 "general_operand" "vUi")
(match_operand:SI 2 "general_operand" "iWhlWh1v")])
(label_ref (match_operand 3 "" ""))
(pc)))
(clobber (reg:HI AX_REG))
]
"rl78_real_insns_ok ()"
- "movw ax,%H1 \;cmpw ax, %H2 \;movw ax,%h1 \;sknz \;cmpw ax, %h2 \;sk%c0 \;br\t!!%3"
+ "movw ax,%H1 \;cmpw ax, %H2 \;movw ax,%h1 \;sknz \;cmpw ax, %h2 \;sk%C0 \;br\t!!%3"
)
;; Peephole to match:
;;
;; (set (mem (sp)) (ax))
;; (set (ax) (mem (sp)))
===================================================================
@@ -317,49 +317,49 @@
(match_operator 0 "rl78_cmp_operator_signed"
[(match_operand:QI 1 "general_operand" "vim")
(match_operand:QI 2 "nonmemory_operand" "vi")])
(label_ref (match_operand 3 "" ""))
(pc)))]
"rl78_virt_insns_ok ()"
- "v.cmp\t%1, %2\\n\tv.b%c0\t%3"
+ "v.cmp\t%1, %2\\n\tv.b%C0\t%3"
[(set_attr "valloc" "cmp")]
)
(define_insn "*cbranchqi4_virt"
[(set (pc) (if_then_else
(match_operator 0 "rl78_cmp_operator_real"
[(match_operand:QI 1 "general_operand" "vim")
(match_operand:QI 2 "general_operand" "vim")])
(label_ref (match_operand 3 "" ""))
(pc)))]
"rl78_virt_insns_ok ()"
- "v.cmp\t%1, %2\\n\tv.b%c0\t%3"
+ "v.cmp\t%1, %2\\n\tv.b%C0\t%3"
[(set_attr "valloc" "cmp")]
)
(define_insn "*cbranchhi4_virt_signed"
[(set (pc) (if_then_else
(match_operator 0 "rl78_cmp_operator_signed"
[(match_operand:HI 1 "general_operand" "vim")
(match_operand:HI 2 "nonmemory_operand" "vi")])
(label_ref (match_operand 3 "" ""))
(pc)))]
"rl78_virt_insns_ok ()"
- "v.cmpw\t%1, %2\\n\tv.b%c0\t%3"
+ "v.cmpw\t%1, %2\\n\tv.b%C0\t%3"
[(set_attr "valloc" "cmp")]
)
(define_insn "*cbranchhi4_virt"
[(set (pc) (if_then_else
(match_operator 0 "rl78_cmp_operator_real"
[(match_operand:HI 1 "general_operand" "vim")
(match_operand:HI 2 "general_operand" "vim")])
(label_ref (match_operand 3 "" ""))
(pc)))]
"rl78_virt_insns_ok ()"
- "v.cmpw\t%1, %2\\n\tv.b%c0\t%3"
+ "v.cmpw\t%1, %2\\n\tv.b%C0\t%3"
[(set_attr "valloc" "cmp")]
)
(define_insn "*cbranchsi4_virt"
[(set (pc) (if_then_else
(match_operator 0 "rl78_cmp_operator"
@@ -367,13 +367,13 @@
(match_operand:SI 2 "nonmemory_operand" "vi")])
(label_ref (match_operand 3 "" ""))
(pc)))
(clobber (reg:HI AX_REG))
]
"rl78_virt_insns_ok ()"
- "v.cmpd\t%1, %2\\n\tv.b%c0\t%3"
+ "v.cmpd\t%1, %2\\n\tv.b%C0\t%3"
[(set_attr "valloc" "macax")]
)
;;---------- Peepholes ------------------------
(define_peephole2
===================================================================
@@ -1298,13 +1298,14 @@ rl78_function_arg_boundary (enum machine
/* Supported modifier letters:
A - address of a MEM
S - SADDR form of a real register
v - real register corresponding to a virtual register
m - minus - negative of CONST_INT value.
- c - inverse of a conditional (NE vs EQ for example)
+ C - inverse of a conditional (NE vs EQ for example)
+ C - complement of an integer
z - collapsed conditional
s - shift count mod 8
S - shift count mod 16
r - reverse shift count (8-(count mod 8))
B - bit position
@@ -1552,71 +1553,71 @@ rl78_print_operand_1 (FILE * file, rtx o
break;
case LTU:
if (letter == 'z')
fprintf (file, "#comparison eliminated");
else
- fprintf (file, letter == 'c' ? "nc" : "c");
+ fprintf (file, letter == 'C' ? "nc" : "c");
break;
case LEU:
if (letter == 'z')
fprintf (file, "br");
else
- fprintf (file, letter == 'c' ? "h" : "nh");
+ fprintf (file, letter == 'C' ? "h" : "nh");
break;
case GEU:
if (letter == 'z')
fprintf (file, "br");
else
- fprintf (file, letter == 'c' ? "c" : "nc");
+ fprintf (file, letter == 'C' ? "c" : "nc");
break;
case GTU:
if (letter == 'z')
fprintf (file, "#comparison eliminated");
else
- fprintf (file, letter == 'c' ? "nh" : "h");
+ fprintf (file, letter == 'C' ? "nh" : "h");
break;
case EQ:
if (letter == 'z')
fprintf (file, "br");
else
- fprintf (file, letter == 'c' ? "nz" : "z");
+ fprintf (file, letter == 'C' ? "nz" : "z");
break;
case NE:
if (letter == 'z')
fprintf (file, "#comparison eliminated");
else
- fprintf (file, letter == 'c' ? "z" : "nz");
+ fprintf (file, letter == 'C' ? "z" : "nz");
break;
/* Note: these assume appropriate adjustments were made so that
unsigned comparisons, which is all this chip has, will
work. */
case LT:
if (letter == 'z')
fprintf (file, "#comparison eliminated");
else
- fprintf (file, letter == 'c' ? "nc" : "c");
+ fprintf (file, letter == 'C' ? "nc" : "c");
break;
case LE:
if (letter == 'z')
fprintf (file, "br");
else
- fprintf (file, letter == 'c' ? "h" : "nh");
+ fprintf (file, letter == 'C' ? "h" : "nh");
break;
case GE:
if (letter == 'z')
fprintf (file, "br");
else
- fprintf (file, letter == 'c' ? "c" : "nc");
+ fprintf (file, letter == 'C' ? "c" : "nc");
break;
case GT:
if (letter == 'z')
fprintf (file, "#comparison eliminated");
else
- fprintf (file, letter == 'c' ? "nh" : "h");
+ fprintf (file, letter == 'C' ? "nh" : "h");
break;
default:
fprintf (file, "(%s)", GET_RTX_NAME (GET_CODE (op)));
break;
}