9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] FLD1
@ 2004-03-04 20:58 David Tolpin
  2004-03-04 21:07 ` Charles Forsyth
  0 siblings, 1 reply; 2+ messages in thread
From: David Tolpin @ 2004-03-04 20:58 UTC (permalink / raw)
  To: 9fans


What are code patterns for FLD1? I an reading a text about x86 assembly lng,
and will look into source code of the compiler, but I tried and could not
right a simple function that generates this instruction.

David


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

* Re: [9fans] FLD1
  2004-03-04 20:58 [9fans] FLD1 David Tolpin
@ 2004-03-04 21:07 ` Charles Forsyth
  0 siblings, 0 replies; 2+ messages in thread
From: Charles Forsyth @ 2004-03-04 21:07 UTC (permalink / raw)
  To: 9fans

[-- Attachment #1: Type: text/plain, Size: 186 bytes --]

the following generates FLD1

#include <u.h>
#include <libc.h>

double
x(void)
{
	return 1.5;
}

void
main(int, char**)
{
	double v;

	v = x();
	print("%g\n", ++v);
}

[-- Attachment #2: Type: message/rfc822, Size: 2121 bytes --]

From: David Tolpin <dvd@davidashen.net>
To: 9fans@cse.psu.edu
Subject: [9fans] FLD1
Date: Fri, 5 Mar 2004 00:58:19 +0400 (AMT)
Message-ID: <200403042058.i24KwJB3059225@adat.davidashen.net>


What are code patterns for FLD1? I an reading a text about x86 assembly lng,
and will look into source code of the compiler, but I tried and could not
right a simple function that generates this instruction.

David

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

end of thread, other threads:[~2004-03-04 21:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-03-04 20:58 [9fans] FLD1 David Tolpin
2004-03-04 21:07 ` Charles Forsyth

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).