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: Scheduling of asm()


On Mon, Jan 07, 2002 at 10:00:03AM -0800, mike stump wrote:
> I'll go one farther.  Any builtin that is expressible in normal C,
> should be added to gcc as machine independent.

No.  Alpha has instructions like

	op0 = (op1 >> ((op2 & 7) * 8)) & 0xff;

which, imo, isn't nearly as clear as __builtin_extbl.  And frankly,
these won't be useful to other targets, whereas this is an operation
that we have to use implementing device drivers.

Irritatingly, gcc has a propensity at the moment to hoist, say, the
(op2 & 7) mask up, because it sees that operation in common with

	op0 = (op1 & 0xff) << ((op2 & 7) * 8);

during gcse, so we don't recognize either the extbl or insbl insns
during combine.

Whereas if we start out with an extbl insn...


r~


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