We already had an error for Zcmt though it appears to be untested
Add similar one for Zcmp along with tests for both.
Factor the code to share the strings as much as possible.
Differential D153159
[RISCV] Add errors for mixing Zcmp with C/Zcd and D. craig.topper on Jun 16 2023, 11:16 AM. Authored by
Details We already had an error for Zcmt though it appears to be untested Factor the code to share the strings as much as possible.
Diff Detail
Event Timeline
|
I found there might be a problem about predicate of Zcd
Zcd contains: c.fld, c.fldsp, c.fsd, c.fsdsp, witch is a subset of D ext.
it directly depends on Zca instead of C ext.
Thus, c.fld, c.fldsp, c.fsd, c.fsdsp are valid when HasZcd || (HasD && HasC)
Zcmp is directly incompatible with Zcd, so there should be two error msg
'Zcmp' extension is incompatible with 'Zcd'
and 'Zcmp' extension is incompatible with both 'C' and 'D' are enabled