Mail Archives: djgpp/1994/11/01/17:35:08
I've been trying to compile emacs-19.27 for Desqview/X using djgpp (gcc
2.6.0, as 2.3). In one of the modules, msdos.c, there is some in-line
assembly code (appended below) that breaks the assembly step of gcc.
If I compile with the -O3 and -m486 flags, I get the following error:
e:/djgpp/tmp/cca01062: Assembler messages:
e:/djgpp/tmp/cca01062:1938: Fatal error:Symbol output_string1 already defined.
The problem goes away if I compile with the -O2 flag. Since the -O3
flag enables inlining, what seems to be happening is that this block
is inlined wherever output_string is used leading to multiple
definitions of the label output_string1 in the same block of code.
Is this a bug?
David Ronis
Here's the code:
________________________In emacs-19.27/src/msdos.c______________________
static void
output_string (x, y, s, c, a)
int x, y, c;
unsigned char *s;
unsigned char a;
{
char *t = (char *)ScreenPrimary + 2 * (x + ScreenCols () * y);
asm volatile
(" movl %1,%%eax
call dosmemsetup
movl %%eax,%%edi
movb %0,%%ah
movl %2,%%ecx
movl %3,%%esi
output_string1:
movb (%%esi),%%al
movw %%ax,%%gs:(%%edi)
addl $2,%%edi
incl %%esi
decl %%ecx
jne output_string1"
: /* no output */
: "m" (a), "g" (t), "g" (c), "g" (s)
: "%eax", "%ecx", /* "%gs",*/ "%esi", "%edi");
}
- Raw text -