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: [RFC PR43721] Optimize a/b and a%b to single divmod call


On Fri, Jan 29, 2016 at 12:09 AM, Richard Biener <rguenther@suse.de> wrote:
> I wonder if rather than introducing a target hook ports could use
> a define_expand expanding to a libcall for this case?

Of the two divmod libcall APIs, one requires a stack temporary, which
would be awkward to allocate in a define_expand.  Though we could have
expand_twoval_binop implement the libgcc udivmoddi4 API which requires
a stack temp, and then add an ARM divmod expander that implements the
ARM API which has a double-wide result.  That sounds like it could
work.

Jim


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