[Bug 590859] Re: wrong code (wrong order) generated with -O2
Bug Watch Updater
590859 at bugs.launchpad.net
Sat Mar 23 22:07:19 UTC 2013
** Changed in: gcc
Importance: Unknown => Medium
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to gcc-4.4 in Ubuntu.
https://bugs.launchpad.net/bugs/590859
Title:
wrong code (wrong order) generated with -O2
Status in The GNU Compiler Collection:
Invalid
Status in “gcc-4.4” package in Ubuntu:
Invalid
Bug description:
Binary package hint: gcc-4.4
Hi,
Description: Ubuntu 10.04 LTS
Release: 10.04
gcc:
Installed: 4:4.4.3-1ubuntu1
Candidate: 4:4.4.3-1ubuntu1
Version table:
*** 4:4.4.3-1ubuntu1 0
500 http://ftp.crihan.fr/ubuntu/ lucid/main Packages
100 /var/lib/dpkg/status
Cross-compiling to x86 code
When compiling with :
gcc -O2 -m32 -c -o proc.o proc.c
The generated code is :
0x000000af <+175>: movl $0x0,%gs:0x4
0x000000ba <+186>: lgdtl (%edx)
0x000000bd <+189>: mov $0x18,%edx
0x000000c2 <+194>: mov %edx,%gs
0x000000c4 <+196>: mov %eax,%gs:0x0
When compiling with :
gcc -O1 -m32 -c -o proc.o proc.c
0x000000af <+175>: lgdtl (%edx)
0x000000b2 <+178>: mov $0x18,%edx
0x000000b7 <+183>: mov %edx,%gs
0x000000b9 <+185>: mov %eax,%gs:0x0
0x000000bf <+191>: movl $0x0,%gs:0x4
The first code is wrong : register GS is used (movl $0x0,%gs:0x4)
before loading the GDT (lgdtl (%edx))
It seems to be working fine with GCC version 4.3.4 (Ubuntu
4.3.4-10ubuntu1)
To manage notifications about this bug go to:
https://bugs.launchpad.net/gcc/+bug/590859/+subscriptions
More information about the foundations-bugs
mailing list