From: hp@vmars.tuwien.ac.at (Peter Holzer)
Subject: C386 V4.0 patches
Keywords: seperate i&d, optimizer
Organization: Technical University Vienna, Dept. for Realtime Systems, AUSTRIA
Date: Mon, 7 Sep 1992 12:16:18 GMT

[This article escaped without the patches first. I have cancelled it,
but you may have seen the unfinished version already]

Hi,

Somebody (sorry, can't find that article anymore) noticed that separate
I&D doesn't work with c386, version 4.0. So I looked at the code and
saw that the patches I had posted for version 3.4 were missing. Here
they are again (against version 4.0). They fix the following problems:

Jump tables were put into the code segment instead of the data segment,
but the jmp instruction tried to access them in the data segment. They
are put into the data segment now, iff SEPARATE_I_D is defined.

The optimizer erroneously optimized !! away. 

The alignment was wrong unless SUN_ASM_SYNTAX was defined in
out386_bas.

I recompiled kernel, mm, and fs with this compiler and everything seems
to work properly. 

Have fun,
	Peter

table
 !"#$%&'()*+,-./0123456789:;<=>?
@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_
begin 644 c386.cdif
M*BHJ(&=E;G-T;70N8WX)4V%T($IU;" R-2 Q,SHQ,CHT," Q.3DR"BTM+2!Gz
M96YS=&UT+F,)4V%T(%-E<" @-2 Q-SHT,CHP," Q.3DR"BHJ*BHJ*BHJ*BHJy
M*BHJ*@HJ*BH@-3(R+#4R." J*BHJ"B @(V5N9&EF"B @+RH*(" @*B!N;W<Lx
M('-H:7 @;W5T('1H92!S=VET8V@@=&%B;&4*(2 @*B @=V4@:&%V92!J=7-Tw
M(&=E;F5R871E9"!T:&4@9F]L;&]W:6YG(&-O9&4@*$U#-C@P,# @97AP86UPv
M;&4I"B @("H*(" @*B!S=6(N; DC;6EN7V-A<V5L86)E;"QD, H@(" J(&-Mu
M<"YL"2-M87A?8V%S96QA8F5L+6UI;E]C87-E;&%B96PL9# *+2TM(#4R,BPUt
M,C@@+2TM+0H@("-E;F1I9@H@("\J"B @("H@;F]W+"!S:&EP(&]U="!T:&4@s
M<W=I=&-H('1A8FQE"B$@("H@('=E(&AA=F4@:G5S="!G96YE<F%T960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(" @(" @i
M86QI9VX["B @+RH@86QI9VX@=&AE(&9O;&QO=VEN9R!D871A("HO"B @>PHMh
M("\J"BT@("H@26X@=&AE(&1E9F%U;'0@1T%3('-E='5P+" N86QI9VX@;B!Ag
M;&EG;G,@=&\@82!B;W5N9&%R>2!O9@HM(" J(#(J*FX*+2 @*B\*(" @(" @f
M<W=I=&-H("AA;&EG;BD@>PH@(" @(" @(&-A<V4@,3H*(" @(" @(" @(&)Re
M96%K.PH@(" @(" @(&-A<V4@,CH*+2 C:69D968@4U5.7T%335]364Y405@*d
M(" @(" @(" @(&]P<FEN=&8H(EQT+F%L:6=N(#)<;B(I.PHM("-E;'-E"BT@c
M(" @(" @("!O<')I;G1F*")<="YA;&EG;B Q7&XB*3L*+2 C96YD:68*(" @b
M(" @(" @(&)R96%K.PH@(" @(" @(&-A<V4@-#H*+2 C:69D968@4U5.7T%3a
M35]364Y405@*(" @(" @(" @(&]P<FEN=&8H(EQT+F%L:6=N(#1<;B(I.PHMz
M("-E;'-E"BT@(" @(" @("!O<')I;G1F*")<="YA;&EG;B R7&XB*3L*+2 Cy
M96YD:68*(" @(" @(" @(&)R96%K.PH@(" @(" @(&1E9F%U;'0Z"B @(" @x
M(" @("!F871A;"@B;W5T,S@V7V)A<R]P=71?86QI9VXB+")A;&EG;B ]/2 Ew
<9"(L86QI9VXI.PHM+2T@-3,S+#4T-B M+2TM"FQIv
 u
end
-- 
|    _  | Peter J. Holzer                       | Think of it   |
| |_|_) | Technical University Vienna           | as evolution  |
| | |   | Dept. for Real-Time Systems           | in action!    |
| __/   | hp@vmars.tuwien.ac.at                 |     Tony Rand |
Newsgroups: comp.os.minix