Re: Porting GCC on a new arch (cross-compilation)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Meena <meena@xxxxxxxxx> 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 of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux