[LLVMbugs] [Bug 7253] New: LLVM creates invalid code on GeodeLX
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Sat May 29 01:28:25 PDT 2010
http://llvm.org/bugs/show_bug.cgi?id=7253
Summary: LLVM creates invalid code on GeodeLX
Product: clang
Version: 2.7
Platform: PC
OS/Version: FreeBSD
Status: NEW
Severity: normal
Priority: P
Component: LLVM Codegen
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: freebsd at nagilum.org
CC: llvmbugs at cs.uiuc.edu
On a Geode LX system clang attempts to create code for pentium4:
$ clang -### -o a16-clang a16.c
clang version 1.1 (branches/release_27)
Target: i386-portbld-freebsd8.1
Thread model: posix
"/usr/local/bin/clang" "-cc1" "-triple" "i386-portbld-freebsd8.1" "-S"
"-disable-free" "-main-file-name" "a16.c" "-mrelocation-model" "static"
"-mdisable-fp-elim" "-mconstructor-aliases" "-target-cpu" "pentium4"
"-resource-dir" "/usr/local/lib/clang/1.1" "-fmessage-length" "80"
"-fgnu-runtime" "-fdiagnostics-show-option" "-fcolor-diagnostics" "-o"
"/tmp/cc-QQe1uq.s" "-x" "c" "a16.c"
"/usr/local/bin/as" "--32" "-o" "/tmp/cc-fveACK.o" "/tmp/cc-QQe1uq.s"
"/usr/local/bin/ld" "--eh-frame-hdr" "-dynamic-linker" "/libexec/ld-elf.so.1"
"-m" "elf_i386_fbsd" "-o" "a16-clang" "/usr/lib/crt1.o" "/usr/lib/crti.o"
"/usr/lib/crtbegin.o" "/tmp/cc-fveACK.o" "-lgcc" "--as-needed" "-lgcc_s"
"--no-as-needed" "-lc" "-lgcc" "--as-needed" "-lgcc_s" "--no-as-needed"
"/usr/lib/crtend.o" "/usr/lib/crtn.o"
GCC gets it right, but had a similar bug
(http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37179):
$ gcc45 -### -o a16-clang a16.c
Using built-in specs.
COLLECT_GCC=gcc45
COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc45/gcc/i386-portbld-freebsd8.1/4.5.1/lto-wrapper
Target: i386-portbld-freebsd8.1
Configured with: ./../gcc-4.5-20100520/configure --enable-lto=yes
--with-libelf=/usr/local --disable-nls --libdir=/usr/local/lib/gcc45
--libexecdir=/usr/local/libexec/gcc45 --program-suffix=45
--with-as=/usr/local/bin/as --with-gmp=/usr/local
--with-gxx-include-dir=/usr/local/lib/gcc45/include/c++/
--with-ld=/usr/local/bin/ld --with-libiconv-prefix=/usr/local
--with-system-zlib --disable-rpath --enable-libgcj --prefix=/usr/local
--mandir=/usr/local/man --infodir=/usr/local/info/gcc45
--build=i386-portbld-freebsd8.1
Thread model: posix
gcc version 4.5.1 20100520 (prerelease) (GCC)
COLLECT_GCC_OPTIONS='-o' 'a16-clang' '-mtune=i386' '-march=i386'
"/usr/local/libexec/gcc45/gcc/i386-portbld-freebsd8.1/4.5.1/cc1" "-quiet"
"a16.c" "-quiet" "-dumpbase" "a16.c" "-mtune=i386" "-march=i386" "-auxbase"
"a16" "-o" "/var/tmp//ccosg0Cn.s"
COLLECT_GCC_OPTIONS='-o' 'a16-clang' '-mtune=i386' '-march=i386'
"/usr/local/bin/as" "-o" "/var/tmp//ccmzk0tQ.o" "/var/tmp//ccosg0Cn.s"
COMPILER_PATH=/usr/local/libexec/gcc45/gcc/i386-portbld-freebsd8.1/4.5.1/:/usr/local/libexec/gcc45/gcc/i386-portbld-freebsd8.1/4.5.1/:/usr/local/libexec/gcc45/gcc/i386-portbld-freebsd8.1/:/usr/local/lib/gcc45/gcc/i386-portbld-freebsd8.1/4.5.1/:/usr/local/lib/gcc45/gcc/i386-portbld-freebsd8.1/
LIBRARY_PATH=/usr/local/lib/gcc45/gcc/i386-portbld-freebsd8.1/4.5.1/:/usr/local/lib/gcc45/gcc/i386-portbld-freebsd8.1/4.5.1/../../../:/lib/:/usr/lib/
COLLECT_GCC_OPTIONS='-o' 'a16-clang' '-mtune=i386' '-march=i386'
"/usr/local/libexec/gcc45/gcc/i386-portbld-freebsd8.1/4.5.1/collect2"
"--eh-frame-hdr" "-dynamic-linker" "/libexec/ld-elf.so.1" "-o" "a16-clang"
"/usr/lib/crt1.o" "/usr/lib/crti.o"
"/usr/local/lib/gcc45/gcc/i386-portbld-freebsd8.1/4.5.1/crtbegin.o"
"-L/usr/local/lib/gcc45/gcc/i386-portbld-freebsd8.1/4.5.1"
"-L/usr/local/lib/gcc45/gcc/i386-portbld-freebsd8.1/4.5.1/../../.."
"/var/tmp//ccmzk0tQ.o" "-lgcc" "--as-needed" "-lgcc_s" "--no-as-needed" "-lc"
"-lgcc" "--as-needed" "-lgcc_s" "--no-as-needed"
"/usr/local/lib/gcc45/gcc/i386-portbld-freebsd8.1/4.5.1/crtend.o"
"/usr/lib/crtn.o"
Binaries created by clang will contain invalid code:
nagilum at cakebox ~/Projects/C/src/a16 > gdb -c a16-clang-O3.core a16-clang-O3
GNU gdb 6.1.1 [FreeBSD]
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-marcel-freebsd"...(no debugging symbols
found)...
Core was generated by `a16-clang-O3'.
Program terminated with signal 4, Illegal instruction.
Reading symbols from /lib/libc.so.7...(no debugging symbols found)...done.
Loaded symbols for /lib/libc.so.7
Reading symbols from /libexec/ld-elf.so.1...(no debugging symbols
found)...done.
Loaded symbols for /libexec/ld-elf.so.1
#0 0x08049441 in NextGuess ()
(gdb) disassemble NextGuess
Dump of assembler code for function NextGuess:
0x08049390 <NextGuess+0>: push %ebp
0x08049391 <NextGuess+1>: mov %esp,%ebp
0x08049393 <NextGuess+3>: push %ebx
0x08049394 <NextGuess+4>: push %edi
0x08049395 <NextGuess+5>: push %esi
0x08049396 <NextGuess+6>: sub $0x54c,%esp
0x0804939c <NextGuess+12>: xor %eax,%eax
0x0804939e <NextGuess+14>: lea 0xfffffaf2(%ebp),%ecx
0x080493a4 <NextGuess+20>: mov $0x5,%edx
0x080493a9 <NextGuess+25>: lea 0x0(%esi),%esi
0x080493b0 <NextGuess+32>: xor %esi,%esi
0x080493b2 <NextGuess+34>: lea 0x0(%esi),%esi
0x080493b9 <NextGuess+41>: lea 0x0(%edi),%edi
0x080493c0 <NextGuess+48>: movw $0x0,(%ecx,%esi,2)
0x080493c6 <NextGuess+54>: inc %esi
0x080493c7 <NextGuess+55>: cmp $0x10,%esi
0x080493ca <NextGuess+58>: jne 0x80493c0 <NextGuess+48>
0x080493cc <NextGuess+60>: test %edx,%edx
0x080493ce <NextGuess+62>: js 0x80493ee <NextGuess+94>
0x080493d0 <NextGuess+64>: xor %esi,%esi
0x080493d2 <NextGuess+66>: lea 0x0(%esi),%esi
0x080493d9 <NextGuess+73>: lea 0x0(%edi),%edi
0x080493e0 <NextGuess+80>: lea (%eax,%esi,1),%edi
0x080493e3 <NextGuess+83>: mov %di,(%ecx,%esi,2)
0x080493e7 <NextGuess+87>: inc %esi
0x080493e8 <NextGuess+88>: cmp %edx,%esi
0x080493ea <NextGuess+90>: jle 0x80493e0 <NextGuess+80>
0x080493ec <NextGuess+92>: add %esi,%eax
0x080493ee <NextGuess+94>: add $0x20,%ecx
0x080493f1 <NextGuess+97>: test %edx,%edx
0x080493f3 <NextGuess+99>: lea 0xffffffff(%edx),%edx
0x080493f6 <NextGuess+102>: jne 0x80493b0 <NextGuess+32>
0x080493f8 <NextGuess+104>: mov $0x61a80,%eax
0x080493fd <NextGuess+109>: lea 0x0(%esi),%esi
0x08049400 <NextGuess+112>: mov 0x8(%ebp),%ecx
0x08049403 <NextGuess+115>: xor %edx,%edx
0x08049405 <NextGuess+117>: lea (%ecx,%eax,1),%ecx
0x08049408 <NextGuess+120>: nop
---Type <return> to continue, or q <return> to quit---
0x08049409 <NextGuess+121>: lea 0x0(%esi),%esi
0x08049410 <NextGuess+128>: movw $0x0,(%ecx,%edx,2)
0x08049416 <NextGuess+134>: inc %edx
0x08049417 <NextGuess+135>: cmp $0x15,%edx
0x0804941a <NextGuess+138>: jne 0x8049410 <NextGuess+128>
0x0804941c <NextGuess+140>: add $0x2c,%eax
0x0804941f <NextGuess+143>: cmp $0x493e00,%eax
0x08049424 <NextGuess+148>: jne 0x8049400 <NextGuess+112>
0x08049426 <NextGuess+150>: mov 0x8(%ebp),%eax
0x08049429 <NextGuess+153>: pxor %xmm0,%xmm0
0x0804942d <NextGuess+157>: movl $0x1869f,0xfffffad0(%ebp)
0x08049437 <NextGuess+167>: movl $0x186a0,0xfffffacc(%ebp)
0x08049441 <NextGuess+177>: movsd %xmm0,0xfffffad8(%ebp)
0x08049449 <NextGuess+185>: lea 0x61aac(%eax),%ecx
0x0804944f <NextGuess+191>: lea 0x4(%eax),%eax
0x08049452 <NextGuess+194>: mov %ecx,0xfffffabc(%ebp)
0x08049458 <NextGuess+200>: xor %ecx,%ecx
0x0804945a <NextGuess+202>: mov %eax,0xfffffab8(%ebp)
0x08049460 <NextGuess+208>: mov %ecx,0xfffffac8(%ebp)
0x08049466 <NextGuess+214>: mov %ecx,0xfffffad4(%ebp)
0x0804946c <NextGuess+220>: mov %ecx,0xfffffae0(%ebp)
0x08049472 <NextGuess+226>: lea 0x0(%esi),%esi
0x08049479 <NextGuess+233>: lea 0x0(%edi),%edi
0x08049480 <NextGuess+240>: mov 0xfffffae0(%ebp),%eax
0x08049486 <NextGuess+246>: movsd 0xfffffad8(%ebp),%xmm0
0x0804948e <NextGuess+254>: lea 0x1(%eax),%ecx
0x08049491 <NextGuess+257>: addsd 0x80499b8,%xmm0
0x08049499 <NextGuess+265>: mov %eax,0xfffffaec(%ebp)
0x0804949f <NextGuess+271>: mov %ecx,0xfffffae0(%ebp)
0x080494a5 <NextGuess+277>: mov 0x8(%ebp),%ecx
0x080494a8 <NextGuess+280>: movsd %xmm0,0xfffffac0(%ebp)
0x080494b0 <NextGuess+288>: cmpl $0xffffffff,(%ecx,%eax,4)
0x080494b4 <NextGuess+292>: je 0x804957c <NextGuess+492>
0x080494ba <NextGuess+298>: mov 0xfffffad4(%ebp),%ecx
0x080494c0 <NextGuess+304>: mov 0x8(%ebp),%eax
0x080494c3 <NextGuess+307>: cmpl $0x1869f,0xfffffae0(%ebp)
0x080494cd <NextGuess+317>: movw $0x1,0x61aa8(%eax,%ecx,1)
0x080494d7 <NextGuess+327>: jg 0x804957c <NextGuess+492>
0x080494dd <NextGuess+333>: mov 0xfffffac8(%ebp),%eax
---Type <return> to continue, or q <return> to quit---
0x080494e3 <NextGuess+339>: mov 0x8(%ebp),%ecx
0x080494e6 <NextGuess+342>: mov 0xfffffad4(%ebp),%esi
0x080494ec <NextGuess+348>: mov 0xfffffabc(%ebp),%edi
0x080494f2 <NextGuess+354>: mov 0xfffffab8(%ebp),%ebx
0x080494f8 <NextGuess+360>: lea (%ecx,%eax,1),%edx
0x080494fb <NextGuess+363>: lea (%ecx,%esi,1),%ecx
0x080494fe <NextGuess+366>: lea (%edi,%esi,1),%edi
0x08049501 <NextGuess+369>: lea (%ebx,%eax,1),%ebx
0x08049504 <NextGuess+372>: mov 0xfffffad0(%ebp),%esi
0x0804950a <NextGuess+378>: mov %edx,0xfffffae8(%ebp)
0x08049510 <NextGuess+384>: mov %ecx,0xfffffae4(%ebp)
0x08049516 <NextGuess+390>: lea 0x0(%esi),%esi
0x08049519 <NextGuess+393>: lea 0x0(%edi),%edi
0x08049520 <NextGuess+400>: cmpl $0xffffffff,(%ebx)
0x08049523 <NextGuess+403>: jne 0x8049530 <NextGuess+416>
0x08049525 <NextGuess+405>: add $0x4,%ebx
0x08049528 <NextGuess+408>: add $0x2c,%edi
0x0804952b <NextGuess+411>: dec %esi
0x0804952c <NextGuess+412>: jne 0x8049520 <NextGuess+400>
0x0804952e <NextGuess+414>: jmp 0x804957c <NextGuess+492>
0x08049530 <NextGuess+416>: mov 0xfffffae8(%ebp),%ecx
0x08049536 <NextGuess+422>: mov %ebx,0x4(%esp)
0x0804953a <NextGuess+426>: mov %ecx,(%esp)
0x0804953d <NextGuess+429>: call 0x8048f50 <Score>
0x08049542 <NextGuess+434>: mov 0xfffffaec(%ebp),%ecx
0x08049548 <NextGuess+440>: mov 0x8(%ebp),%eax
0x0804954b <NextGuess+443>: mov (%eax,%ecx,4),%eax
0x0804954e <NextGuess+446>: mov 0xfffffae4(%ebp),%ecx
0x08049554 <NextGuess+452>: shr $0x13,%eax
0x08049557 <NextGuess+455>: and $0x1fe,%eax
0x0804955c <NextGuess+460>: movswl 0xfffffaf2(%ebp,%eax,1),%eax
0x08049564 <NextGuess+468>: mov 0x61a80(%ecx,%eax,2),%dx
0x0804956c <NextGuess+476>: inc %dx
0x0804956e <NextGuess+478>: mov %dx,0x61a80(%ecx,%eax,2)
0x08049576 <NextGuess+486>: incw (%edi,%eax,2)
0x0804957a <NextGuess+490>: jmp 0x8049525 <NextGuess+405>
0x0804957c <NextGuess+492>: mov 0xfffffaec(%ebp),%ecx
0x08049582 <NextGuess+498>: mov $0x51eb851f,%edx
0x08049587 <NextGuess+503>: mov %ecx,%eax
---Type <return> to continue, or q <return> to quit---
0x08049589 <NextGuess+505>: imul %edx
0x0804958b <NextGuess+507>: mov %edx,%eax
0x0804958d <NextGuess+509>: sar $0x5,%edx
0x08049590 <NextGuess+512>: shr $0x1f,%eax
0x08049593 <NextGuess+515>: add %eax,%edx
0x08049595 <NextGuess+517>: imul $0x64,%edx,%eax
0x08049598 <NextGuess+520>: sub %eax,%ecx
0x0804959a <NextGuess+522>: jne 0x80495f7 <NextGuess+615>
0x0804959c <NextGuess+524>: movsd 0x80499c0,%xmm0
0x080495a4 <NextGuess+532>: cvtsi2sd 0xfffffacc(%ebp),%xmm1
0x080495ac <NextGuess+540>: subsd 0xfffffad8(%ebp),%xmm0
0x080495b4 <NextGuess+548>: mulsd %xmm0,%xmm1
0x080495b8 <NextGuess+552>: movsd 0x80499d0,%xmm0
0x080495c0 <NextGuess+560>: divsd 0x80499c8,%xmm1
0x080495c8 <NextGuess+568>: addsd %xmm0,%xmm1
0x080495cc <NextGuess+572>: divsd %xmm0,%xmm1
0x080495d0 <NextGuess+576>: mulsd 0x80499d8,%xmm1
0x080495d8 <NextGuess+584>: movsd %xmm1,0x4(%esp)
0x080495de <NextGuess+590>: movl $0x8049b40,(%esp)
0x080495e5 <NextGuess+597>: call 0x8048540 <_init+68>
0x080495ea <NextGuess+602>: mov 0x804ae10,%eax
0x080495ef <NextGuess+607>: mov %eax,(%esp)
0x080495f2 <NextGuess+610>: call 0x80485a0 <_init+164>
0x080495f7 <NextGuess+615>: movsd 0xfffffac0(%ebp),%xmm0
0x080495ff <NextGuess+623>: decl 0xfffffacc(%ebp)
0x08049605 <NextGuess+629>: addl $0x2c,0xfffffad4(%ebp)
0x0804960c <NextGuess+636>: addl $0x4,0xfffffac8(%ebp)
0x08049613 <NextGuess+643>: decl 0xfffffad0(%ebp)
0x08049619 <NextGuess+649>: cmpl $0x186a0,0xfffffae0(%ebp)
0x08049623 <NextGuess+659>: movsd %xmm0,0xfffffad8(%ebp)
0x0804962b <NextGuess+667>: jne 0x8049480 <NextGuess+240>
0x08049631 <NextGuess+673>: movl $0x8049c83,(%esp)
0x08049638 <NextGuess+680>: call 0x8048600 <_init+260>
0x0804963d <NextGuess+685>: movl $0x186a0,0xfffffae8(%ebp)
0x08049647 <NextGuess+695>: xor %ecx,%ecx
0x08049649 <NextGuess+697>: mov $0xffbcdc80,%eax
0x0804964e <NextGuess+702>: mov %ecx,0xfffffae4(%ebp)
0x08049654 <NextGuess+708>: lea 0x0(%esi),%esi
0x0804965a <NextGuess+714>: lea 0x0(%edi),%edi
---Type <return> to continue, or q <return> to quit---
0x08049660 <NextGuess+720>: mov 0x8(%ebp),%edx
0x08049663 <NextGuess+723>: cmpl $0xffffffff,(%edx,%ecx,2)
0x08049667 <NextGuess+727>: je 0x80496c8 <NextGuess+824>
0x08049669 <NextGuess+729>: mov 0x8(%ebp),%edx
0x0804966c <NextGuess+732>: xor %esi,%esi
0x0804966e <NextGuess+734>: mov %esi,%edi
0x08049670 <NextGuess+736>: lea (%edx,%eax,1),%edx
0x08049673 <NextGuess+739>: lea 0x0(%esi),%esi
0x08049679 <NextGuess+745>: lea 0x0(%edi),%edi
0x08049680 <NextGuess+752>: movzwl 0x493e00(%edx,%edi,2),%ebx
0x08049688 <NextGuess+760>: cmp %ebx,%esi
0x0804968a <NextGuess+762>: cmovle %ebx,%esi
0x0804968d <NextGuess+765>: inc %edi
0x0804968e <NextGuess+766>: cmp $0x15,%edi
0x08049691 <NextGuess+769>: jne 0x8049680 <NextGuess+752>
0x08049693 <NextGuess+771>: mov 0xfffffae8(%ebp),%edx
0x08049699 <NextGuess+777>: cmp %edx,%esi
0x0804969b <NextGuess+779>: sete %bl
0x0804969e <NextGuess+782>: cmp %edx,%esi
0x080496a0 <NextGuess+784>: mov 0x8(%ebp),%edx
0x080496a3 <NextGuess+787>: mov %si,0x493e2a(%edx,%eax,1)
0x080496ab <NextGuess+795>: jl 0x80496b8 <NextGuess+808>
0x080496ad <NextGuess+797>: movzbl %bl,%esi
0x080496b0 <NextGuess+800>: add %esi,0xfffffae4(%ebp)
0x080496b6 <NextGuess+806>: jmp 0x80496c8 <NextGuess+824>
0x080496b8 <NextGuess+808>: movl $0x0,0xfffffae4(%ebp)
0x080496c2 <NextGuess+818>: mov %esi,0xfffffae8(%ebp)
0x080496c8 <NextGuess+824>: add $0x2,%ecx
0x080496cb <NextGuess+827>: add $0x2c,%eax
0x080496ce <NextGuess+830>: jne 0x8049660 <NextGuess+720>
0x080496d0 <NextGuess+832>: cmpl $0x0,0xfffffae4(%ebp)
0x080496d7 <NextGuess+839>: jne 0x80496e5 <NextGuess+853>
0x080496d9 <NextGuess+841>: movl $0x0,0xfffffaec(%ebp)
0x080496e3 <NextGuess+851>: jmp 0x8049710 <NextGuess+896>
0x080496e5 <NextGuess+853>: mov 0xfffffae4(%ebp),%esi
0x080496eb <NextGuess+859>: call 0x8048570 <_init+116>
0x080496f0 <NextGuess+864>: cltd
0x080496f1 <NextGuess+865>: inc %esi
0x080496f2 <NextGuess+866>: idiv %esi
---Type <return> to continue, or q <return> to quit---
0x080496f4 <NextGuess+868>: movl $0x0,0xfffffaec(%ebp)
0x080496fe <NextGuess+878>: mov %edx,0xfffffae4(%ebp)
0x08049704 <NextGuess+884>: lea 0x0(%esi),%esi
0x0804970a <NextGuess+890>: lea 0x0(%edi),%edi
0x08049710 <NextGuess+896>: mov 0xfffffaec(%ebp),%ecx
0x08049716 <NextGuess+902>: mov 0x8(%ebp),%eax
0x08049719 <NextGuess+905>: mov (%eax,%ecx,4),%eax
0x0804971c <NextGuess+908>: cmp $0xffffffff,%eax
0x0804971f <NextGuess+911>: je 0x80497e6 <NextGuess+1110>
0x08049725 <NextGuess+917>: mov 0x8(%ebp),%edx
0x08049728 <NextGuess+920>: imul $0x2c,%ecx,%ecx
0x0804972b <NextGuess+923>: movzwl 0x61aaa(%edx,%ecx,1),%ecx
0x08049733 <NextGuess+931>: cmp 0xfffffae8(%ebp),%ecx
0x08049739 <NextGuess+937>: jne 0x80497e6 <NextGuess+1110>
0x0804973f <NextGuess+943>: cmpl $0x0,0xfffffae4(%ebp)
0x08049746 <NextGuess+950>: jne 0x80497e0 <NextGuess+1104>
0x0804974c <NextGuess+956>: mov 0xc(%ebp),%ecx
0x0804974f <NextGuess+959>: mov %eax,(%ecx)
0x08049751 <NextGuess+961>: xor %ecx,%ecx
0x08049753 <NextGuess+963>: lea 0x0(%esi),%esi
0x08049759 <NextGuess+969>: lea 0x0(%edi),%edi
0x08049760 <NextGuess+976>: imul $0x2c,0xfffffaec(%ebp),%edx
0x08049767 <NextGuess+983>: add 0x8(%ebp),%edx
0x0804976a <NextGuess+986>: movzwl 0x61a80(%edx,%ecx,2),%edx
0x08049772 <NextGuess+994>: cmp 0xfffffae8(%ebp),%edx
0x08049778 <NextGuess+1000>: jne 0x80497d0 <NextGuess+1088>
0x0804977a <NextGuess+1002>: xor %edx,%edx
0x0804977c <NextGuess+1004>: lea 0x0(%esi),%esi
0x08049780 <NextGuess+1008>: mov $0x5,%esi
0x08049785 <NextGuess+1013>: sub %edx,%esi
0x08049787 <NextGuess+1015>: js 0x80497c5 <NextGuess+1077>
0x08049789 <NextGuess+1017>: xor %esi,%esi
0x0804978b <NextGuess+1019>: nop
0x0804978c <NextGuess+1020>: lea 0x0(%esi),%esi
0x08049790 <NextGuess+1024>: mov %edx,%edi
0x08049792 <NextGuess+1026>: shl $0x4,%edi
0x08049795 <NextGuess+1029>: add %esi,%edi
0x08049797 <NextGuess+1031>: movswl 0xfffffaf2(%ebp,%edi,2),%ebx
0x0804979f <NextGuess+1039>: cmp %ecx,%ebx
---Type <return> to continue, or q <return> to quit---
0x080497a1 <NextGuess+1041>: jne 0x80497b9 <NextGuess+1065>
0x080497a3 <NextGuess+1043>: mov 0xc(%ebp),%edx
0x080497a6 <NextGuess+1046>: shl $0x14,%edi
0x080497a9 <NextGuess+1049>: and $0xf00fffff,%eax
0x080497ae <NextGuess+1054>: or %edi,%eax
0x080497b0 <NextGuess+1056>: mov %eax,(%edx)
0x080497b2 <NextGuess+1058>: mov $0x5,%edx
0x080497b7 <NextGuess+1063>: mov %edx,%esi
0x080497b9 <NextGuess+1065>: mov $0x5,%edi
0x080497be <NextGuess+1070>: inc %esi
0x080497bf <NextGuess+1071>: sub %edx,%edi
0x080497c1 <NextGuess+1073>: cmp %edi,%esi
0x080497c5 <NextGuess+1077>: inc %edx
0x080497c6 <NextGuess+1078>: cmp $0x6,%edx
0x080497c9 <NextGuess+1081>: jl 0x8049780 <NextGuess+1008>
0x080497cb <NextGuess+1083>: mov $0x15,%ecx
0x080497d0 <NextGuess+1088>: inc %ecx
0x080497d1 <NextGuess+1089>: cmp $0x15,%ecx
0x080497d4 <NextGuess+1092>: jl 0x8049760 <NextGuess+976>
0x080497d6 <NextGuess+1094>: movl $0x186a0,0xfffffaec(%ebp)
0x080497e0 <NextGuess+1104>: decl 0xfffffae4(%ebp)
0x080497e6 <NextGuess+1110>: mov 0xfffffaec(%ebp),%eax
0x080497ec <NextGuess+1116>: inc %eax
0x080497ed <NextGuess+1117>: mov %eax,0xfffffaec(%ebp)
0x080497f3 <NextGuess+1123>: cmp $0x186a0,%eax
0x080497f8 <NextGuess+1128>: jl 0x8049710 <NextGuess+896>
0x080497fe <NextGuess+1134>: add $0x54c,%esp
0x08049804 <NextGuess+1140>: pop %esi
0x08049805 <NextGuess+1141>: pop %edi
0x08049806 <NextGuess+1142>: pop %ebx
0x08049807 <NextGuess+1143>: pop %ebp
0x08049808 <NextGuess+1144>: ret
0x08049809 <NextGuess+1145>: lea 0x0(%esi),%esi
End of assembler dump.
I used gdb to trace it down to this movsd:
0x0804942d <NextGuess+157>: movl $0x1869f,0xfffffad0(%ebp)
0x08049437 <NextGuess+167>: movl $0x186a0,0xfffffacc(%ebp)
0x08049441 <NextGuess+177>: movsd %xmm0,0xfffffad8(%ebp)
0x08049449 <NextGuess+185>: lea 0x61aac(%eax),%ecx
0x0804944f <NextGuess+191>: lea 0x4(%eax),%eax
(gdb) b *0x08049429
Breakpoint 4 at 0x8049429
(gdb) continue
Continuing.
Breakpoint 4, 0x08049429 in NextGuess ()
(gdb) stepi
0x0804942d in NextGuess ()
(gdb) stepi
0x08049437 in NextGuess ()
(gdb) stepi
0x08049441 in NextGuess ()
(gdb) stepi
Program received signal SIGILL, Illegal instruction.
0x08049441 in NextGuess ()
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list