This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

SIGN_EXTRACT feature, perhaps


Whilst browsing through some of the source for egcs I came upon
the following piece of code in combine.c:


    /* Check if PAT is an insn - or a part of it - used to set up an
       argument for a function in a hard register.  */
    
    static int
    sets_function_arg_p (pat)
         rtx pat;
    {
    
        <blah>
    
        case SET:
          inner_dest = SET_DEST (pat);
          while (GET_CODE (inner_dest) == STRICT_LOW_PART
    	     || GET_CODE (inner_dest) == SUBREG
    	     || GET_CODE (inner_dest) == ZERO_EXTRACT)
       	        inner_dest = XEXP (inner_dest, 0);
    
        <blah blah>
    
Now I might be barking mad, but should this while loop not also have a check
for the code SIGN_EXTRACT?

Just out of interest, I did a grep through all the source for occurances of
ZER0_EXTRACT and SIGN_EXTRACT; sometimes they both occur in the same breath
as STRICT_LOW_PART and/or SUBREG in a "its a destination" scenario.  There
are however many places where SIGN_EXTRACT seems to me to have been, well,
forgotten.

Of course I have no test code or proof that anything is really at fault;
this is all just supposition and based upon over-tired eyes.


   Alasdair.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]