This is the mail archive of the gcc@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]
Other format: [Raw text]

Re: switch question in recog.c


in the function asm_operand_ok(), the code looks like:

<...>
        case 'X':
          result = 1;

        case 'g':
          if (general_operand (op, VOIDmode))
            result = 1;
          break;

default:
/* For all other letters, we first check for a register class,
otherwise it is an EXTRA_CONSTRAINT. */
if (REG_CLASS_FROM_CONSTRAINT (c, constraint) != NO_REGS)
{
case 'r':
if (GET_MODE (op) == BLKmode)
break;
if (register_operand (op, VOIDmode))
result = 1;
}
#ifdef EXTRA_CONSTRAINT_STR
if (EXTRA_CONSTRAINT_STR (op, c, constraint))
result = 1;
if (EXTRA_MEMORY_CONSTRAINT (c, constraint))

That is valid, but it looks like this code got munged since 3.3. All those
"result=1"s used to be "return 1", so the control flow is now weird, for
example after 'X", I expect most of them should be "result=1; break" .



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