On Tue, Jun 20, 2023 at 12:34 AM Jeff Law via Gcc-patches <gcc-patches@gcc.gnu.org> wrote: > > > A handful of the scalar crypto instructions are supposed to take a > constant integer argument 0..3 inclusive. A suitable constraint was > created and used for this purpose (D03), but the operand's predicate is > "register_operand". That's just wrong. > > This patch adds a new predicate "const_0_3_operand" and fixes the > relevant insns to use it. One could argue the constraint is redundant > now (and you'd be correct). I wouldn't lose sleep if someone wanted > that removed, in which case I'll spin up a V2. > > The testsuite was broken in a way that made it consistent with the > compiler, so the tests passed, when they really should have been issuing > errors all along. > > This patch adjusts the existing tests so that they all expect a > diagnostic on the invalid operand usage (including out of range > constants). It adds new tests with proper constants, testing the > extremes of valid values. > > OK for the trunk, or should we remove the D03 constraint?
Reviewed-by: Christoph Muellner <christoph.muell...@vrull.eu> The patch does not apply cleanly anymore, because there were some small changes in crypto.md.