From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,3fec9418c677c0c7 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2004-01-15 03:23:30 PST Path: archiver1.google.com!news2.google.com!news.maxwell.syr.edu!news.mailgate.org!news-out.tin.it!news-in.tin.it!news!not-for-mail From: "Stefano M." Newsgroups: comp.lang.ada Subject: Re: Gnat's Ada.Float_Text_IO.Put problem Date: Thu, 15 Jan 2004 12:02:57 +0100 Organization: Centro Servizi Interbusiness Message-ID: References: <8c4gd1-ifb.ln1@beastie.ix.netcom.com> NNTP-Posting-Host: host26-54.pool21759.interbusiness.it Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Trace: grillo.cs.interbusiness.it 1074164542 8850 217.59.54.26 (15 Jan 2004 11:02:22 GMT) X-Complaints-To: news@interbusiness.it, abuse@interbusiness.it NNTP-Posting-Date: Thu, 15 Jan 2004 11:02:22 +0000 (UTC) User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.6b) Gecko/20031205 Thunderbird/0.4 X-Accept-Language: en-us, en In-Reply-To: Xref: archiver1.google.com comp.lang.ada:4431 Date: 2004-01-15T12:02:57+01:00 List-Id: Georg Bauhaus wrote: > Maybe there are two questions to answer: > Is there a way to switch floating point modes of your hardware? > What do you get for the sample_float value in your object code? > The second question can be answered with a simpler program: [...] > sonnenregen:/tmp$ objdump --disassemble main.o > > main.o: file format elf32-i386 > > Disassembly of section .text: > > 00000000 <_ada_main>: > 0: 55 push %ebp > 1: 89 e5 mov %esp,%ebp > 3: 83 ec 04 sub $0x4,%esp > 6: b8 cf f7 21 41 mov $0x4121f7cf,%eax <<---- > b: 89 45 fc mov %eax,0xfffffffc(%ebp) > e: c9 leave > f: c3 ret > > What do you get at <<----? Does it change when you add a few tenths? I suddenly recalled there was a -S switch somewhere, here's what I get: ste@sim:~/prove$ cat main.adb procedure Main is Sample_Float : Float := 10.123; begin null; end Main; ste@sim:~/prove$ gcc -c -S -fomit-frame-pointer -gnatp main.adb ste@sim:~/prove$ cat main.s .verstamp 3 11 .set noreorder .set volatile .set noat .arch ev4 .file 1 "main.adb" .rdata .align 2 $LC0: .long 1092745167 .text .align 2 .globl _ada_main .ent _ada_main _ada_main: .frame $30,16,$26,0 ldgp $29,0($27) $_ada_main..ng: lda $30,-16($30) .prologue 1 lda $1,$LC0 lds $f10,0($1) sts $f10,0($30) lda $30,16($30) ret $31,($26),1 .end _ada_main Anything interesting for you? Stefano