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]

req. help on merging instructions


Hello everbody,

Iam new to gcc and need some guidance.

Iam trying to merge the following two instructions

1. addu r2, r3,r4
2. ld   r5 ,mem(r2) # load from address calculated
    in the prev. instruction


in to one single isntruction.

3. ldx  r5 , mem(r3(r4)) # indexed load.


I managed to do it with a define_peephole pattern
in the md file. But I want this to happen only in the case
when the last use of register r2 is in statement2 (i.e it isn't
live after stmt 2.)otherwise the r2 value would go incorrect

Please could any body suggest me how should I do this .

Can these kind of restrictions be imposed in the machine
descriptions.

Any links to some related text would also be useful.
Iam trying to impliment it in gcc-3.4.1

thanks in advance.
Mohit



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