Linux assembly list
 help / color / mirror / Atom feed
* sparc assembly mnemonic
@ 2004-06-21 18:34 Fabio Miranda Hamburger
  2004-06-21 20:21 ` David S. Miller
  2004-06-21 22:00 ` John Rodriguez
  0 siblings, 2 replies; 5+ messages in thread
From: Fabio Miranda Hamburger @ 2004-06-21 18:34 UTC (permalink / raw)
  To: linux-assembly

what are the sparc assembly  equivalent of the following instructions:

    __asm__ __volatile__ ("fsave %0\n" : : "m"(fpubuf));
    __asm__ __volatile__ ("frstor %0\n" : : "m"(fpubuf));


thanks,

---
Fabio Andres Miranda
Ingenieria de sistemas informaticos
Universidad Latina - Costa Rica


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

* Re: sparc assembly mnemonic
  2004-06-21 18:34 sparc assembly mnemonic Fabio Miranda Hamburger
@ 2004-06-21 20:21 ` David S. Miller
  2004-06-21 21:16   ` Maciej Hrebien
  2004-06-21 22:00 ` John Rodriguez
  1 sibling, 1 reply; 5+ messages in thread
From: David S. Miller @ 2004-06-21 20:21 UTC (permalink / raw)
  To: Fabio Miranda Hamburger; +Cc: linux-assembly

On Mon, 21 Jun 2004 12:34:25 -0600 (CST)
Fabio Miranda Hamburger <fabmirha@ns.isi.ulatina.ac.cr> wrote:

> what are the sparc assembly  equivalent of the following instructions:
> 
>     __asm__ __volatile__ ("fsave %0\n" : : "m"(fpubuf));
>     __asm__ __volatile__ ("frstor %0\n" : : "m"(fpubuf));

You have to save each and every register by hand, unlike x86 there
isn't a specific instruction which saves everything for you.

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

* Re: sparc assembly mnemonic
  2004-06-21 20:21 ` David S. Miller
@ 2004-06-21 21:16   ` Maciej Hrebien
  2004-06-21 21:48     ` David S. Miller
  0 siblings, 1 reply; 5+ messages in thread
From: Maciej Hrebien @ 2004-06-21 21:16 UTC (permalink / raw)
  To: linux-assembly

"David S. Miller" wrote:
> 
> On Mon, 21 Jun 2004 12:34:25 -0600 (CST)
> Fabio Miranda Hamburger <fabmirha@ns.isi.ulatina.ac.cr> wrote:
> 
> > what are the sparc assembly  equivalent of the following instructions:
> >
> >     __asm__ __volatile__ ("fsave %0\n" : : "m"(fpubuf));
> >     __asm__ __volatile__ ("frstor %0\n" : : "m"(fpubuf));
> 
> You have to save each and every register by hand, unlike x86 there
> isn't a specific instruction which saves everything for you.

What about save/restore mechanism (tmp purposes)? Does it work only for
alu registers (not fpu)? I'm just curious - never played with sparc :(

-- 
Maciej Hrebien


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

* Re: sparc assembly mnemonic
  2004-06-21 21:16   ` Maciej Hrebien
@ 2004-06-21 21:48     ` David S. Miller
  0 siblings, 0 replies; 5+ messages in thread
From: David S. Miller @ 2004-06-21 21:48 UTC (permalink / raw)
  To: m_hrebien; +Cc: linux-assembly

On Mon, 21 Jun 2004 23:16:52 +0200
Maciej Hrebien <m_hrebien@wp.pl> wrote:

> "David S. Miller" wrote:
> > 
> > On Mon, 21 Jun 2004 12:34:25 -0600 (CST)
> > Fabio Miranda Hamburger <fabmirha@ns.isi.ulatina.ac.cr> wrote:
> > 
> > > what are the sparc assembly  equivalent of the following instructions:
> > >
> > >     __asm__ __volatile__ ("fsave %0\n" : : "m"(fpubuf));
> > >     __asm__ __volatile__ ("frstor %0\n" : : "m"(fpubuf));
> > 
> > You have to save each and every register by hand, unlike x86 there
> > isn't a specific instruction which saves everything for you.
> 
> What about save/restore mechanism (tmp purposes)? Does it work only for
> alu registers (not fpu)? I'm just curious - never played with sparc :(

That's correct, the 'save' and 'restore' instructions only store ALU register,
and not even all of them, just the current window (this leaves out other windows
and the global registers).

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

* RE: sparc assembly mnemonic
  2004-06-21 18:34 sparc assembly mnemonic Fabio Miranda Hamburger
  2004-06-21 20:21 ` David S. Miller
@ 2004-06-21 22:00 ` John Rodriguez
  1 sibling, 0 replies; 5+ messages in thread
From: John Rodriguez @ 2004-06-21 22:00 UTC (permalink / raw)
  To: 'Fabio Miranda Hamburger', linux-assembly

Funny, this looks like the same code used to exploit a linux kernel bug.
See http://linuxreviews.org/news/2004-06-11_kernel_crash/index.html for
details.  Hopefully, no malice is intended by this posting.

-----Original Message-----
From: linux-assembly-owner@vger.kernel.org
[mailto:linux-assembly-owner@vger.kernel.org] On Behalf Of Fabio Miranda
Hamburger
Sent: Monday, June 21, 2004 2:34 PM
To: linux-assembly@vger.kernel.org
Subject: sparc assembly mnemonic

what are the sparc assembly  equivalent of the following instructions:

    __asm__ __volatile__ ("fsave %0\n" : : "m"(fpubuf));
    __asm__ __volatile__ ("frstor %0\n" : : "m"(fpubuf));


thanks,

---
Fabio Andres Miranda
Ingenieria de sistemas informaticos
Universidad Latina - Costa Rica

-
To unsubscribe from this list: send the line "unsubscribe
linux-assembly" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


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

end of thread, other threads:[~2004-06-21 22:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-06-21 18:34 sparc assembly mnemonic Fabio Miranda Hamburger
2004-06-21 20:21 ` David S. Miller
2004-06-21 21:16   ` Maciej Hrebien
2004-06-21 21:48     ` David S. Miller
2004-06-21 22:00 ` John Rodriguez

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