------- Additional Comments From tkoenig at gcc dot gnu dot org  2005-08-12 
20:22 -------
$ gcc -g -ffast-math hello.c
$ gdb ./a.out
GNU gdb 6.3-debian
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-linux"...Using host libthread_db library
"/lib/tls/libthread_db.so.1".

(gdb) r
Starting program: /home/ig25/Krempel/a.out

Program received signal SIGSEGV, Segmentation fault.
0x08048469 in set_fast_math ()
    at ../../gcc-4.1/gcc/config/i386/crtfastmath.c:70
70            __builtin_ia32_ldmxcsr (mxcsr);
(gdb) p/x $pc
$1 = 0x8048469
(gdb) info reg
eax            0x681    1665
ecx            0x0      0
edx            0x2000000        33554432
ebx            0x80495b4        134518196
esp            0xbffff570       0xbffff570
ebp            0xbffff578       0xbffff578
esi            0x0      0
edi            0x80483c0        134513600
eip            0x8048469        0x8048469
eflags         0x210206 2163206
cs             0x73     115
ss             0x7b     123
ds             0x7b     123
es             0x7b     123
fs             0x0      0
gs             0x33     51
(gdb) disass
Dump of assembler code for function set_fast_math:
0x08048420 <set_fast_math+0>:   push   %ebp
0x08048421 <set_fast_math+1>:   mov    %esp,%ebp
0x08048423 <set_fast_math+3>:   push   %esi
0x08048424 <set_fast_math+4>:   sub    $0x4,%esp
0x08048427 <set_fast_math+7>:   pushf
0x08048428 <set_fast_math+8>:   pushf
0x08048429 <set_fast_math+9>:   pop    %eax
0x0804842a <set_fast_math+10>:  mov    %eax,%edx
0x0804842c <set_fast_math+12>:  xor    $0x200000,%eax
0x08048431 <set_fast_math+17>:  push   %eax
0x08048432 <set_fast_math+18>:  popf
0x08048433 <set_fast_math+19>:  pushf
0x08048434 <set_fast_math+20>:  pop    %eax
0x08048435 <set_fast_math+21>:  popf
0x08048436 <set_fast_math+22>:  xor    %edx,%eax
0x08048438 <set_fast_math+24>:  test   $0x200000,%eax
0x0804843d <set_fast_math+29>:  je     0x8048470 <set_fast_math+80>
0x0804843f <set_fast_math+31>:  xor    %eax,%eax
0x08048441 <set_fast_math+33>:  xchg   %ebx,%esi
0x08048443 <set_fast_math+35>:  cpuid
0x08048445 <set_fast_math+37>:  xchg   %ebx,%esi
0x08048447 <set_fast_math+39>:  test   %eax,%eax
0x08048449 <set_fast_math+41>:  je     0x8048470 <set_fast_math+80>
0x0804844b <set_fast_math+43>:  mov    $0x1,%eax
---Type <return> to continue, or q <return> to quit---
0x08048450 <set_fast_math+48>:  xchg   %ebx,%esi
0x08048452 <set_fast_math+50>:  cpuid
0x08048454 <set_fast_math+52>:  xchg   %ebx,%esi
0x08048456 <set_fast_math+54>:  and    $0x2000000,%edx
0x0804845c <set_fast_math+60>:  je     0x8048470 <set_fast_math+80>
0x0804845e <set_fast_math+62>:  stmxcsr 0xfffffff8(%ebp)
0x08048462 <set_fast_math+66>:  orl    $0x8040,0xfffffff8(%ebp)
0x08048469 <set_fast_math+73>:  ldmxcsr 0xfffffff8(%ebp)
0x0804846d <set_fast_math+77>:  lea    0x0(%esi),%esi
0x08048470 <set_fast_math+80>:  pop    %eax
0x08048471 <set_fast_math+81>:  pop    %esi
0x08048472 <set_fast_math+82>:  pop    %ebp
0x08048473 <set_fast_math+83>:  ret
End of assembler dump.
(gdb)


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23360

Reply via email to