Mail Archives: cygwin/1999/03/29/13:30:58
------=_NextPart_000_0013_01BE79BF.3B45FEF0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
I am not sure if this is the right list to post this to, but here goes. I
was trying out some things with the egcs-1.1.2 compiler I built to generate
code on a PowerPC-860. I was trying the options for generating code to
check memory accesses (-fcheck-memory-usage), and it generated to following
compiler error:
--- start of gcc output ---
gcc -v -fverbose-asm -fcheck-memory-usage -S -Wall -ansi -mcpu=860 -mmultip
le -
B
//c/dvt/bin/ppc-elf/egcs-2.91.66/ -DDVT_600 -DENABLE_DECIMAL_MODE -DMARK_IMA
GE
-O2 -DNDEBUG -fomit-frame-pointer -I //c/dvt/include -I ../600 -I ../ppc -I
../
net -I .. -I ../sensors ../rgb2hsi.c -o lastcc.s
Reading specs from \\c\dvt\bin\ppc-elf\egcs-2.91.66\specs
gcc version egcs-2.91.66 19990314 (egcs-1.1.2 release)
\\c\dvt\bin\ppc-elf\egcs-2.91.66\cpp.exe -lang-c89 -v -I //c/dvt/include -I
../
600 -I ../ppc -I ../net -I .. -I ../sensors -isystem
\\c\dvt\bin\ppc-elf\egcs-2.
91.66\include -undef -D__GNUC__=2 -D__GNUC_MINOR__=91 -trigraphs -D__STRICT_
ANSI
__ -D__PPC__ -D__unix__ -D__svr4__ -D__PPC -D__unix -Asystem(unix) -Asystem(
svr4
) -Acpu(powerpc) -Amachine(powerpc) -D__CHAR_UNSIGNED__ -D__OPTIMIZE__ -Wall
-D_
CALL_SYSV -D_BIG_ENDIAN -D__BIG_ENDIAN__ -Amachine(bigendian) -D_ARCH_PPC -D
DVT_
600 -DENABLE_DECIMAL_MODE -DMARK_IMAGE -DNDEBUG ../rgb2hsi.c
C:\TEMP\ccJySBeV.i
GNU CPP version egcs-2.91.66 19990314 (egcs-1.1.2 release) (PowerPC System
V.4)
#include "..." search starts here:
#include <...> search starts here:
\\c\dvt\include
..\600
..\ppc
..\net
..
..\sensors
\dvt-ppc\ppc-elf\sys-include
End of search list.
\\c\dvt\bin\ppc-elf\egcs-2.91.66\cc1.exe
C:\TEMP\ccJySBeV.i -quiet -dumpbase rg
b2hsi.c -mcpu=860 -mmultiple -ansi -O2 -Wall -ansi -version -fverbose-asm -f
chec
k-memory-usage -fomit-frame-pointer -o lastcc.s
GNU C version egcs-2.91.66 19990314 (egcs-1.1.2 release) (ppc-elf) compiled
by G
NU C version egcs-2.91.57 19980901 (egcs-1.1 release).
../rgb2hsi.c: In function `test_stack':
../rgb2hsi.c:26: internal error--unrecognizable insn:
(call_insn/u 21 19 23 (parallel[
(call (mem:SI (symbol_ref ("chkr_check_addr")))
(const_int 0))
(use (const_int 0))
(clobber (scratch:SI))
] ) -1 (insn_list 15 (insn_list 17 (insn_list 19 (nil))))
(expr_list:REG_DEAD (reg:SI 3 r3)
(expr_list:REG_DEAD (reg:SI 4 r4)
(expr_list:REG_DEAD (reg:SI 5 r5)
(expr_list:REG_UNUSED (scratch:SI)
(nil)))))
(expr_list (use (reg:SI 5 r5))
(expr_list (use (reg:SI 4 r4))
(expr_list (use (reg:SI 3 r3))
(nil)))))
../../egcs-1.1.2/gcc/toplev.c:1367: Internal compiler error in function
fatal_in
sn
make[1]: *** [rgb2hsi.o] Error 1
--- end of compiler output ---
Attached is some sample code that will generate this. I also tried this
with m68k-coff and sh-elf, and it seems to work.
------=_NextPart_000_0013_01BE79BF.3B45FEF0
Content-Type: application/octet-stream;
name="rgb2hsi.c"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="rgb2hsi.c"
#if 0
#include <stdio.h>
#include <time.h>
#endif
#define SIZE 30
#define MIN(a,b) ((a<b) ? a : b)
#define MAX(a,b) ((a<b) ? b : a)
#define MAX_BUF 100
double test_stack(int x, double y)
{
int buf[MAX_BUF];
int i;
for( i = 0; i < MAX_BUF; i++)
{
buf[i] = x;
x += y;
}
return x;
}
void RGBtoHSV( const int length,
const short r[], const short g[], const short b[],
short h[], short s[], short v[] )
{
int i;
short min, max, delta;
for(i=0;i<SIZE;i++) {
max = MAX(r[i],MAX(g[i],b[i]));
min = MIN(r[i],MIN(g[i],b[i]));
delta = max - min;
v[i] = max;
if (max == 0) {
s[i] = 0;
h[i] = -1;
}
else {
s[i] = ((short)(delta << 8)) / max;
if (r[i] == max)
h[i] = ((short)((g[i]-b[i]) * 60)) / delta;
else if (g[i] == max)
h[i] = 120 + ((short)((b[i]-r[i]) * 60)) / delta;
else
h[i] = 240 + ((short)((r[i]-g[i]) * 60)) / delta;
}
}
}
#if 0
void main()
{
int i, j;
short r[SIZE], g[SIZE], b[SIZE], h[SIZE], v[SIZE], s[SIZE];
for(j=0;j<SIZE;j++) {
r[j] = j;
g[j] = SIZE-j;
b[j] = SIZE;
}
printf("\nStart\n");
RGBtoHSV( SIZE, r, g, b, h, s, v );
printf("\nEnd\n");
for(j=0;j<SIZE;j++)
printf("r=%d, g=%d, b=%d, h=%d, v=%d, s=%d\n",
r[j], g[j], b[j], h[j], v[j], s[j]);
}
#endif
------=_NextPart_000_0013_01BE79BF.3B45FEF0
Content-Type: text/plain; charset=us-ascii
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com
------=_NextPart_000_0013_01BE79BF.3B45FEF0--
- Raw text -