Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
From: harley@pauillac.inria.fr (Robert Harley)
Subject: Re: Alpha Assembly Programming
Date: 1997/11/08	[thread overview]
Message-ID: <641l13$j3@news-rocq.inria.fr> (raw)


pmontgom@cwi.nl (Peter L. Montgomery) writes:
>	Using the cc and f90 compilers now present on Digital UNIX
>systems, how does one access UMULH (upper half of unsigned integer 
>multiply)?  [...]

In C:

  #include <c/asm.h>
  p = asm("umulh %a0, %a1, %v0", x, y);

or perhaps:

  #include <machine/builtins.h>
  p = __UMULH(x, y);

Then again you might prefer int_mul_upper().


>On the 21264, how will we access the population count
>and leading/trailing zero count instructions from Fortran and C?

  l1 = _popcnt(a);
  l2 = _leadz(a);
  l3 = _trailz(a);


>Inline code is desired for all of these.

And is produced, even for 21164, by recent versions of the C compiler.

-- Rob.

PS: Beware those who will jump down your throat for using stuff that
    isn't in their favorite "standard".



             reply	other threads:[~1997-11-08  5:00 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-11-08  5:00 Robert Harley [this message]
  -- strict thread matches above, loose matches on Subject: below --
1997-11-09  5:00 Alpha Assembly Programming Robert Harley
1997-11-06  5:00 teletan
1997-11-06  5:00 ` Antonio Carlini
1997-11-06  5:00   ` John Wilson
1997-11-07  5:00     ` Alan Dartnell
1997-11-11  5:00     ` Antonio Carlini
1997-11-07  5:00   ` Peter L. Montgomery
1997-11-13  5:00     ` Burkhard Neidecker-Lutz
1997-11-15  5:00       ` David Coote
1997-11-18  5:00 ` Hoff Hoffman
1997-11-18  5:00   ` John Wilson
1997-11-18  5:00     ` Ben Carter
1997-11-18  5:00       ` John Wilson
1997-11-19  5:00         ` Antonio Carlini
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox