So, to support things like this: (define_constants (C1_TEMP_REGNUM PROLOGUE_SCRATCH_1) (C1_TEMP2_REGNUM PROLOGUE_SCRATCH_2)
I need the rtl reader to do less checking. We we turn off int validation, this then works, and we get: #define C1_TEMP_REGNUM PROLOGUE_SCRATCH_1 in insn-constants.h, which is what I wanted. The problem is that I choose different scratch register based upon the cpu and this is then used in a clobber in the rtl of a define_insn. I’d be happy to do this some other way, but, I didn’t see a way to do this, otherwise. Absent a better solution, I’d like to pursue this. The only question I have, remove the checking, or allow the target to explain that we don’t want the checking? diff --git a/gcc/read-rtl.c b/gcc/read-rtl.c index c198b5b..ceef96c 100644 --- a/gcc/read-rtl.c +++ b/gcc/read-rtl.c @@ -807,8 +807,12 @@ validate_const_int (const char *string) valid = 0; break; } +#if 0 + /* In order to support defining the md constants in terms of CPP constants from tm.h, we + can't check this. */ if (!valid) fatal_with_file_and_line ("invalid decimal constant \"%s\"\n", string); +#endif } static void