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: GCC-How does the coding style affect the insv pattern recognization?


2010/1/13 Bingfeng Mei <bmei@broadcom.com>:
> Your instruction is likely too specific to be picked up by GCC.
> You may use an intrinisc for it.
>
> Bingfeng

but insv is a standard pattern name.
the semantics of expression x= (x&0xFF00FFFF) | ((i<<16)&0x00FF0000);
is exactly what insv can do.
I all tried mips gcc cross compiler, and ins is also not generated.
Intrinsic is a way to resolve this though. Maybe there is no other better way.

BTW,
There is a special case(the bit position is 0):
235: f0 97 fc mvi a9 -0x4;  #move immediate to reg
238: ff e9 94 and a9 a14 a9;
23b: f0 95 02 or a9 0x2;
The above three instructions can be replaced by mvi and insv. But the
fact is not in the combine pass.

Qifei Fan


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