This is the mail archive of the 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: Scheduling of asm()

> Date: Sun, 6 Jan 2002 17:19:54 -0800
> From: Richard Henderson <>
> To: Falk Hueffner <>
> Cc:

> On Mon, Jan 07, 2002 at 01:50:01AM +0100, Falk Hueffner wrote:
> > Hmm, okay, I'll try that. I see i386 has lots of builtins already for
> > MMX, so I'll try to do it analogously.

> BTW, I'd like to create generic builtins (and maybe tree nodes and rtx)
> for cttz, ctlz, ctpop.  They exist on a number of targets.

I'll go one farther.  Any builtin that is expressible in normal C,
should be added to gcc as machine independent.  If a machine doesn't
support it, it should be expanded by the compiler as the equivalent C
(rtl).  Any machine that wants to add a builtin that is already
present, should reuse the machine independent one.

Take for example, a SI mode rotate instruction.  Let say we wanted to
add it as a builtin.  Better to add it not as an MD builtin, but as an
MI builtin.

This mirrors what we do with things like plus:DI.  It is mi, and if a
machine doesn't support it, you get slower code that still works.
There is a reason we didn't just fault or say, no such instruction
when the users source code contained the construct.

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