This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
internal error in C with asm compiling
- To: gcc-bugs at gcc dot gnu dot org
- Subject: internal error in C with asm compiling
- From: Simon Nieuviarts <snieuvia at ensisun dot imag dot fr>
- Date: Sat, 10 Jun 2000 09:58:42 +0200
Hi,
I encountered an internal error, here is the command I typed and you'll
find the tst.i file in attachment.
Good hunt !
$ gcc -v --save-temps -c -O2 tst.c
Reading specs from /usr/lib/gcc-lib/i586-mandrake-linux/2.95.2/specs
gcc version 2.95.2 19991024 (release)
/usr/lib/gcc-lib/i586-mandrake-linux/2.95.2/cpp -lang-c -v -D__GNUC__=2 -D__GNU
C_MINOR__=95 -D__ELF__ -Dunix -D__i386__ -Dlinux -D__ELF__ -D__unix__ -D__i386__
-D__linux__ -D__unix -D__linux -Asystem(posix) -D__OPTIMIZE__ -Acpu(i386) -Amac
hine(i386) -Di386 -D__i386 -D__i386__ -Di586 -Dpentium -D__i586 -D__i586__ -D__p
entium -D__pentium__ tst.c tst.i
GNU CPP version 2.95.2 19991024 (release) (i386 Linux/ELF)
#include "..." search starts here:
#include <...> search starts here:
/usr/local/include
/usr/lib/gcc-lib/i586-mandrake-linux/2.95.2/../../../../i586-mandrake-linux/inc
lude
/usr/lib/gcc-lib/i586-mandrake-linux/2.95.2/include
/usr/include
End of search list.
The following default directories have been omitted from the search path:
/usr/lib/gcc-lib/i586-mandrake-linux/2.95.2/../../../../include/g++-3
End of omitted list.
/usr/lib/gcc-lib/i586-mandrake-linux/2.95.2/cc1 tst.i -quiet -dumpbase tst.c -O
2 -version -o tst.s
GNU C version 2.95.2 19991024 (release) (i586-mandrake-linux) compiled by GNU C
version 2.95.2 19991024 (release).
tst.c: In function `divULLbyULtoULL':
tst.c:26: internal error--unrecognizable insn:
(insn/i 33 32 67 (parallel[
(set (reg:SI 0 %eax)
(asm_operands ("divl %3") ("=a") 0[
(reg:DI 1 %edx)
(reg/v:SI 4 %esi)
]
[
(asm_input:DI ("AA"))
(asm_input:SI ("rm"))
] ("tst.c") 12))
(set (reg/v:SI 1 %edx)
(asm_operands ("divl %3") ("=d") 1[
(reg:DI 1 %edx)
(reg/v:SI 4 %esi)
]
[
(asm_input:DI ("AA"))
(asm_input:SI ("rm"))
] ("tst.c") 12))
] ) -1 (insn_list 28 (nil))
(nil))
--
(o- Hi, I'm a deadly e-mail virus, please copy me into your .signature
/\ file to help me spread. :: Bonjour, je suis un dangereux virus. SVP
Y_/_ copiez-moi dans votre fichier .signature pour m'aider à me propager.
# 1 "tst.c"
unsigned int inline divULLbyULtoUL( unsigned long long n, unsigned int d )
{
unsigned int quotient ;
unsigned int mod ;
asm
(
"divl %3"
: "=a" (quotient), "=d" (mod)
: "AA" (n), "rm" (d)
: "cc"
) ;
return quotient ;
}
unsigned long long divULLbyULtoULL( unsigned long long u64, unsigned int u32 )
{
unsigned int num_h = (unsigned int)(u64>>32) ;
unsigned int num_l = (unsigned int)u64 ;
unsigned int quo_h = num_h / u32 ;
unsigned int quo_l = divULLbyULtoUL( (((unsigned long long)(num_h%u32))<<32) + num_l, u32 ) ;
return (((unsigned long long)quo_h)<<32) + quo_l ;
}