Mail Archives: djgpp/1992/02/27/21:30:02
Believe it or not, Dirk Zabel said:
>
> Hi,
> could somebody who is lucky enough to have a REAL 387 try to compile
> this short program with "gcc -c -S test.c":
>
> ------- cut here -------- test.c ---------------
> double q = 0.3e10;
> ------- cut here -------------------------------
>
> If the generated assembly-language output does not contain
> the following bad constant, the 387-emulator has most probably another bug.
>
> -- Dirk
>
> ------- cut here -------- test.s ---------------
> .file "test.c"
> gcc_compiled.:
> .globl _q
> .data
> .align 2,144
> _q:
> .double 0d2.999999999:0000..(((/e+09
> ------- cut here -------------------------------
> ~~~~~~~~~~
I have a '486, and after performing the steps you indicate above on this
C file:
double q = 0.3e10;
main(void)
{
return(0);
}
this is my resulting ".s" file:
------- cut here -------- test.s ---------------
.file "test.c"
gcc_compiled.:
.globl _q
.data
.align 2,144
_q:
.double 0d3.00000000000000047684e+09
.text
.align 2,144
.globl _main
_main:
pushl %ebp
movl %esp,%ebp
xorl %eax,%eax
jmp L1
.align 2,144
L1:
leave
ret
------- cut here -------------------------------
Hope that helps!
Bob
--
Bob Hood thor AT arrakis DOT denver DOT co DOT us H: 303-980-8392 W: 303-236-8959
---------------------------------------------------------------------------
An easily-understood, workable falsehood is more useful than a
complex, incomprehensible truth.
- Raw text -