From: Michael Meissner <meissner@cygnus.com>
To: Bob Doyle <doyle@primenet.com>, Michael Meissner <meissner@cygnus.com>
Cc: linuxppc-dev@lists.linuxppc.org
Subject: Re: PowerPC function returning long long
Date: Thu, 14 Oct 1999 00:35:39 -0400 [thread overview]
Message-ID: <19991014003539.B7713@elmo.cygnus.com> (raw)
In-Reply-To: <3805582E.2D32F329@primenet.com>; from Bob Doyle on Thu, Oct 14, 1999 at 04:12:30AM +0000
On Thu, Oct 14, 1999 at 04:12:30AM +0000, Bob Doyle wrote:
>
> Michael Meissner wrote:
> >
> > On Wed, Oct 13, 1999 at 10:06:02AM +0200, Gabriel Paubert wrote:
> > >
> > > On Wed, 13 Oct 1999, Bob Doyle wrote:
> > >
>
> [snip]
>
> > The above doesn't work with -mreg-names and/or -pedantic. Instead you should
> > write:
> >
> > unsigned long long get_timebase(void) {
> > unsigned long long retval;
> > unsigned long junk;
> > __asm__ __volatile__ ("\n\
> > 1: mftbu %1\n\
> > mftb %L0\n\
> > mftbu %0\n\
> > cmpw %0,%1\n\
> > bne 1b"
> > : "=r" (retval), "=r" (junk));
> > return retval;
> > }
>
> Thanks, thats just what I was looking for...
>
> I've found several tutorials on x86 GNU inline asm but none on the
> PowerPC.
> If I were to write a HOWTO would anyone volunteer to proof read
> and/or contribute code examples? I suspect I'm not the only one
> struggling through this.
I don't know whether he reads this list, but the two PowerPC GCC maintainers
are David Edelsohn <edelsohn@gnu.org> and myself <meissner@cygnus.com>. We can
probably offer suggestions, though I suspect we probably don't have as much
time to actually write anything.
--
Michael Meissner, Cygnus Solutions
PMB 198, 174 Littleton Road #3, Westford, Massachusetts 01886
email: meissner@cygnus.com phone: 978-486-9304 fax: 978-692-4482
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
next prev parent reply other threads:[~1999-10-14 4:35 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-10-13 4:54 PowerPC function returning long long Bob Doyle
1999-10-13 8:06 ` Gabriel Paubert
1999-10-13 12:27 ` Michael Meissner
1999-10-14 4:12 ` Bob Doyle
1999-10-14 4:35 ` Michael Meissner [this message]
1999-10-14 7:28 ` [TANGENT] GNU as [was: Re: PowerPC function returning long long] Bill Brooks
1999-10-14 12:45 ` Daniel Jacobowitz
1999-10-14 13:21 ` Michael Meissner
1999-10-14 12:44 ` PowerPC function returning long long Daniel Jacobowitz
-- strict thread matches above, loose matches on Subject: below --
1999-10-13 6:14 Christophe Lizzi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=19991014003539.B7713@elmo.cygnus.com \
--to=meissner@cygnus.com \
--cc=doyle@primenet.com \
--cc=linuxppc-dev@lists.linuxppc.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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 NNTP newsgroup(s).