----- Original Message ----- > On Wed, May 28, 2014 at 03:54:58PM -0600, Jeff Law wrote: > > >Why not get rid of all the above 4 lines and just keep: > > > > > >> return CONSTANT_P (op); > > > > > >? CONST matches CONSTANT_P, and what is inside of CONST should be > > >fine, and (plus (symbol_ref) (const_int)) not surrounded by CONST > > >ir invalid. > > Haven't we recently had problems with being overly accepting of > > stuff inside CONST when using the CONST for address expressions. > > ISTM we should only accept what the processor supports here. > > The only recent problem I remember was that we forgot to put CONST > around (plus (symbol_ref) (const_int)), but I see no problem not > accepting such invalid RTL. > The processor shouldn't care, for the instructions a CONST is just > any kind of immediate, what exactly it is matters solely to the > assembler/linker and dynamic linker > (if there are relocations for it, if the expression can be expressed in > the assembly, etc.). But that is common to all CONST operands, there is > nothing special particularly about sibcalls. > > Jakub >
Well, actually we want to prevent to accept anything plus/mult within memory-addresses, which hasn't a symbol-ref, or a constant-value as arguments. Is it for sure that there are within a CONST-rtx no registers? If so, we could check intitally for CONSTANT_P. Kai