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]

Re: divmodhi4


> I am creating a .md file for a processor we are
> developing and ran into a problem with divmodhi4.
> 
> The instruction that our processor uses for a 
> divmodhi4 always put the remainder in the
> register just after the quotient.  If the
> quotient goes in register N, the remainder always 
> goes in register N+1.  I have no idea how to 
> express this in rtx.  Can anyone suggest a good
> example or point to where this is documented?

You could express this arithmetically with signe/zero-extension, shifts
and ors, but that would be hard to swallow by the optimizers.

It's probably better to make single-register classes for all the 
N and N+1 candidates, and then represent the valid register combinations
as alternatives.

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