public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: inline-asm/10153: selection of %dil or %sil on ia32 arch by valid C source
@ 2003-05-10 20:56 Dara Hazeghi
0 siblings, 0 replies; 3+ messages in thread
From: Dara Hazeghi @ 2003-05-10 20:56 UTC (permalink / raw)
To: nobody; +Cc: gcc-prs
The following reply was made to PR inline-asm/10153; it has been noted by GNATS.
From: Dara Hazeghi <dhazeghi@yahoo.com>
To: gcc-gnats@gcc.gnu.org, etienne.lorrain@masroudeau.com
Cc:
Subject: Re: inline-asm/10153: selection of %dil or %sil on ia32 arch by valid C source
Date: Sat, 10 May 2003 13:51:39 -0700
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-
trail&database=gcc&pr=10153
Hello,
on gcc 3.2.3 and 3.3 branch, I get the same error as mentioned in this
report, but on mainline (20030509), this code compiles and assembles
fine.
Dara
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: inline-asm/10153: selection of %dil or %sil on ia32 arch by valid C source
@ 2003-05-12 11:06 etienne.lorrain
0 siblings, 0 replies; 3+ messages in thread
From: etienne.lorrain @ 2003-05-12 11:06 UTC (permalink / raw)
To: nobody; +Cc: gcc-prs
The following reply was made to PR inline-asm/10153; it has been noted by GNATS.
From: etienne.lorrain@masroudeau.com
To: "Dara Hazeghi" <dhazeghi@yahoo.com>
Cc: gcc-gnats@gcc.gnu.org,etienne.lorrain@masroudeau.com
Subject: Re: inline-asm/10153: selection of %dil or %sil on ia32 arch by
valid C source
Date: Mon, 12 May 2003 06:59:00 +0100 (BST)
> http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=10153
>
> Hello,
>
> on gcc 3.2.3 and 3.3 branch, I get the same error as mentioned in this
> report, but on mainline (20030509), this code compiles and assembles
> fine.
>
> Dara
>
Hello,
I did this morning, in an empty directory:
lynx http://prdownloads.sourceforge.net/gujin/gujin-0.7.tgz?download
ncftpget
ftp://sources.redhat.com/pub/binutils/releases/binutils-2.13.2.1.tar.gz
ncftpget ftp://sources.redhat.com/pub/gcc/snapshots/gcc-3.3-20030508.tar.gz
tar -xvzf gujin-0.7.tgz
-------------------------------------------
Here I had to modify gujin/Makefile :
@@ -1564,7 +1564,7 @@
cd $(notdir $(basename $(basename $(subst core-,,$(LAST_GCC))))) ; \
mkdir build ; \
cd build/ ; \
- ../configure --prefix=$(P_PWD)/toolchain --enable-languages=C ; \
+ ../configure --prefix=$(P_PWD)/toolchain --enable-languages=c ; \
make bootstrap-lean ; \
make install )
endif
-------------------
Is that a philosophycal change, no more "C" language, only "c" ????
-------------------------------------------
cd gujin
make toolchain
make dep boot.exe
(all of this is shown without their output - quite long)
At some point I got:
....
GCC: gcc (GCC) 3.3 20030509 (prerelease), Binutils: GNU ld version 2.13.2.1
....
/home/etienne/prjgcc/toolchain/bin/gcc -fstrict-aliasing -falign-loops=1
-falign-jumps=1 -falign-functions=2 -mno-align-double
-mpreferred-stack-boundary=2 -fomit-frame-pointer -march=i386 -mrtd
-fno-builtin -fno-schedule-insns2 -finline-limit=10000 -Os -Wall
-Wno-format -Wno-main -Wstrict-prototypes -Wundef -Wpointer-arith
-Wcast-align -Wwrite-strings -Wsign-compare -Wdisabled-optimization
-ffunction-sections -include code16.h -DDEBUG="(DEBUG_STACK)"
-DUSER_SUPPORT="(VGA_SUPPORT|VGA_EXTENDED|VESA_WINDOW|VESA_WINFUNCTION|VESA_LINEAR|VESA_EDID|VESA_RECALC|VESA_2WINDOWS|VESA_HARDWINDOW|VESA_PMINFO|VESA_16BPP|VESA_32BPP|VESA_24BPP|VESA_4BPP_EGA|VESA_4BPP_TEXT|VESA_8BPP|SERIAL_VT100|SERIAL_VT420|BIOS_MOUSE_SUPPORT|SERIAL_MOUSE_SUPPORT|JOYSTICK_SUPPORT)"
-DDISK_SUPPORT="(BIOS_SUPPORT|EBIOS_SUPPORT|IDE_SUPPORT|DOS_SUPPORT|E2FS_PROBE|FAT12_PROBE|FAT16_PROBE|FAT32_PROBE|BOOTSECT_PROBE)"
-DSETUP="(APPLICATION|CODE_SEGMENT|EXTRA_SEGMENT|GC_SECTION|ASSEMBLY_CISC|UPDATE_BOOTPARAM|USE_INT1587|MINIDEBUG)"
-DLANGUAGE=ENGLISH -S -o user.S user.c
In file included from user.c:43:
ega.h: In function `_EGA_read_write_mode':
ega.h:172: warning: dereferencing type-punned pointer will break
strict-aliasing rules
ega.h: In function `_EGA_setup':
ega.h:178: warning: dereferencing type-punned pointer will break
strict-aliasing rules
sed '/.align 32/d' < user.S > user.s
/home/etienne/prjgcc/toolchain/bin/as -acdhls=user.lis -o user.o user.s
user.s: Assembler messages:
user.s:2962: Error: bad register name `%dil'
make: *** [user.o] Error 1
rm user.S boot.s user.s boot.S
So the bug is still present in this version.
I do not know about my "reduced to the simplest source" bug report.
I have to check about new warning "dereferencing type-punned".
Regards,
Etienne.
^ permalink raw reply [flat|nested] 3+ messages in thread
* inline-asm/10153: selection of %dil or %sil on ia32 arch by valid C source
@ 2003-03-19 17:36 etienne.lorrain
0 siblings, 0 replies; 3+ messages in thread
From: etienne.lorrain @ 2003-03-19 17:36 UTC (permalink / raw)
To: gcc-gnats
>Number: 10153
>Category: inline-asm
>Synopsis: selection of %dil or %sil on ia32 arch by valid C source
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Mar 19 17:36:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator: Etienne Lorrain
>Release: gcc version 3.2.3 20030309 (Debian prerelease)
>Organization:
>Environment:
Linux Debian ia32
>Description:
Just compile this, and look at the comment
"automatic size decision there"
(lots of comment removed and macro expanded...)
Works up to gcc-3.0.4, not after 3.1
etienne@fulbert:~/gcc/gujin$ gcc -v
Reading specs from /usr/lib/gcc-lib/i386-linux/3.2.3/specs
Configured with: ../src/configure -v --enable-languages=c,c++,java,f77,proto,pascal,objc,ada --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-gxx-include-dir=/usr/include/c++/3.2 --enable-shared --with-system-zlib --enable-nls --without-included-gettext --enable-__cxa_atexit --enable-clocale=gnu --enable-java-gc=boehm --enable-objc-gc i386-linux
Thread model: posix
gcc version 3.2.3 20030309 (Debian prerelease)
etienne@fulbert:~/gcc/gujin$
etienne@fulbert:~/gcc/gujin$ cat user.i
extern unsigned char VGA_valid_mode[];
extern inline unsigned
divrem8 (unsigned short oper, unsigned char *rem)
{
unsigned divider;
asm (
" aam $8 # operand in ax \n"
" movb %%al,%%cl # remainder \n"
" movzbl %%ah,%%eax # divider \n"
: "=a" (divider), "=c" (*rem) : "a" (oper) );
return divider;
}
extern inline void VIDEO_mode_invalidate (unsigned char mode)
{
unsigned char shift;
unsigned index = divrem8 (mode, &shift);
unsigned char tmp = ({
typeof (VGA_valid_mode[index]) returned;
asm volatile (
" # automatic size decision there: \n"
" mov %%cs:%a1,%0 \n"
: "=r" (returned) : "g" (&VGA_valid_mode[index]));
returned; }) & ~(1 << shift);
asm volatile (
" movb %b0,%%cs:%a1 \n"
: : "qi" (tmp), "r" (&VGA_valid_mode[index])
);
}
void VGA_init (void)
{
extern char tmpstatictable[15];
unsigned i;
for (i = 0; i <= 0x7F; i++) {
unsigned char shift;
unsigned short offset = divrem8 (i, &shift);
if ((tmpstatictable[offset] & (1 << shift)) == 0)
VIDEO_mode_invalidate (i);
}
}
etienne@fulbert:~/gcc/gujin$ gcc -Os user.i
/tmp/ccWPbdd5.s: Assembler messages:
/tmp/ccWPbdd5.s:35: Error: bad register name `%sil'
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2003-05-12 11:06 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-05-10 20:56 inline-asm/10153: selection of %dil or %sil on ia32 arch by valid C source Dara Hazeghi
-- strict thread matches above, loose matches on Subject: below --
2003-05-12 11:06 etienne.lorrain
2003-03-19 17:36 etienne.lorrain
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).