From d4c6283e32b51a72cc1f3ba73afcff72c7330344 Mon Sep 17 00:00:00 2001 From: peter Date: Thu, 28 May 1998 17:26:47 +0000 Subject: [PATCH] * fixed -R switch, it didn't work after my previous akt/init patch * fixed bugs 110,130,136 --- compiler/cgi386.pas | 18 ++++++++++++++---- compiler/opts386.pas | 12 ++++++++---- compiler/pass_1.pas | 22 +++++++++++++++++----- compiler/pstatmnt.pas | 9 ++++++--- 4 files changed, 45 insertions(+), 16 deletions(-) diff --git a/compiler/cgi386.pas b/compiler/cgi386.pas index d03db84a30..c34be259e9 100644 --- a/compiler/cgi386.pas +++ b/compiler/cgi386.pas @@ -21,7 +21,7 @@ **************************************************************************** } {$ifdef TP} - {$E+,F+,N+,D+,L-,Y+} + {$E+,F+,N+,D+,L+,Y-} {$endif} unit cgi386; interface @@ -4789,10 +4789,11 @@ implementation {If lower, jump to next check.} emitl(A_JB,l2); end; + { We only check for the high bound if it is < 255, because + set elements higher than 255 do nt exist, the its always true, + so only a JMP is generated } if setparts[i].stop<>255 then begin - { We only check for the high bound if it is < 255, because - set elements higher than 255 do nt exist.} case p^.left^.location.loc of LOC_REGISTER, LOC_CREGISTER : @@ -4804,6 +4805,11 @@ implementation end; {If higher, element is in set.} emitl(A_JB,l); + end + else + begin + exprasmlist^.concat(new(pai386,op_none(A_STC,S_NO))); + emitl(A_JMP,l); end; end; {Emit the jump over label.} @@ -6207,7 +6213,11 @@ do_jmp: end. { $Log$ - Revision 1.27 1998-05-25 17:11:38 pierre + Revision 1.28 1998-05-28 17:26:47 peter + * fixed -R switch, it didn't work after my previous akt/init patch + * fixed bugs 110,130,136 + + Revision 1.27 1998/05/25 17:11:38 pierre * firstpasscount bug fixed now all is already set correctly the first time under EXTDEBUG try -gp to skip all other firstpasses diff --git a/compiler/opts386.pas b/compiler/opts386.pas index 806fddced5..501730274c 100644 --- a/compiler/opts386.pas +++ b/compiler/opts386.pas @@ -71,13 +71,13 @@ begin end; 'R' : begin if More='ATT' then - aktasmmode:=I386_ATT + initasmmode:=I386_ATT else if More='INTEL' then - aktasmmode:=I386_INTEL + initasmmode:=I386_INTEL else if More='DIRECT' then - aktasmmode:=I386_DIRECT + initasmmode:=I386_DIRECT else IllegalPara(opt); end; @@ -89,7 +89,11 @@ end; end. { $Log$ - Revision 1.5 1998-05-23 01:21:14 peter + Revision 1.6 1998-05-28 17:26:48 peter + * fixed -R switch, it didn't work after my previous akt/init patch + * fixed bugs 110,130,136 + + Revision 1.5 1998/05/23 01:21:14 peter + aktasmmode, aktoptprocessor, aktoutputformat + smartlink per module $SMARTLINK-/+ (like MMX) and moved to aktswitches + $LIBNAME to set the library name where the unit will be put in diff --git a/compiler/pass_1.pas b/compiler/pass_1.pas index 012d78244b..13acc4b961 100644 --- a/compiler/pass_1.pas +++ b/compiler/pass_1.pas @@ -1855,7 +1855,10 @@ unit pass_1; begin firstpass(p^.left); if codegenerror then - exit; + begin + p^.resulttype:=generrordef; + exit; + end; p^.registers32:=max(p^.left^.registers32,1); p^.registersfpu:=p^.left^.registersfpu; @@ -2286,7 +2289,10 @@ unit pass_1; firstpass(p^.left); if codegenerror then - exit; + begin + p^.resulttype:=generrordef; + exit; + end; if not assigned(p^.left^.resulttype) then begin @@ -3893,9 +3899,11 @@ unit pass_1; begin firstpass(p^.left); - if codegenerror then - exit; + begin + p^.resulttype:=generrordef; + exit; + end; p^.resulttype:=p^.vs^.definition; { this must be done in the parser @@ -4904,7 +4912,11 @@ unit pass_1; end. { $Log$ - Revision 1.21 1998-05-25 17:11:41 pierre + Revision 1.22 1998-05-28 17:26:49 peter + * fixed -R switch, it didn't work after my previous akt/init patch + * fixed bugs 110,130,136 + + Revision 1.21 1998/05/25 17:11:41 pierre * firstpasscount bug fixed now all is already set correctly the first time under EXTDEBUG try -gp to skip all other firstpasses diff --git a/compiler/pstatmnt.pas b/compiler/pstatmnt.pas index 8ba3fa3d71..5cd1206cb3 100644 --- a/compiler/pstatmnt.pas +++ b/compiler/pstatmnt.pas @@ -174,11 +174,10 @@ unit pstatmnt; begin consume(_CASE); caseexpr:=comp_expr(true); - { determines result type } + { determines result type } cleartempgen; do_firstpass(caseexpr); casedef:=caseexpr^.resulttype; - if not(is_ordinal(casedef)) then Message(parser_e_ordinal_expected); @@ -1122,7 +1121,11 @@ unit pstatmnt; end. { $Log$ - Revision 1.12 1998-05-21 19:33:33 peter + Revision 1.13 1998-05-28 17:26:50 peter + * fixed -R switch, it didn't work after my previous akt/init patch + * fixed bugs 110,130,136 + + Revision 1.12 1998/05/21 19:33:33 peter + better procedure directive handling and only one table Revision 1.11 1998/05/20 09:42:35 pierre