Documentation is pretty clear here: "Require a constant operand and print the constant expression with no punctuation"; the internal use for condition codes is entirely undocumented. IOW any constant value of whatever kind, magnitude, or sign ought to be acceptable as long as it's expressable. Wire the handling of constants to how 'p' is handled.
--- a/gcc/config/i386/i386.cc +++ b/gcc/config/i386/i386.cc @@ -13932,8 +13932,16 @@ ix86_print_operand (FILE *file, rtx x, i gcc_fallthrough (); #endif - case 'C': case 'c': + if (code == 'c' && CONSTANT_P (x)) + { + /* Handle all constants (which common code causes to make it + here) like 'p', for 'c' being overloaded. */ + code = 'p'; + break; + } + gcc_fallthrough (); + case 'C': if (!COMPARISON_P (x)) { output_operand_lossage ("operand is not a condition code, "