public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Replacing certain operations with function calls
@ 2009-09-01 14:27 Jean Christophe Beyler
  2009-09-01 16:35 ` Ian Lance Taylor
  0 siblings, 1 reply; 10+ messages in thread
From: Jean Christophe Beyler @ 2009-09-01 14:27 UTC (permalink / raw)
  To: gcc

Dear all,

I have been also been looking into how to generate a function call for
certain operations. I've looked at various other targets for a similar
problem/solution but have not seen anything. On my target
architecture, we have certain optimized versions of the multiplication
for example.

I wanted to replace certain mutliplications with a function call. The
solution I found was to do perform a FAIL on the define_expand of the
multiplication for these cases. This forces the compiler to generate a
function call to __multdi3.

I then go in the define_expand of the function call and check the
symbol_ref to see what function is called. I can then modify the call
at that point.

My question is: is this a good approach or is there another solution
that you would use?

Thanks again for your time,
Jean Christophe Beyler

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2009-09-02 19:38 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-09-01 14:27 Replacing certain operations with function calls Jean Christophe Beyler
2009-09-01 16:35 ` Ian Lance Taylor
2009-09-01 18:31   ` Jean Christophe Beyler
2009-09-01 22:20     ` Jean Christophe Beyler
2009-09-01 22:26       ` Ian Lance Taylor
2009-09-01 22:35         ` Jean Christophe Beyler
2009-09-01 22:42           ` Jean Christophe Beyler
2009-09-01 22:44           ` Ian Lance Taylor
2009-09-02 15:34       ` Richard Henderson
2009-09-02 19:38         ` Jean Christophe Beyler

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).