Article View: gnu.gcc.help
Article #53142gcc2.0 build on Encore Umax 4.3
From: Allan E Johannesen
Date: Wed, 11 Mar 1992 14:25
Date: Wed, 11 Mar 1992 14:25
219 lines
7727 bytes
7727 bytes
I added -v to the CFLAGS and tried the build. It showed me:
cd /usr6/aej/gcc-2.0/
gmake -j 1
rm -f tmplibgcc2.a
set -e; \
for name in _muldi3 _divdi3 _moddi3 _udivdi3 _umoddi3 _negdi2 _lshrdi3 _lshldi3 _ashldi3 _ashrdi3 _udivmoddi4 _cmpdi2 _ucmpdi2 _floatdidf _floatdisf _fixunsdfsi _fixunssfsi _fixunsdfdi _fixdfdi _fixunssfdi _fixsfdi _varargs _eprintf _builtin_new _builtin_New _builtin_del _bb _shtab _clear_cache _trampoline __main _exit; \
do \
echo ${name}; \
./gcc -fstrength-reduce -O -I. -I. -I./config \
-O2 -g -v -B./ -g1 -c -DL${name} \
./libgcc2.c -o ${name}.o; \
if [ $? -eq 0 ] ; then true; else exit 1; fi; \
ar rc tmplibgcc2.a ${name}.o; \
rm -f ${name}.o; \
done
_muldi3
Reading specs from ./specs
gcc version 2.0
./cpp -lang-c -v -DL_muldi3 -I. -I. -I./config -undef -D__GNUC__=2 -Dns32000 -Dn16 -Dns16000 -Dns32332 -Dunix -D__ns32000__ -D__n16__ -D__ns16000__ -D__ns32332__ -D__unix__ -D__ns32000 -D__n16 -D__ns16000 -D__ns32332 -D__unix -D__OPTIMIZE__ -g -g1 ./libgcc2.c /usr/tmp/cc019540.cpp
GNU CPP version 2.0 (32000, Encore syntax)
./cc1 /usr/tmp/cc019540.cpp -quiet -dumpbase libgcc2.c -g -g1 -O -O2 -version -fstrength-reduce -o /usr/tmp/cc019540.s
GNU C version 2.0 (32000, Encore syntax) compiled by CC.
as -j -o _muldi3.o /usr/tmp/cc019540.s
_divdi3
Reading specs from ./specs
gcc version 2.0
./cpp -lang-c -v -DL_divdi3 -I. -I. -I./config -undef -D__GNUC__=2 -Dns32000 -Dn16 -Dns16000 -Dns32332 -Dunix -D__ns32000__ -D__n16__ -D__ns16000__ -D__ns32332__ -D__unix__ -D__ns32000 -D__n16 -D__ns16000 -D__ns32332 -D__unix -D__OPTIMIZE__ -g -g1 ./libgcc2.c /usr/tmp/cc024956.cpp
GNU CPP version 2.0 (32000, Encore syntax)
./cc1 /usr/tmp/cc024956.cpp -quiet -dumpbase libgcc2.c -g -g1 -O -O2 -version -fstrength-reduce -o /usr/tmp/cc024956.s
GNU C version 2.0 (32000, Encore syntax) compiled by CC.
as -j -o _divdi3.o /usr/tmp/cc024956.s
Assembler: libgcc2.c
aline 70 : illegal branch operand
aline 92 : Warning: Unresolved branch(es)
./gcc: _divdi3.o: No such file or directory
gmake: *** [libgcc2.a] Error 1
Compilation exited abnormally with code 1 at Wed Mar 11 08:38:09
The /usr/tmp files were, of course, removed. I snipped the commands
out and ran them individually. The result of:
./cpp -lang-c -v -DL_divdi3 -I. -I. -I./config -undef -D__GNUC__=2 -Dns32000 -Dn16 -Dns16000 -Dns32332 -Dunix -D__ns32000__ -D__n16__ -D__ns16000__ -D__ns32332__ -D__unix__ -D__ns32000 -D__n16 -D__ns16000 -D__ns32332 -D__unix -D__OPTIMIZE__ -g -g1 ./libgcc2.c /usr/tmp/cc024956.cpp
was /usr/tmp/cc024956.cpp. I edited that file into the file below
{ with the extraneous lines removed for easier reading in the news }:
extern enum reg_class secondary_reload_class();
extern int target_flags;
enum reg_class { NO_REGS, GENERAL_REGS, FLOAT_REGS, FRAME_POINTER_REG, STACK_POINTER_REG,
GEN_AND_MEM_REGS, ALL_REGS, LIM_REG_CLASSES };
extern char *output_move_double ();
extern char *output_shift_insn ();
typedef long int ptrdiff_t;
typedef long unsigned int size_t;
typedef int wchar_t;
struct longlong {long low, high;};
typedef union
{
struct longlong s;
long long ll;
} long_long;
extern long long __fixunssfdi (float a);
extern long long __fixunsdfdi (double a);
static inline
long long
__negdi2 (u)
long long u;
{
long_long w;
long_long uu;
uu.ll = u;
w.s.low = -uu.s.low;
w.s.high = -uu.s.high - ((unsigned long) w.s.low > 0);
return w.ll;
}
unsigned long long __udivmoddi4 ();
long long
__divdi3 (u, v)
long long u, v;
{
int c = 0;
long_long uu, vv;
long long w;
uu.ll = u;
vv.ll = v;
if (uu.s.high < 0)
c = ~c,
uu.ll = __negdi2 (uu.ll);
if (vv.s.high < 0)
c = ~c,
vv.ll = __negdi2 (vv.ll);
w = __udivmoddi4 (uu.ll, vv.ll, (unsigned long long *) 0);
if (c)
w = __negdi2 (w);
return w;
}
This modified result, which I called aej.cpp, was run through:
./cc1 /usr/tmp/aej.cpp -quiet -dumpbase libgcc2.c -g -g1 -O -O2 -version -fstrength-reduce -o /usr/tmp/aej.s
with this result:
.file "aej.cpp"
gcc2_compiled.:
.text
.def _reg_class; .scl 15; .type 012; .size 4; .endef
.def _NO_REGS; .val 0; .scl 16; .type 013; .endef
.def _GENERAL_REGS; .val 1; .scl 16; .type 013; .endef
.def _FLOAT_REGS; .val 2; .scl 16; .type 013; .endef
.def _FRAME_POINTER_REG; .val 3; .scl 16; .type 013; .endef
.def _STACK_POINTER_REG; .val 4; .scl 16; .type 013; .endef
.def _GEN_AND_MEM_REGS; .val 5; .scl 16; .type 013; .endef
.def _ALL_REGS; .val 6; .scl 16; .type 013; .endef
.def _LIM_REG_CLASSES; .val 7; .scl 16; .type 013; .endef
.def .eos; .val 4; .scl 102; .tag _reg_class; .size 4; .endef
.def _ptrdiff_t; .scl 13; .type 04; .endef
.def _size_t; .scl 13; .type 016; .endef
.def _wchar_t; .scl 13; .type 04; .endef
.def _longlong; .scl 10; .type 010; .size 8; .endef
.def _low; .val 0; .scl 8; .type 04; .endef
.def _high; .val 4; .scl 8; .type 04; .endef
.def .eos; .val 8; .scl 102; .tag _longlong; .size 8; .endef
.def _.0fake; .scl 12; .type 011; .size 8; .endef
.def _s; .val 0; .scl 11; .tag _longlong; .size 8; .type 010; .endef
.def _ll; .val 0; .scl 11; .type 00; .endef
.def .eos; .val 8; .scl 102; .tag _.0fake; .size 8; .endef
.def _long_long; .scl 13; .tag _.0fake; .size 8; .type 011; .endef
.align 16
.def ___divdi3; .val ___divdi3; .scl 2; .type 040; .endef
.globl ___divdi3
___divdi3:
enter [r3,r4,r6,r7],24
.def .bf; .val .; .scl 101; .line 0; .endef
.def _u; .val 8; .scl 9; .type 00; .endef
.def _v; .val 16; .scl 9; .type 00; .endef
movqd $0,r4
movd 8(fp),-8(fp)
movd 12(fp),-4(fp)
movd 16(fp),r2
movd 20(fp),r3
cmpqd $0,-4(fp)
ble .L3
movqd $-1,r4
negd -8(fp),r0
movd r0,r6
negd -4(fp),r1
cmpqd $0,r0
sned r0
movd r1,r7
subd r0,r7
movd r6,-8(fp)
movd r7,-4(fp)
.L3:
cmpqd $0,r3
ble .L5
comd r4,r4
negd r2,r0
movd r0,-16(fp)
negd r3,r1
cmpqd $0,r0
sned r0
subd r0,r1
movd r1,-12(fp)
movd -16(fp),r2
movd -12(fp),r3
.L5:
movqd $0,tos
movd r3,tos
movd r2,tos
movd -4(fp),tos
movd -8(fp),tos
bsr $___udivmoddi4
movd r0,r2
movd r1,r3
adjspd $-20
cmpqd $0,r4
beq .L7
negd r2,r0
movd r0,-24(fp)
negd r3,r1
cmpqd $0,r0
sned r0
subd r0,r1
movd r1,-20(fp)
movd -24(fp),r2
movd -20(fp),r3
.L7:
movd r2,r0
movd r3,r1
.def .ef; .val .; .scl 101; .line 1; .endef
exit [r7,r6,r4,r3]
ret 0
.def ___divdi3; .val .; .scl -1; .endef
{ By the way, the ONLY difference between the results of using the
adulterated { blanks-removed } cpp output and the virgin one was a
different .file line in the .s file. }
The final command:
as -j -o _divdi3.o /usr/tmp/aej.s
resulted in the same error messages as the make, illegal branch on
line 70.
I must confess to ignorance of the specific reason why that branch is
bothering as.
Technical Details
Message-ID:
<AEJ.92Mar11092524@manyjars.WPI.EDU>Path:
arc1-ca.pugleaf.net!sparky!uunet!spool.mu.edu!hri.com!noc.near.net!wpi.WPI.EDU!wpi!aejShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 11318c,f7791dab16050b16,start X-Google-Attributes: gid11318c,public X-Google-Thread: 10ac37,f7791dab16050b16,start X-Google-Attributes: gid10ac37,public X-Google-ArrivalTime: 1992-03-11 07:09:11 PST Path: arc1-ca.pugleaf.net!sparky!uunet!spool.mu.edu!hri.com!noc.near.net!wpi.WPI.EDU!wpi!aej From: aej@manyjars.WPI.EDU (Allan E Johannesen) Newsgroups: gnu.gcc.help,comp.sys.encore Subject: gcc2.0 build on Encore Umax 4.3 Message-ID: <AEJ.92Mar11092524@manyjars.WPI.EDU> Date: 11 Mar 92 14:25:24 GMT Article-I.D.: manyjars.AEJ.92Mar11092524 Sender: news@wpi.WPI.EDU (News) Organization: Worcester Polytechnic Institute, Worcester, MA 01609-2280 Lines: 219 Nntp-Posting-Host: manyjars.wpi.edu