Mail Archives: djgpp/1999/09/29/23:56:16
From: | Chris Ho-Stuart <hostuart AT sky DOT fit DOT qut DOT edu DOT au>
|
Newsgroups: | comp.os.msdos.djgpp
|
Subject: | asm errors compiling grx
|
Date: | 30 Sep 1999 03:25:08 GMT
|
Organization: | Queensland University of Technology, Australia
|
Lines: | 64
|
Distribution: | world
|
Message-ID: | <7sul6k$l1n$1@dove.qut.edu.au>
|
NNTP-Posting-Host: | sky.fit.qut.edu.au
|
Mime-Version: | 1.0
|
User-Agent: | tin/pre-1.4-19990927 ("Nine While Nine") (UNIX) (SunOS/5.6 (sun4u))
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
Reply-To: | djgpp AT delorie DOT com
|
I am trying to compile the grx library on a pentium166 WindowsNT box
using make from a dos command window.
I unzip the files for grx23, cd to the src directory, and run
make -f makefile.dj2
After lots of compilation it ends up with
gcc -c -O6 -Wall -fomit-frame-pointer -I. -I./include -I../include -I../addons/print -I../addons/bmp user/uellia.c -o user/uellia.o
Load error: no DOS memory.
But that is not the problem... I restart make, and it proceeds through
the uellia just fine the second time.
The real problem is at this point....
gcc -c -O6 -Wall -fomit-frame-pointer -I. -I./include -I../include -I../addons/print -I../addons/bmp utils/shiftscl.c -o utils/shiftscl.o
utils/shiftscl.c: In function `_GR_shift_scanline':
utils/shiftscl.c:48: Invalidm' statement:
utils/shiftscl.c:48: fixed or forbidden register 2 (cx) was spilled for class CREG.
utils/shiftscl.c:102: Invalidm' statement:
utils/shiftscl.c:102: fixed or forbidden register 2 (cx) was spilled for class CREG.
make.exe: *** [utils/shiftscl.o] Error 1
Any help gratefully accepted.
Further info...
Line 48 in utils/shiftscl.c is the asm statement in the following
context...
.
.
.
GR_int8u far *d = *(dst++) + ws;
# if defined(__GNUC__) && defined(__i386__)
int w = ws;
/* sad but true: the x86 bytesex forces this inefficient code :( */
asm volatile ("\n"
" movb (%3),%%ch \n"
" jmp 1f \n"
" .align 4,0x90 \n"
"1: decl %3 \n"
" movb %%ch,%%al \n"
" movb (%3),%%ah \n"
" movb %%ah,%%ch \n"
" shrl %%cl,%%eax \n"
" movb %%al,(%4) \n"
" decl %4 \n"
" decl %5 \n"
" jne 1b \n"
" shrb %%cl,%%ch \n"
" movb %%ch,(%4) "
: "=r" ((void *)s), "=r" ((void *)d), "=r" ((int)w)
: "0" ((void *)s), "1" ((void *)d), "2" ((int)w), "c" ((int)shift)
: "ax", "cx"
);
# elif defined(__TURBOC__)
.
.
.
Thanks -- Chris Ho-Stuart
- Raw text -