This is the mail archive of the gcc-help@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: Porting GCC on a new arch (cross-compilation)


Meena <meena@acmet.com> writes:

> To verify this, I have added the dummy machine description for 'move'
> instruction in the .md file as shown below:
>
> (define_expand "movsi"
>   [(set (match_operand:SI 0 "general_operand" "")
>         (match_operand:SI 1 "general_operand" ""))
>   ]
>   ""
>   ""
> )
>
> The above added machine description for 'move' instruction results into
> successful building of GCC i.e. cc1 executable is generated. The
> generated cc1 executable successfully compiled the empty
> void function.
>
> But why the move pattern is required is still not clear to me.

The compiler always requires a movMM pattern for every mode which can
appear in a register.  This is documented in the gcc internals manual.

    This class of patterns is special in several ways.  First of all,
    each of these names up to and including full word size _must_ be
    defined, because there is no other way to copy a datum from one
    place to another.  If there are patterns accepting operands in
    larger modes, movM must be defined for integer modes of those sizes.

Ian


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