mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-16 04:49:19 +02:00
* undid some changes of Peter that made the compiler wrong
for m68k (I had to reinsert some ifdefs) * removed several memory leaks under m68k * removed the meory leaks for assembler readers * cross compiling shoud work again better ( crosscompiling sysamiga works but as68k still complain about some code !)
This commit is contained in:
parent
54cf737ebd
commit
c3b3abdb65
@ -155,6 +155,7 @@ Type
|
|||||||
{ the size of the instruction. }
|
{ the size of the instruction. }
|
||||||
stropsize: topsize;
|
stropsize: topsize;
|
||||||
procedure init;
|
procedure init;
|
||||||
|
procedure done;
|
||||||
{ sets up the prefix field with the instruction pointed to in s }
|
{ sets up the prefix field with the instruction pointed to in s }
|
||||||
procedure addprefix(tok: tasmop);
|
procedure addprefix(tok: tasmop);
|
||||||
{ sets up the instruction with the instruction pointed to in s }
|
{ sets up the instruction with the instruction pointed to in s }
|
||||||
@ -798,6 +799,21 @@ end;
|
|||||||
getprefix := prefix;
|
getprefix := prefix;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Procedure TInstruction.done;
|
||||||
|
var
|
||||||
|
k: integer;
|
||||||
|
Begin
|
||||||
|
for k:=1 to numops do
|
||||||
|
begin
|
||||||
|
if (operands[k].operandtype=OPR_REFERENCE) and
|
||||||
|
assigned(operands[k].ref.symbol) then
|
||||||
|
stringdispose(operands[k].ref.symbol);
|
||||||
|
if (operands[k].operandtype=OPR_SYMBOL) and
|
||||||
|
assigned(operands[k].symbol) then
|
||||||
|
stringdispose(operands[k].symbol);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
{*************************************************************************}
|
{*************************************************************************}
|
||||||
{ Local label utilities }
|
{ Local label utilities }
|
||||||
{*************************************************************************}
|
{*************************************************************************}
|
||||||
@ -1869,7 +1885,16 @@ end;
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.10 1998-10-13 13:10:10 peter
|
Revision 1.11 1998-10-13 16:49:59 pierre
|
||||||
|
* undid some changes of Peter that made the compiler wrong
|
||||||
|
for m68k (I had to reinsert some ifdefs)
|
||||||
|
* removed several memory leaks under m68k
|
||||||
|
* removed the meory leaks for assembler readers
|
||||||
|
* cross compiling shoud work again better
|
||||||
|
( crosscompiling sysamiga works
|
||||||
|
but as68k still complain about some code !)
|
||||||
|
|
||||||
|
Revision 1.10 1998/10/13 13:10:10 peter
|
||||||
* new style for m68k/i386 infos and enums
|
* new style for m68k/i386 infos and enums
|
||||||
|
|
||||||
Revision 1.9 1998/09/24 17:54:15 carl
|
Revision 1.9 1998/09/24 17:54:15 carl
|
||||||
|
@ -119,7 +119,12 @@ Function DoPipe:boolean;
|
|||||||
begin
|
begin
|
||||||
DoPipe:=(cs_asm_pipe in aktglobalswitches) and
|
DoPipe:=(cs_asm_pipe in aktglobalswitches) and
|
||||||
not(cs_asm_leave in aktglobalswitches)
|
not(cs_asm_leave in aktglobalswitches)
|
||||||
and (aktoutputformat in [as_i386_o,as_m68k_o]);
|
{$ifdef i386}
|
||||||
|
and (aktoutputformat=as_i386_o)
|
||||||
|
{$endif i386}
|
||||||
|
{$ifdef m68k}
|
||||||
|
and (aktoutputformat=as_m68k_o);
|
||||||
|
{$endif m68k}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@ -471,7 +476,16 @@ end;
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.26 1998-10-13 13:10:11 peter
|
Revision 1.27 1998-10-13 16:50:01 pierre
|
||||||
|
* undid some changes of Peter that made the compiler wrong
|
||||||
|
for m68k (I had to reinsert some ifdefs)
|
||||||
|
* removed several memory leaks under m68k
|
||||||
|
* removed the meory leaks for assembler readers
|
||||||
|
* cross compiling shoud work again better
|
||||||
|
( crosscompiling sysamiga works
|
||||||
|
but as68k still complain about some code !)
|
||||||
|
|
||||||
|
Revision 1.26 1998/10/13 13:10:11 peter
|
||||||
* new style for m68k/i386 infos and enums
|
* new style for m68k/i386 infos and enums
|
||||||
|
|
||||||
Revision 1.25 1998/10/13 08:19:24 pierre
|
Revision 1.25 1998/10/13 08:19:24 pierre
|
||||||
|
@ -552,6 +552,8 @@ implementation
|
|||||||
emitcall('FPC_ASSERT',true);
|
emitcall('FPC_ASSERT',true);
|
||||||
emitl(A_LABEL,truelabel);
|
emitl(A_LABEL,truelabel);
|
||||||
end;
|
end;
|
||||||
|
freelabel(truelabel);
|
||||||
|
freelabel(falselabel);
|
||||||
truelabel:=otlabel;
|
truelabel:=otlabel;
|
||||||
falselabel:=oflabel;
|
falselabel:=oflabel;
|
||||||
end;
|
end;
|
||||||
@ -939,7 +941,16 @@ implementation
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.12 1998-10-08 17:17:12 pierre
|
Revision 1.13 1998-10-13 16:50:02 pierre
|
||||||
|
* undid some changes of Peter that made the compiler wrong
|
||||||
|
for m68k (I had to reinsert some ifdefs)
|
||||||
|
* removed several memory leaks under m68k
|
||||||
|
* removed the meory leaks for assembler readers
|
||||||
|
* cross compiling shoud work again better
|
||||||
|
( crosscompiling sysamiga works
|
||||||
|
but as68k still complain about some code !)
|
||||||
|
|
||||||
|
Revision 1.12 1998/10/08 17:17:12 pierre
|
||||||
* current_module old scanner tagged as invalid if unit is recompiled
|
* current_module old scanner tagged as invalid if unit is recompiled
|
||||||
+ added ppheap for better info on tracegetmem of heaptrc
|
+ added ppheap for better info on tracegetmem of heaptrc
|
||||||
(adds line column and file index)
|
(adds line column and file index)
|
||||||
|
@ -1242,12 +1242,14 @@ implementation
|
|||||||
gtn : flags := F_G;
|
gtn : flags := F_G;
|
||||||
gten: flags := F_GE;
|
gten: flags := F_GE;
|
||||||
end;
|
end;
|
||||||
|
clear_location(p^.location);
|
||||||
p^.location.loc := LOC_FLAGS;
|
p^.location.loc := LOC_FLAGS;
|
||||||
p^.location.resflags := flags;
|
p^.location.resflags := flags;
|
||||||
cmpop := false;
|
cmpop := false;
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
|
clear_location(p^.location);
|
||||||
p^.location.loc := LOC_FPU;
|
p^.location.loc := LOC_FPU;
|
||||||
if p^.left^.location.loc = LOC_FPU then
|
if p^.left^.location.loc = LOC_FPU then
|
||||||
{ copy fpu register result . }
|
{ copy fpu register result . }
|
||||||
@ -1270,7 +1272,16 @@ implementation
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.9 1998-10-13 08:19:25 pierre
|
Revision 1.10 1998-10-13 16:50:03 pierre
|
||||||
|
* undid some changes of Peter that made the compiler wrong
|
||||||
|
for m68k (I had to reinsert some ifdefs)
|
||||||
|
* removed several memory leaks under m68k
|
||||||
|
* removed the meory leaks for assembler readers
|
||||||
|
* cross compiling shoud work again better
|
||||||
|
( crosscompiling sysamiga works
|
||||||
|
but as68k still complain about some code !)
|
||||||
|
|
||||||
|
Revision 1.9 1998/10/13 08:19:25 pierre
|
||||||
+ source_os is now set correctly for cross-processor compilers
|
+ source_os is now set correctly for cross-processor compilers
|
||||||
(tos contains all target_infos and
|
(tos contains all target_infos and
|
||||||
we use CPU86 and CPU68 conditionnals to
|
we use CPU86 and CPU68 conditionnals to
|
||||||
|
@ -884,7 +884,7 @@ implementation
|
|||||||
new(ref);
|
new(ref);
|
||||||
reset_reference(ref^);
|
reset_reference(ref^);
|
||||||
ref^.base := R_A1;
|
ref^.base := R_A1;
|
||||||
exprasmlist^.concat(new(pai68k,op_ref(A_JSR,S_NO,newreference(ref^))));
|
exprasmlist^.concat(new(pai68k,op_ref(A_JSR,S_NO,ref)));
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
@ -893,7 +893,7 @@ implementation
|
|||||||
new(ref);
|
new(ref);
|
||||||
reset_reference(ref^);
|
reset_reference(ref^);
|
||||||
ref^.base := R_A1;
|
ref^.base := R_A1;
|
||||||
exprasmlist^.concat(new(pai68k,op_ref(A_JSR,S_NO,newreference(ref^))));
|
exprasmlist^.concat(new(pai68k,op_ref(A_JSR,S_NO,ref)));
|
||||||
end;
|
end;
|
||||||
del_reference(p^.right^.location.reference);
|
del_reference(p^.right^.location.reference);
|
||||||
end;
|
end;
|
||||||
@ -1047,7 +1047,16 @@ implementation
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.7 1998-10-13 08:19:27 pierre
|
Revision 1.8 1998-10-13 16:50:04 pierre
|
||||||
|
* undid some changes of Peter that made the compiler wrong
|
||||||
|
for m68k (I had to reinsert some ifdefs)
|
||||||
|
* removed several memory leaks under m68k
|
||||||
|
* removed the meory leaks for assembler readers
|
||||||
|
* cross compiling shoud work again better
|
||||||
|
( crosscompiling sysamiga works
|
||||||
|
but as68k still complain about some code !)
|
||||||
|
|
||||||
|
Revision 1.7 1998/10/13 08:19:27 pierre
|
||||||
+ source_os is now set correctly for cross-processor compilers
|
+ source_os is now set correctly for cross-processor compilers
|
||||||
(tos contains all target_infos and
|
(tos contains all target_infos and
|
||||||
we use CPU86 and CPU68 conditionnals to
|
we use CPU86 and CPU68 conditionnals to
|
||||||
|
@ -255,6 +255,7 @@ implementation
|
|||||||
|
|
||||||
emit_bounds_check(hpp^, hregister);
|
emit_bounds_check(hpp^, hregister);
|
||||||
end;
|
end;
|
||||||
|
clear_location(p^.location);
|
||||||
p^.location.loc:=LOC_REGISTER;
|
p^.location.loc:=LOC_REGISTER;
|
||||||
p^.location.register:=hregister;
|
p^.location.register:=hregister;
|
||||||
exit;
|
exit;
|
||||||
@ -275,6 +276,7 @@ implementation
|
|||||||
hregister:=getregister32;
|
hregister:=getregister32;
|
||||||
exprasmlist^.concat(new(pai68k,op_ref_reg(A_MOVE,S_L,newreference(hp^.location.reference),hregister)));
|
exprasmlist^.concat(new(pai68k,op_ref_reg(A_MOVE,S_L,newreference(hp^.location.reference),hregister)));
|
||||||
end;
|
end;
|
||||||
|
clear_location(p^.location);
|
||||||
p^.location.loc:=LOC_REGISTER;
|
p^.location.loc:=LOC_REGISTER;
|
||||||
p^.location.register:=hregister;
|
p^.location.register:=hregister;
|
||||||
exit;
|
exit;
|
||||||
@ -435,6 +437,7 @@ implementation
|
|||||||
end;
|
end;
|
||||||
end; { end elseif }
|
end; { end elseif }
|
||||||
|
|
||||||
|
clear_location(p^.location);
|
||||||
p^.location.loc:=LOC_REGISTER;
|
p^.location.loc:=LOC_REGISTER;
|
||||||
p^.location.register:=hregister;
|
p^.location.register:=hregister;
|
||||||
maybe_rangechecking(p,p^.left^.resulttype,p^.resulttype);
|
maybe_rangechecking(p,p^.left^.resulttype,p^.resulttype);
|
||||||
@ -598,6 +601,7 @@ implementation
|
|||||||
procedure second_cstring_charpointer(p,hp : ptree;convtyp : tconverttype);
|
procedure second_cstring_charpointer(p,hp : ptree;convtyp : tconverttype);
|
||||||
|
|
||||||
begin
|
begin
|
||||||
|
clear_location(p^.location);
|
||||||
p^.location.loc:=LOC_REGISTER;
|
p^.location.loc:=LOC_REGISTER;
|
||||||
p^.location.register:=getregister32;
|
p^.location.register:=getregister32;
|
||||||
inc(p^.left^.location.reference.offset);
|
inc(p^.left^.location.reference.offset);
|
||||||
@ -616,6 +620,7 @@ implementation
|
|||||||
|
|
||||||
begin
|
begin
|
||||||
del_reference(p^.left^.location.reference);
|
del_reference(p^.left^.location.reference);
|
||||||
|
clear_location(p^.location);
|
||||||
p^.location.loc:=LOC_REGISTER;
|
p^.location.loc:=LOC_REGISTER;
|
||||||
p^.location.register:=getregister32;
|
p^.location.register:=getregister32;
|
||||||
exprasmlist^.concat(new(pai68k,op_ref_reg(A_LEA,S_L,newreference(p^.left^.location.reference),
|
exprasmlist^.concat(new(pai68k,op_ref_reg(A_LEA,S_L,newreference(p^.left^.location.reference),
|
||||||
@ -627,6 +632,7 @@ implementation
|
|||||||
var
|
var
|
||||||
reg: tregister;
|
reg: tregister;
|
||||||
begin
|
begin
|
||||||
|
clear_location(p^.location);
|
||||||
p^.location.loc:=LOC_REFERENCE;
|
p^.location.loc:=LOC_REFERENCE;
|
||||||
clear_reference(p^.location.reference);
|
clear_reference(p^.location.reference);
|
||||||
{ here, after doing some arithmetic on the pointer }
|
{ here, after doing some arithmetic on the pointer }
|
||||||
@ -669,6 +675,7 @@ implementation
|
|||||||
begin
|
begin
|
||||||
{ this is a type conversion which copies the data, so we can't }
|
{ this is a type conversion which copies the data, so we can't }
|
||||||
{ return a reference }
|
{ return a reference }
|
||||||
|
clear_location(p^.location);
|
||||||
p^.location.loc:=LOC_MEM;
|
p^.location.loc:=LOC_MEM;
|
||||||
|
|
||||||
{ first get the memory for the string }
|
{ first get the memory for the string }
|
||||||
@ -707,6 +714,9 @@ implementation
|
|||||||
p^.left:=p;
|
p^.left:=p;
|
||||||
loadstring(p);
|
loadstring(p);
|
||||||
p^.left:=nil; { reset left tree, which is empty }
|
p^.left:=nil; { reset left tree, which is empty }
|
||||||
|
{ p^.right is not disposed for typeconv !! PM }
|
||||||
|
disposetree(p^.right);
|
||||||
|
p^.right:=nil;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure second_int_real(p,hp : ptree;convtyp : tconverttype);
|
procedure second_int_real(p,hp : ptree;convtyp : tconverttype);
|
||||||
@ -790,6 +800,7 @@ implementation
|
|||||||
exprasmlist^.concat(new(pai68k,op_reg_reg(A_FMOVE,S_L,p^.left^.location.fpureg,rreg)));
|
exprasmlist^.concat(new(pai68k,op_reg_reg(A_FMOVE,S_L,p^.left^.location.fpureg,rreg)));
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
clear_location(p^.location);
|
||||||
p^.location.loc:=LOC_REGISTER;
|
p^.location.loc:=LOC_REGISTER;
|
||||||
p^.location.register:=rreg;
|
p^.location.register:=rreg;
|
||||||
end;
|
end;
|
||||||
@ -933,6 +944,7 @@ implementation
|
|||||||
|
|
||||||
if (cs_fp_emulation in aktmoduleswitches) then
|
if (cs_fp_emulation in aktmoduleswitches) then
|
||||||
begin
|
begin
|
||||||
|
clear_location(p^.location);
|
||||||
p^.location.loc:=LOC_FPU;
|
p^.location.loc:=LOC_FPU;
|
||||||
p^.location.fpureg := getregister32;
|
p^.location.fpureg := getregister32;
|
||||||
exprasmlist^.concat(new(pai68k,op_ref_reg(A_MOVE,S_L,newreference(r),
|
exprasmlist^.concat(new(pai68k,op_ref_reg(A_MOVE,S_L,newreference(r),
|
||||||
@ -940,6 +952,7 @@ implementation
|
|||||||
end
|
end
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
|
clear_location(p^.location);
|
||||||
p^.location.loc:=LOC_FPU;
|
p^.location.loc:=LOC_FPU;
|
||||||
p^.location.fpureg := getfloatreg;
|
p^.location.fpureg := getfloatreg;
|
||||||
exprasmlist^.concat(new(pai68k,op_ref_reg(A_FMOVE,S_L,newreference(r),
|
exprasmlist^.concat(new(pai68k,op_ref_reg(A_FMOVE,S_L,newreference(r),
|
||||||
@ -1002,6 +1015,7 @@ implementation
|
|||||||
exprasmlist^.concat(new(pai68k,op_const_reg(A_MOVEQ,S_L,16,R_D1)));
|
exprasmlist^.concat(new(pai68k,op_const_reg(A_MOVEQ,S_L,16,R_D1)));
|
||||||
exprasmlist^.concat(new(pai68k,op_reg_reg(A_LSL,S_L,R_D1,hregister)));
|
exprasmlist^.concat(new(pai68k,op_reg_reg(A_LSL,S_L,R_D1,hregister)));
|
||||||
|
|
||||||
|
clear_location(p^.location);
|
||||||
p^.location.loc:=LOC_REGISTER;
|
p^.location.loc:=LOC_REGISTER;
|
||||||
p^.location.register:=hregister;
|
p^.location.register:=hregister;
|
||||||
end;
|
end;
|
||||||
@ -1011,6 +1025,7 @@ implementation
|
|||||||
|
|
||||||
begin
|
begin
|
||||||
secondpass(hp);
|
secondpass(hp);
|
||||||
|
clear_location(p^.location);
|
||||||
p^.location.loc:=LOC_REGISTER;
|
p^.location.loc:=LOC_REGISTER;
|
||||||
del_reference(hp^.location.reference);
|
del_reference(hp^.location.reference);
|
||||||
p^.location.register:=getregister32;
|
p^.location.register:=getregister32;
|
||||||
@ -1034,6 +1049,7 @@ implementation
|
|||||||
getlabel(truelabel);
|
getlabel(truelabel);
|
||||||
getlabel(falselabel);
|
getlabel(falselabel);
|
||||||
secondpass(hp);
|
secondpass(hp);
|
||||||
|
clear_location(p^.location);
|
||||||
p^.location.loc:=LOC_REGISTER;
|
p^.location.loc:=LOC_REGISTER;
|
||||||
del_reference(hp^.location.reference);
|
del_reference(hp^.location.reference);
|
||||||
hregister:=getregister32;
|
hregister:=getregister32;
|
||||||
@ -1133,6 +1149,7 @@ implementation
|
|||||||
var
|
var
|
||||||
hregister : tregister;
|
hregister : tregister;
|
||||||
begin
|
begin
|
||||||
|
clear_location(p^.location);
|
||||||
p^.location.loc:=LOC_REGISTER;
|
p^.location.loc:=LOC_REGISTER;
|
||||||
del_reference(hp^.location.reference);
|
del_reference(hp^.location.reference);
|
||||||
case hp^.location.loc of
|
case hp^.location.loc of
|
||||||
@ -1182,6 +1199,7 @@ implementation
|
|||||||
emitcall('FPC_SET_LOAD_SMALL',true);
|
emitcall('FPC_SET_LOAD_SMALL',true);
|
||||||
maybe_loada5;
|
maybe_loada5;
|
||||||
popusedregisters(pushedregs);
|
popusedregisters(pushedregs);
|
||||||
|
clear_location(p^.location);
|
||||||
p^.location.loc:=LOC_MEM;
|
p^.location.loc:=LOC_MEM;
|
||||||
stringdispose(p^.location.reference.symbol);
|
stringdispose(p^.location.reference.symbol);
|
||||||
p^.location.reference:=href;
|
p^.location.reference:=href;
|
||||||
@ -1197,6 +1215,7 @@ implementation
|
|||||||
InternalError(342132);
|
InternalError(342132);
|
||||||
{!!!!!!!!!!!
|
{!!!!!!!!!!!
|
||||||
|
|
||||||
|
clear_location(p^.location);
|
||||||
p^.location.loc:=LOC_REGISTER;
|
p^.location.loc:=LOC_REGISTER;
|
||||||
getlabel(l1);
|
getlabel(l1);
|
||||||
getlabel(l2);
|
getlabel(l2);
|
||||||
@ -1305,6 +1324,7 @@ implementation
|
|||||||
{ save all used registers }
|
{ save all used registers }
|
||||||
pushusedregisters(pushed,$ffff);
|
pushusedregisters(pushed,$ffff);
|
||||||
secondpass(p^.left);
|
secondpass(p^.left);
|
||||||
|
clear_location(p^.location);
|
||||||
p^.location.loc:=LOC_FLAGS;
|
p^.location.loc:=LOC_FLAGS;
|
||||||
p^.location.resflags:=F_NE;
|
p^.location.resflags:=F_NE;
|
||||||
|
|
||||||
@ -1374,7 +1394,16 @@ implementation
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.6 1998-10-06 20:48:56 peter
|
Revision 1.7 1998-10-13 16:50:06 pierre
|
||||||
|
* undid some changes of Peter that made the compiler wrong
|
||||||
|
for m68k (I had to reinsert some ifdefs)
|
||||||
|
* removed several memory leaks under m68k
|
||||||
|
* removed the meory leaks for assembler readers
|
||||||
|
* cross compiling shoud work again better
|
||||||
|
( crosscompiling sysamiga works
|
||||||
|
but as68k still complain about some code !)
|
||||||
|
|
||||||
|
Revision 1.6 1998/10/06 20:48:56 peter
|
||||||
* m68k compiler compiles again
|
* m68k compiler compiles again
|
||||||
|
|
||||||
Revision 1.5 1998/09/17 09:42:23 peter
|
Revision 1.5 1998/09/17 09:42:23 peter
|
||||||
|
@ -112,6 +112,8 @@ implementation
|
|||||||
truelabel:=otlabel;
|
truelabel:=otlabel;
|
||||||
falselabel:=oflabel;
|
falselabel:=oflabel;
|
||||||
end;
|
end;
|
||||||
|
freelabel(l1);
|
||||||
|
freelabel(l2);
|
||||||
aktcontinuelabel:=oldclabel;
|
aktcontinuelabel:=oldclabel;
|
||||||
aktbreaklabel:=oldblabel;
|
aktbreaklabel:=oldblabel;
|
||||||
end;
|
end;
|
||||||
@ -157,6 +159,8 @@ implementation
|
|||||||
emitl(A_LABEL,falselabel);
|
emitl(A_LABEL,falselabel);
|
||||||
if not(assigned(p^.right)) then
|
if not(assigned(p^.right)) then
|
||||||
emitl(A_LABEL,truelabel);
|
emitl(A_LABEL,truelabel);
|
||||||
|
freelabel(truelabel);
|
||||||
|
freelabel(falselabel);
|
||||||
truelabel:=otlabel;
|
truelabel:=otlabel;
|
||||||
falselabel:=oflabel;
|
falselabel:=oflabel;
|
||||||
end;
|
end;
|
||||||
@ -357,6 +361,9 @@ implementation
|
|||||||
if temptovalue then
|
if temptovalue then
|
||||||
ungetiftemp(temp1);
|
ungetiftemp(temp1);
|
||||||
|
|
||||||
|
freelabel(aktcontinuelabel);
|
||||||
|
freelabel(aktbreaklabel);
|
||||||
|
freelabel(l3);
|
||||||
aktcontinuelabel:=oldclabel;
|
aktcontinuelabel:=oldclabel;
|
||||||
aktbreaklabel:=oldblabel;
|
aktbreaklabel:=oldblabel;
|
||||||
end;
|
end;
|
||||||
@ -479,6 +486,8 @@ implementation
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
do_jmp:
|
do_jmp:
|
||||||
|
freelabel(truelabel);
|
||||||
|
freelabel(falselabel);
|
||||||
truelabel:=otlabel;
|
truelabel:=otlabel;
|
||||||
falselabel:=oflabel;
|
falselabel:=oflabel;
|
||||||
emitl(A_JMP,aktexit2label);
|
emitl(A_JMP,aktexit2label);
|
||||||
@ -769,7 +778,16 @@ do_jmp:
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.5 1998-09-17 09:42:24 peter
|
Revision 1.6 1998-10-13 16:50:07 pierre
|
||||||
|
* undid some changes of Peter that made the compiler wrong
|
||||||
|
for m68k (I had to reinsert some ifdefs)
|
||||||
|
* removed several memory leaks under m68k
|
||||||
|
* removed the meory leaks for assembler readers
|
||||||
|
* cross compiling shoud work again better
|
||||||
|
( crosscompiling sysamiga works
|
||||||
|
but as68k still complain about some code !)
|
||||||
|
|
||||||
|
Revision 1.5 1998/09/17 09:42:24 peter
|
||||||
+ pass_2 for cg386
|
+ pass_2 for cg386
|
||||||
* Message() -> CGMessage() for pass_1/pass_2
|
* Message() -> CGMessage() for pass_1/pass_2
|
||||||
|
|
||||||
|
@ -444,6 +444,9 @@ implementation
|
|||||||
exit;
|
exit;
|
||||||
|
|
||||||
dummycoll.paratyp:=vs_const;
|
dummycoll.paratyp:=vs_const;
|
||||||
|
disposetree(hp);
|
||||||
|
p^.left:=nil;
|
||||||
|
|
||||||
{ second arg }
|
{ second arg }
|
||||||
hp:=node;
|
hp:=node;
|
||||||
node:=node^.right;
|
node:=node^.right;
|
||||||
@ -456,6 +459,7 @@ implementation
|
|||||||
secondcallparan(hp,@dummycoll,false);
|
secondcallparan(hp,@dummycoll,false);
|
||||||
if codegenerror then
|
if codegenerror then
|
||||||
exit;
|
exit;
|
||||||
|
disposetree(hp);
|
||||||
hp:=node;
|
hp:=node;
|
||||||
node:=node^.right;
|
node:=node^.right;
|
||||||
hp^.right:=nil;
|
hp^.right:=nil;
|
||||||
@ -472,6 +476,7 @@ implementation
|
|||||||
secondcallparan(hp,@dummycoll,false);
|
secondcallparan(hp,@dummycoll,false);
|
||||||
if codegenerror then
|
if codegenerror then
|
||||||
exit;
|
exit;
|
||||||
|
disposetree(hp);
|
||||||
hp:=node;
|
hp:=node;
|
||||||
node:=node^.right;
|
node:=node^.right;
|
||||||
hp^.right:=nil;
|
hp^.right:=nil;
|
||||||
@ -487,6 +492,8 @@ implementation
|
|||||||
if codegenerror then
|
if codegenerror then
|
||||||
exit;
|
exit;
|
||||||
|
|
||||||
|
disposetree(hp);
|
||||||
|
|
||||||
if is_real then
|
if is_real then
|
||||||
emitcall('FPC_STR_'+float_name[pfloatdef(hp^.resulttype)^.typ],true)
|
emitcall('FPC_STR_'+float_name[pfloatdef(hp^.resulttype)^.typ],true)
|
||||||
else if porddef(hp^.resulttype)^.typ=u32bit then
|
else if porddef(hp^.resulttype)^.typ=u32bit then
|
||||||
@ -882,7 +889,16 @@ implementation
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.6 1998-10-06 20:48:58 peter
|
Revision 1.7 1998-10-13 16:50:08 pierre
|
||||||
|
* undid some changes of Peter that made the compiler wrong
|
||||||
|
for m68k (I had to reinsert some ifdefs)
|
||||||
|
* removed several memory leaks under m68k
|
||||||
|
* removed the meory leaks for assembler readers
|
||||||
|
* cross compiling shoud work again better
|
||||||
|
( crosscompiling sysamiga works
|
||||||
|
but as68k still complain about some code !)
|
||||||
|
|
||||||
|
Revision 1.6 1998/10/06 20:48:58 peter
|
||||||
* m68k compiler compiles again
|
* m68k compiler compiles again
|
||||||
|
|
||||||
Revision 1.5 1998/09/20 12:26:39 peter
|
Revision 1.5 1998/09/20 12:26:39 peter
|
||||||
|
@ -76,6 +76,7 @@ implementation
|
|||||||
exprasmlist^.concat(new(pai68k,op_ref_reg(A_MOVE,S_L,newreference(p^.left^.location.reference),
|
exprasmlist^.concat(new(pai68k,op_ref_reg(A_MOVE,S_L,newreference(p^.left^.location.reference),
|
||||||
hreg1)));
|
hreg1)));
|
||||||
end;
|
end;
|
||||||
|
clear_location(p^.left^.location);
|
||||||
p^.left^.location.loc:=LOC_REGISTER;
|
p^.left^.location.loc:=LOC_REGISTER;
|
||||||
p^.left^.location.register:=hreg1;
|
p^.left^.location.register:=hreg1;
|
||||||
end
|
end
|
||||||
@ -183,6 +184,7 @@ implementation
|
|||||||
{ this registers are always used when div/mod are present }
|
{ this registers are always used when div/mod are present }
|
||||||
usedinproc:=usedinproc or ($800 shr word(R_D1));
|
usedinproc:=usedinproc or ($800 shr word(R_D1));
|
||||||
usedinproc:=usedinproc or ($800 shr word(R_D0));
|
usedinproc:=usedinproc or ($800 shr word(R_D0));
|
||||||
|
clear_location(p^.location);
|
||||||
p^.location.loc:=LOC_REGISTER;
|
p^.location.loc:=LOC_REGISTER;
|
||||||
p^.location.register:=hreg1;
|
p^.location.register:=hreg1;
|
||||||
end;
|
end;
|
||||||
@ -446,7 +448,16 @@ implementation
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.2 1998-09-14 10:44:01 peter
|
Revision 1.3 1998-10-13 16:50:10 pierre
|
||||||
|
* undid some changes of Peter that made the compiler wrong
|
||||||
|
for m68k (I had to reinsert some ifdefs)
|
||||||
|
* removed several memory leaks under m68k
|
||||||
|
* removed the meory leaks for assembler readers
|
||||||
|
* cross compiling shoud work again better
|
||||||
|
( crosscompiling sysamiga works
|
||||||
|
but as68k still complain about some code !)
|
||||||
|
|
||||||
|
Revision 1.2 1998/09/14 10:44:01 peter
|
||||||
* all internal RTL functions start with FPC_
|
* all internal RTL functions start with FPC_
|
||||||
|
|
||||||
Revision 1.1 1998/09/01 09:07:09 peter
|
Revision 1.1 1998/09/01 09:07:09 peter
|
||||||
|
@ -86,7 +86,7 @@ implementation
|
|||||||
hr : tregister;
|
hr : tregister;
|
||||||
setparts:array[1..8] of Tsetpart;
|
setparts:array[1..8] of Tsetpart;
|
||||||
i,numparts:byte;
|
i,numparts:byte;
|
||||||
href,href2:Treference;
|
{href,href2:Treference;}
|
||||||
l,l2 : plabel;
|
l,l2 : plabel;
|
||||||
hl,hl1 : plabel;
|
hl,hl1 : plabel;
|
||||||
hl2, hl3: plabel;
|
hl2, hl3: plabel;
|
||||||
@ -320,19 +320,19 @@ implementation
|
|||||||
p^.location.resflags:=F_C
|
p^.location.resflags:=F_C
|
||||||
else
|
else
|
||||||
p^.location.resflags:=F_E;
|
p^.location.resflags:=F_E;
|
||||||
href.symbol := nil;
|
{href.symbol := nil;
|
||||||
clear_reference(href);
|
clear_reference(href);}
|
||||||
getlabel(l);
|
getlabel(l);
|
||||||
href.symbol:=stringdup(lab2str(l));
|
{href.symbol:=stringdup(lab2str(l));}
|
||||||
for i:=1 to numparts do
|
for i:=1 to numparts do
|
||||||
if setparts[i].range then
|
if setparts[i].range then
|
||||||
begin
|
begin
|
||||||
{Check if left is in a range.}
|
{Check if left is in a range.}
|
||||||
{Get a label to jump over the check.}
|
{Get a label to jump over the check.}
|
||||||
href2.symbol := nil;
|
{href2.symbol := nil;
|
||||||
clear_reference(href2);
|
clear_reference(href2);}
|
||||||
getlabel(l2);
|
getlabel(l2);
|
||||||
href.symbol:=stringdup(lab2str(l2));
|
{href.symbol:=stringdup(lab2str(l2));}
|
||||||
if setparts[i].start=setparts[i].stop-1 then
|
if setparts[i].start=setparts[i].stop-1 then
|
||||||
begin
|
begin
|
||||||
case p^.left^.location.loc of
|
case p^.left^.location.loc of
|
||||||
@ -812,7 +812,16 @@ implementation
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.5 1998-09-17 09:42:29 peter
|
Revision 1.6 1998-10-13 16:50:11 pierre
|
||||||
|
* undid some changes of Peter that made the compiler wrong
|
||||||
|
for m68k (I had to reinsert some ifdefs)
|
||||||
|
* removed several memory leaks under m68k
|
||||||
|
* removed the meory leaks for assembler readers
|
||||||
|
* cross compiling shoud work again better
|
||||||
|
( crosscompiling sysamiga works
|
||||||
|
but as68k still complain about some code !)
|
||||||
|
|
||||||
|
Revision 1.5 1998/09/17 09:42:29 peter
|
||||||
+ pass_2 for cg386
|
+ pass_2 for cg386
|
||||||
* Message() -> CGMessage() for pass_1/pass_2
|
* Message() -> CGMessage() for pass_1/pass_2
|
||||||
|
|
||||||
|
@ -528,7 +528,6 @@ var hs:string;
|
|||||||
hp:Pused_unit;
|
hp:Pused_unit;
|
||||||
unitinits:taasmoutput;
|
unitinits:taasmoutput;
|
||||||
{$ifdef GDB}
|
{$ifdef GDB}
|
||||||
oldaktprocname : string;
|
|
||||||
stab_function_name:Pai_stab_function_name;
|
stab_function_name:Pai_stab_function_name;
|
||||||
{$endif GDB}
|
{$endif GDB}
|
||||||
begin
|
begin
|
||||||
@ -680,7 +679,6 @@ begin
|
|||||||
{$IfDef GDB}
|
{$IfDef GDB}
|
||||||
if (cs_debuginfo in aktmoduleswitches) and target_os.use_function_relative_addresses then
|
if (cs_debuginfo in aktmoduleswitches) and target_os.use_function_relative_addresses then
|
||||||
stab_function_name := new(pai_stab_function_name,init(strpnew(hs)));
|
stab_function_name := new(pai_stab_function_name,init(strpnew(hs)));
|
||||||
oldaktprocname:=aktprocsym^.name;
|
|
||||||
{$EndIf GDB}
|
{$EndIf GDB}
|
||||||
|
|
||||||
|
|
||||||
@ -691,19 +689,20 @@ begin
|
|||||||
else
|
else
|
||||||
procinfo.aktentrycode^.insert(new(pai_symbol,init(hs)));
|
procinfo.aktentrycode^.insert(new(pai_symbol,init(hs)));
|
||||||
{$ifdef GDB}
|
{$ifdef GDB}
|
||||||
if (cs_debuginfo in aktmoduleswitches) and
|
if (cs_debuginfo in aktmoduleswitches) then
|
||||||
target_os.use_function_relative_addresses then
|
|
||||||
begin
|
begin
|
||||||
procinfo.aktentrycode^.insert(new(pai_stab_function_name,init(strpnew(hs))));
|
if target_os.use_function_relative_addresses then
|
||||||
|
list^.insert(new(pai_stab_function_name,init(strpnew(hs))));
|
||||||
|
|
||||||
{ This is not a nice solution to save the name, change it and restore when done }
|
{ This is not a nice solution to save the name, change it and restore when done }
|
||||||
aktprocsym^.setname(hs);
|
{ not only not nice but also completely wrong !!! (PM) }
|
||||||
procinfo.aktentrycode^.insert(new(pai_stabs,init(aktprocsym^.stabstring)));
|
{ aktprocsym^.setname(hs);
|
||||||
|
list^.insert(new(pai_stabs,init(aktprocsym^.stabstring))); }
|
||||||
end;
|
end;
|
||||||
{$endif GDB}
|
{$endif GDB}
|
||||||
hs:=proc_names.get;
|
hs:=proc_names.get;
|
||||||
end;
|
end;
|
||||||
{$ifdef GDB}
|
{$ifdef GDB}
|
||||||
aktprocsym^.setname(oldaktprocname);
|
|
||||||
|
|
||||||
if (cs_debuginfo in aktmoduleswitches) then
|
if (cs_debuginfo in aktmoduleswitches) then
|
||||||
begin
|
begin
|
||||||
@ -1345,7 +1344,16 @@ end;
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.21 1998-10-13 13:10:12 peter
|
Revision 1.22 1998-10-13 16:50:12 pierre
|
||||||
|
* undid some changes of Peter that made the compiler wrong
|
||||||
|
for m68k (I had to reinsert some ifdefs)
|
||||||
|
* removed several memory leaks under m68k
|
||||||
|
* removed the meory leaks for assembler readers
|
||||||
|
* cross compiling shoud work again better
|
||||||
|
( crosscompiling sysamiga works
|
||||||
|
but as68k still complain about some code !)
|
||||||
|
|
||||||
|
Revision 1.21 1998/10/13 13:10:12 peter
|
||||||
* new style for m68k/i386 infos and enums
|
* new style for m68k/i386 infos and enums
|
||||||
|
|
||||||
Revision 1.20 1998/10/13 08:19:29 pierre
|
Revision 1.20 1998/10/13 08:19:29 pierre
|
||||||
|
@ -357,6 +357,8 @@ type
|
|||||||
{ use this only for already used references }
|
{ use this only for already used references }
|
||||||
procedure clear_reference(var ref : treference);
|
procedure clear_reference(var ref : treference);
|
||||||
|
|
||||||
|
procedure disposereference(var r : preference);
|
||||||
|
|
||||||
function newreference(const r : treference) : preference;
|
function newreference(const r : treference) : preference;
|
||||||
|
|
||||||
function reg2str(r : tregister) : string;
|
function reg2str(r : tregister) : string;
|
||||||
@ -876,6 +878,15 @@ type
|
|||||||
reg2str:=a[r];
|
reg2str:=a[r];
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure disposereference(var r : preference);
|
||||||
|
|
||||||
|
begin
|
||||||
|
if assigned(r^.symbol) then
|
||||||
|
stringdispose(r^.symbol);
|
||||||
|
dispose(r);
|
||||||
|
r:=nil;
|
||||||
|
end;
|
||||||
|
|
||||||
function newreference(const r : treference) : preference;
|
function newreference(const r : treference) : preference;
|
||||||
|
|
||||||
var
|
var
|
||||||
@ -999,6 +1010,7 @@ type
|
|||||||
begin
|
begin
|
||||||
op1t:=top_const;
|
op1t:=top_const;
|
||||||
op1:=pointer(_op1^.offset);
|
op1:=pointer(_op1^.offset);
|
||||||
|
disposereference(_op1);
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
@ -1071,6 +1083,7 @@ type
|
|||||||
begin
|
begin
|
||||||
op2t:=top_const;
|
op2t:=top_const;
|
||||||
op2:=pointer(_op2^.offset);
|
op2:=pointer(_op2^.offset);
|
||||||
|
disposereference(_op2);
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
@ -1234,6 +1247,7 @@ type
|
|||||||
begin
|
begin
|
||||||
op2t:=top_const;
|
op2t:=top_const;
|
||||||
op2:=pointer(_op2^.offset);
|
op2:=pointer(_op2^.offset);
|
||||||
|
disposereference(_op2);
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
@ -1290,6 +1304,7 @@ type
|
|||||||
begin
|
begin
|
||||||
op1t:=top_const;
|
op1t:=top_const;
|
||||||
op1:=pointer(_op1^.offset);
|
op1:=pointer(_op1^.offset);
|
||||||
|
disposereference(_op1);
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
@ -1313,6 +1328,7 @@ type
|
|||||||
begin
|
begin
|
||||||
op1t:=top_const;
|
op1t:=top_const;
|
||||||
op1:=pointer(_op1^.offset);
|
op1:=pointer(_op1^.offset);
|
||||||
|
disposereference(_op1);
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
@ -1324,6 +1340,7 @@ type
|
|||||||
begin
|
begin
|
||||||
op2t:=top_const;
|
op2t:=top_const;
|
||||||
op2:=pointer(_op2^.offset);
|
op2:=pointer(_op2^.offset);
|
||||||
|
disposereference(_op2);
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
@ -1384,6 +1401,7 @@ type
|
|||||||
begin
|
begin
|
||||||
op2t:=top_const;
|
op2t:=top_const;
|
||||||
op2:=pointer(_op2^.offset);
|
op2:=pointer(_op2^.offset);
|
||||||
|
disposereference(_op2);
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
@ -1467,6 +1485,7 @@ type
|
|||||||
begin
|
begin
|
||||||
op1t:=top_const;
|
op1t:=top_const;
|
||||||
op1:=pointer(_op1^.offset);
|
op1:=pointer(_op1^.offset);
|
||||||
|
disposereference(_op1);
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
@ -1494,6 +1513,7 @@ type
|
|||||||
begin
|
begin
|
||||||
op2t:=top_const;
|
op2t:=top_const;
|
||||||
op2:=pointer(_op2^.offset);
|
op2:=pointer(_op2^.offset);
|
||||||
|
disposereference(_op2);
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
@ -1573,7 +1593,16 @@ type
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.7 1998-08-31 12:26:27 peter
|
Revision 1.8 1998-10-13 16:50:15 pierre
|
||||||
|
* undid some changes of Peter that made the compiler wrong
|
||||||
|
for m68k (I had to reinsert some ifdefs)
|
||||||
|
* removed several memory leaks under m68k
|
||||||
|
* removed the meory leaks for assembler readers
|
||||||
|
* cross compiling shoud work again better
|
||||||
|
( crosscompiling sysamiga works
|
||||||
|
but as68k still complain about some code !)
|
||||||
|
|
||||||
|
Revision 1.7 1998/08/31 12:26:27 peter
|
||||||
* m68k and palmos updates from surebugfixes
|
* m68k and palmos updates from surebugfixes
|
||||||
|
|
||||||
Revision 1.6 1998/08/21 14:08:44 pierre
|
Revision 1.6 1998/08/21 14:08:44 pierre
|
||||||
|
@ -3781,6 +3781,7 @@ const
|
|||||||
ConcatLabeledInstr(instr)
|
ConcatLabeledInstr(instr)
|
||||||
else
|
else
|
||||||
ConcatOpCode(instr);
|
ConcatOpCode(instr);
|
||||||
|
instr.done;
|
||||||
end;
|
end;
|
||||||
AS_SEPARATOR:Begin
|
AS_SEPARATOR:Begin
|
||||||
Consume(AS_SEPARATOR);
|
Consume(AS_SEPARATOR);
|
||||||
@ -3843,7 +3844,16 @@ end.
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.14 1998-10-07 04:28:52 carl
|
Revision 1.15 1998-10-13 16:50:16 pierre
|
||||||
|
* undid some changes of Peter that made the compiler wrong
|
||||||
|
for m68k (I had to reinsert some ifdefs)
|
||||||
|
* removed several memory leaks under m68k
|
||||||
|
* removed the meory leaks for assembler readers
|
||||||
|
* cross compiling shoud work again better
|
||||||
|
( crosscompiling sysamiga works
|
||||||
|
but as68k still complain about some code !)
|
||||||
|
|
||||||
|
Revision 1.14 1998/10/07 04:28:52 carl
|
||||||
* bugfix of in/out with gas (ins/outs still left though)
|
* bugfix of in/out with gas (ins/outs still left though)
|
||||||
* bugfix of wrong error output with concatlabel
|
* bugfix of wrong error output with concatlabel
|
||||||
* gettoken always returns something valid now
|
* gettoken always returns something valid now
|
||||||
|
@ -3338,6 +3338,7 @@ var
|
|||||||
ConcatLabeledInstr(instr)
|
ConcatLabeledInstr(instr)
|
||||||
else
|
else
|
||||||
ConcatOpCode(instr);
|
ConcatOpCode(instr);
|
||||||
|
instr.done;
|
||||||
end;
|
end;
|
||||||
AS_SEPARATOR:Begin
|
AS_SEPARATOR:Begin
|
||||||
Consume(AS_SEPARATOR);
|
Consume(AS_SEPARATOR);
|
||||||
@ -3394,7 +3395,16 @@ begin
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.8 1998-10-07 04:29:44 carl
|
Revision 1.9 1998-10-13 16:50:17 pierre
|
||||||
|
* undid some changes of Peter that made the compiler wrong
|
||||||
|
for m68k (I had to reinsert some ifdefs)
|
||||||
|
* removed several memory leaks under m68k
|
||||||
|
* removed the meory leaks for assembler readers
|
||||||
|
* cross compiling shoud work again better
|
||||||
|
( crosscompiling sysamiga works
|
||||||
|
but as68k still complain about some code !)
|
||||||
|
|
||||||
|
Revision 1.8 1998/10/07 04:29:44 carl
|
||||||
* Concatlabel now gives output on error
|
* Concatlabel now gives output on error
|
||||||
* in/out bugfix (still ins/outs left to fix)
|
* in/out bugfix (still ins/outs left to fix)
|
||||||
|
|
||||||
|
@ -2128,6 +2128,7 @@ var
|
|||||||
ConcatLabeledInstr(instr)
|
ConcatLabeledInstr(instr)
|
||||||
else
|
else
|
||||||
ConcatOpCode(instr);
|
ConcatOpCode(instr);
|
||||||
|
instr.done;
|
||||||
end;
|
end;
|
||||||
AS_SEPARATOR:Begin
|
AS_SEPARATOR:Begin
|
||||||
Consume(AS_SEPARATOR);
|
Consume(AS_SEPARATOR);
|
||||||
@ -2177,7 +2178,16 @@ Begin
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.5 1998-08-10 14:50:23 peter
|
Revision 1.6 1998-10-13 16:50:19 pierre
|
||||||
|
* undid some changes of Peter that made the compiler wrong
|
||||||
|
for m68k (I had to reinsert some ifdefs)
|
||||||
|
* removed several memory leaks under m68k
|
||||||
|
* removed the meory leaks for assembler readers
|
||||||
|
* cross compiling shoud work again better
|
||||||
|
( crosscompiling sysamiga works
|
||||||
|
but as68k still complain about some code !)
|
||||||
|
|
||||||
|
Revision 1.5 1998/08/10 14:50:23 peter
|
||||||
+ localswitches, moduleswitches, globalswitches splitting
|
+ localswitches, moduleswitches, globalswitches splitting
|
||||||
|
|
||||||
Revision 1.4 1998/07/14 14:47:02 peter
|
Revision 1.4 1998/07/14 14:47:02 peter
|
||||||
|
@ -723,11 +723,13 @@ const
|
|||||||
|
|
||||||
procedure dir_oldasmmode(t:tdirectivetoken);
|
procedure dir_oldasmmode(t:tdirectivetoken);
|
||||||
begin
|
begin
|
||||||
|
{$ifdef i386}
|
||||||
case t of
|
case t of
|
||||||
_DIR_I386_ATT : aktasmmode:=asmmode_i386_att;
|
_DIR_I386_ATT : aktasmmode:=asmmode_i386_att;
|
||||||
_DIR_I386_DIRECT : aktasmmode:=asmmode_i386_direct;
|
_DIR_I386_DIRECT : aktasmmode:=asmmode_i386_direct;
|
||||||
_DIR_I386_INTEL : aktasmmode:=asmmode_i386_intel;
|
_DIR_I386_INTEL : aktasmmode:=asmmode_i386_intel;
|
||||||
end;
|
end;
|
||||||
|
{$endif i386}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@ -942,7 +944,16 @@ const
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.38 1998-10-13 13:10:28 peter
|
Revision 1.39 1998-10-13 16:50:21 pierre
|
||||||
|
* undid some changes of Peter that made the compiler wrong
|
||||||
|
for m68k (I had to reinsert some ifdefs)
|
||||||
|
* removed several memory leaks under m68k
|
||||||
|
* removed the meory leaks for assembler readers
|
||||||
|
* cross compiling shoud work again better
|
||||||
|
( crosscompiling sysamiga works
|
||||||
|
but as68k still complain about some code !)
|
||||||
|
|
||||||
|
Revision 1.38 1998/10/13 13:10:28 peter
|
||||||
* new style for m68k/i386 infos and enums
|
* new style for m68k/i386 infos and enums
|
||||||
|
|
||||||
Revision 1.37 1998/10/08 23:29:04 peter
|
Revision 1.37 1998/10/08 23:29:04 peter
|
||||||
|
@ -92,8 +92,17 @@ begin
|
|||||||
else
|
else
|
||||||
aktlocalswitches:=aktlocalswitches-[tlocalswitch(setsw)];
|
aktlocalswitches:=aktlocalswitches-[tlocalswitch(setsw)];
|
||||||
{ Message for linux which has global checking only }
|
{ Message for linux which has global checking only }
|
||||||
if (switch='S') and
|
if (switch='S') and (
|
||||||
(target_info.target in [target_i386_linux,target_m68k_linux]) then
|
{$ifdef i386}
|
||||||
|
(target_info.target = target_i386_linux)
|
||||||
|
{$ifdef m68k}
|
||||||
|
or
|
||||||
|
{$endif m68k}
|
||||||
|
{$endif i386}
|
||||||
|
{$ifdef m68k}
|
||||||
|
(target_info.target = target_m68k_linux)
|
||||||
|
{$endif m68k}
|
||||||
|
) then
|
||||||
Message(scan_n_stack_check_global_under_linux);
|
Message(scan_n_stack_check_global_under_linux);
|
||||||
end;
|
end;
|
||||||
modulesw : begin
|
modulesw : begin
|
||||||
@ -155,7 +164,16 @@ end;
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.15 1998-10-13 13:10:29 peter
|
Revision 1.16 1998-10-13 16:50:22 pierre
|
||||||
|
* undid some changes of Peter that made the compiler wrong
|
||||||
|
for m68k (I had to reinsert some ifdefs)
|
||||||
|
* removed several memory leaks under m68k
|
||||||
|
* removed the meory leaks for assembler readers
|
||||||
|
* cross compiling shoud work again better
|
||||||
|
( crosscompiling sysamiga works
|
||||||
|
but as68k still complain about some code !)
|
||||||
|
|
||||||
|
Revision 1.15 1998/10/13 13:10:29 peter
|
||||||
* new style for m68k/i386 infos and enums
|
* new style for m68k/i386 infos and enums
|
||||||
|
|
||||||
Revision 1.14 1998/10/13 08:19:41 pierre
|
Revision 1.14 1998/10/13 08:19:41 pierre
|
||||||
|
@ -39,58 +39,82 @@ unit systems;
|
|||||||
|
|
||||||
|
|
||||||
type
|
type
|
||||||
tasmmode= (
|
tasmmode= (asmmode_none
|
||||||
asmmode_i386_direct,asmmode_i386_att,asmmode_i386_intel,
|
{$ifdef i386}
|
||||||
asmmode_m68k_mot
|
,asmmode_i386_direct,asmmode_i386_att,asmmode_i386_intel
|
||||||
|
{$endif i386}
|
||||||
|
{$ifdef m68k}
|
||||||
|
,asmmode_m68k_mot
|
||||||
|
{$endif m68k}
|
||||||
);
|
);
|
||||||
const
|
const
|
||||||
{$ifdef i386} i386asmmodecnt=3; {$else} i386asmmodecnt=0; {$endif}
|
{$ifdef i386} i386asmmodecnt=3; {$else} i386asmmodecnt=0; {$endif}
|
||||||
{$ifdef m68k} m68kasmmodecnt=1; {$else} m68kasmmodecnt=0; {$endif}
|
{$ifdef m68k} m68kasmmodecnt=1; {$else} m68kasmmodecnt=0; {$endif}
|
||||||
|
asmmodecnt=i386asmmodecnt+m68kasmmodecnt+1;
|
||||||
|
|
||||||
type
|
type
|
||||||
ttarget = (
|
ttarget = (target_none
|
||||||
target_i386_GO32V1,target_i386_GO32V2,target_i386_linux,
|
{$ifdef i386}
|
||||||
target_i386_OS2,target_i386_Win32,
|
,target_i386_GO32V1,target_i386_GO32V2,target_i386_linux,
|
||||||
target_m68k_Amiga,target_m68k_Atari,target_m68k_Mac,
|
target_i386_OS2,target_i386_Win32
|
||||||
|
{$endif i386}
|
||||||
|
,target_m68k_Amiga,target_m68k_Atari,target_m68k_Mac,
|
||||||
target_m68k_linux,target_m68k_PalmOS
|
target_m68k_linux,target_m68k_PalmOS
|
||||||
|
{$ifndef i386}
|
||||||
|
,target_i386_GO32V1,target_i386_GO32V2,target_i386_linux,
|
||||||
|
target_i386_OS2,target_i386_Win32
|
||||||
|
{$endif i386}
|
||||||
);
|
);
|
||||||
const
|
const
|
||||||
{$ifdef i386} i386targetcnt=5; {$else} i386targetcnt=0; {$endif}
|
{$ifdef i386} i386targetcnt=5; {$else} i386targetcnt=0; {$endif}
|
||||||
{$ifdef m68k} m68ktargetcnt=5; {$else} m68ktargetcnt=0; {$endif}
|
{$ifdef m68k} m68ktargetcnt=5; {$else} m68ktargetcnt=0; {$endif}
|
||||||
|
targetcnt=i386targetcnt+m68ktargetcnt+1;
|
||||||
|
|
||||||
type
|
type
|
||||||
tasm = (
|
tasm = (as_none
|
||||||
as_i386_o,as_i386_o_aout,as_i386_asw,as_i386_nasmcoff,as_i386_nasmelf,as_i386_nasmobj,
|
{$ifdef i386}
|
||||||
as_i386_tasm,as_i386_masm,
|
,as_i386_o,as_i386_o_aout,as_i386_asw,
|
||||||
as_m68k_o,as_m68k_gas,as_m68k_mit,as_m68k_mot,as_m68k_mpw
|
as_i386_nasmcoff,as_i386_nasmelf,as_i386_nasmobj,
|
||||||
|
as_i386_tasm,as_i386_masm
|
||||||
|
{$endif i386}
|
||||||
|
{$ifdef m68k}
|
||||||
|
,as_m68k_o,as_m68k_gas,as_m68k_mit,as_m68k_mot,as_m68k_mpw
|
||||||
|
{$endif m68k}
|
||||||
);
|
);
|
||||||
const
|
const
|
||||||
{$ifdef i386} i386asmcnt=8; {$else} i386asmcnt=0; {$endif}
|
{$ifdef i386} i386asmcnt=8; {$else} i386asmcnt=0; {$endif}
|
||||||
{$ifdef m68k} m68kasmcnt=5; {$else} m68kasmcnt=0; {$endif}
|
{$ifdef m68k} m68kasmcnt=5; {$else} m68kasmcnt=0; {$endif}
|
||||||
|
asmcnt=i386asmcnt+m68kasmcnt+1;
|
||||||
|
|
||||||
type
|
type
|
||||||
tlink = (
|
tlink = (link_none
|
||||||
link_i386_ld,link_i386_ldgo32v1,link_i386_ldgo32v2,link_i386_ldw,
|
{$ifdef i386}
|
||||||
link_i386_ldos2,
|
,link_i386_ld,link_i386_ldgo32v1,
|
||||||
link_m68k_ld
|
link_i386_ldgo32v2,link_i386_ldw,
|
||||||
|
link_i386_ldos2
|
||||||
|
{$endif i386}
|
||||||
|
{$ifdef m68k}
|
||||||
|
,link_m68k_ld
|
||||||
|
{$endif m68k}
|
||||||
);
|
);
|
||||||
const
|
const
|
||||||
{$ifdef i386} i386linkcnt=5; {$else} i386linkcnt=0; {$endif}
|
{$ifdef i386} i386linkcnt=5; {$else} i386linkcnt=0; {$endif}
|
||||||
{$ifdef m68k} m68klinkcnt=1; {$else} m68klinkcnt=0; {$endif}
|
{$ifdef m68k} m68klinkcnt=1; {$else} m68klinkcnt=0; {$endif}
|
||||||
|
linkcnt=i386linkcnt+m68klinkcnt+1;
|
||||||
|
|
||||||
type
|
type
|
||||||
tar = (
|
tar = (ar_none
|
||||||
ar_i386_ar,ar_i386_arw,
|
{$ifdef i386}
|
||||||
ar_m68k_ar
|
,ar_i386_ar,ar_i386_arw
|
||||||
|
{$endif i386}
|
||||||
|
{$ifdef m68k}
|
||||||
|
,ar_m68k_ar
|
||||||
|
{$endif m68k}
|
||||||
);
|
);
|
||||||
const
|
const
|
||||||
{$ifdef i386} i386arcnt=2; {$else} i386arcnt=0; {$endif}
|
{$ifdef i386} i386arcnt=2; {$else} i386arcnt=0; {$endif}
|
||||||
{$ifdef m68k} m68karcnt=1; {$else} m68karcnt=0; {$endif}
|
{$ifdef m68k} m68karcnt=1; {$else} m68karcnt=0; {$endif}
|
||||||
|
arcnt=i386arcnt+m68karcnt+1;
|
||||||
|
|
||||||
type
|
type
|
||||||
tos = (
|
tos = (
|
||||||
@ -100,9 +124,9 @@ unit systems;
|
|||||||
os_m68k_PalmOS
|
os_m68k_PalmOS
|
||||||
);
|
);
|
||||||
const
|
const
|
||||||
{$ifdef i386} i386oscnt=5; {$else} i386oscnt=0; {$endif}
|
i386oscnt=5;
|
||||||
{$ifdef m68k} m68koscnt=5; {$else} m68koscnt=0; {$endif}
|
m68koscnt=5;
|
||||||
|
oscnt=i386oscnt+m68koscnt;
|
||||||
|
|
||||||
type
|
type
|
||||||
tosinfo = packed record
|
tosinfo = packed record
|
||||||
@ -203,8 +227,7 @@ implementation
|
|||||||
{****************************************************************************
|
{****************************************************************************
|
||||||
OS Info
|
OS Info
|
||||||
****************************************************************************}
|
****************************************************************************}
|
||||||
os_infos : array[1..i386oscnt+m68koscnt] of tosinfo = (
|
os_infos : array[1..oscnt] of tosinfo = (
|
||||||
{$ifdef i386}
|
|
||||||
(
|
(
|
||||||
id : os_i386_go32v1;
|
id : os_i386_go32v1;
|
||||||
name : 'GO32 V1 DOS extender';
|
name : 'GO32 V1 DOS extender';
|
||||||
@ -279,12 +302,7 @@ implementation
|
|||||||
newline : #13#10;
|
newline : #13#10;
|
||||||
endian : endian_little;
|
endian : endian_little;
|
||||||
use_function_relative_addresses : true
|
use_function_relative_addresses : true
|
||||||
)
|
),
|
||||||
{$ifdef m68k}
|
|
||||||
,
|
|
||||||
{$endif m68k}
|
|
||||||
{$endif i386}
|
|
||||||
{$ifdef m68k}
|
|
||||||
(
|
(
|
||||||
id : os_m68k_amiga;
|
id : os_m68k_amiga;
|
||||||
name : 'Commodore Amiga';
|
name : 'Commodore Amiga';
|
||||||
@ -360,7 +378,6 @@ implementation
|
|||||||
endian : endian_big;
|
endian : endian_big;
|
||||||
use_function_relative_addresses : false
|
use_function_relative_addresses : false
|
||||||
)
|
)
|
||||||
{$endif m68k}
|
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
@ -368,9 +385,13 @@ implementation
|
|||||||
Assembler Info
|
Assembler Info
|
||||||
****************************************************************************}
|
****************************************************************************}
|
||||||
|
|
||||||
as_infos : array[1..i386asmcnt+m68kasmcnt] of tasminfo = (
|
as_infos : array[1..asmcnt] of tasminfo = (
|
||||||
{$ifdef i386}
|
|
||||||
(
|
(
|
||||||
|
id : as_none;
|
||||||
|
idtxt : 'no'
|
||||||
|
)
|
||||||
|
{$ifdef i386}
|
||||||
|
,(
|
||||||
id : as_i386_o;
|
id : as_i386_o;
|
||||||
idtxt : 'O';
|
idtxt : 'O';
|
||||||
asmbin : 'as';
|
asmbin : 'as';
|
||||||
@ -442,12 +463,9 @@ implementation
|
|||||||
labelprefix : '.L';
|
labelprefix : '.L';
|
||||||
comment : '; '
|
comment : '; '
|
||||||
)
|
)
|
||||||
{$ifdef m68k}
|
|
||||||
,
|
|
||||||
{$endif m68k}
|
|
||||||
{$endif i386}
|
{$endif i386}
|
||||||
{$ifdef m68k}
|
{$ifdef m68k}
|
||||||
(
|
,(
|
||||||
id : as_m68k_o;
|
id : as_m68k_o;
|
||||||
idtxt : 'O';
|
idtxt : 'O';
|
||||||
asmbin : 'as';
|
asmbin : 'as';
|
||||||
@ -498,9 +516,12 @@ implementation
|
|||||||
{****************************************************************************
|
{****************************************************************************
|
||||||
Linker Info
|
Linker Info
|
||||||
****************************************************************************}
|
****************************************************************************}
|
||||||
link_infos : array[1..i386linkcnt+m68klinkcnt] of tlinkinfo = (
|
link_infos : array[1..linkcnt] of tlinkinfo = (
|
||||||
{$ifdef i386}
|
|
||||||
(
|
(
|
||||||
|
id : link_none;
|
||||||
|
)
|
||||||
|
{$ifdef i386}
|
||||||
|
,(
|
||||||
id : link_i386_ld;
|
id : link_i386_ld;
|
||||||
linkbin : 'ld';
|
linkbin : 'ld';
|
||||||
linkcmd : '$OPT -o $EXE $RES';
|
linkcmd : '$OPT -o $EXE $RES';
|
||||||
@ -575,12 +596,9 @@ implementation
|
|||||||
inputend : '';
|
inputend : '';
|
||||||
libprefix : '-l'
|
libprefix : '-l'
|
||||||
)
|
)
|
||||||
{$ifdef m68k}
|
|
||||||
,
|
|
||||||
{$endif m68k}
|
|
||||||
{$endif i386}
|
{$endif i386}
|
||||||
{$ifdef m68k}
|
{$ifdef m68k}
|
||||||
(
|
,(
|
||||||
id : link_m68k_ld;
|
id : link_m68k_ld;
|
||||||
linkbin : 'ld';
|
linkbin : 'ld';
|
||||||
linkcmd : '$OPT -o $EXE $RES';
|
linkcmd : '$OPT -o $EXE $RES';
|
||||||
@ -601,9 +619,12 @@ implementation
|
|||||||
{****************************************************************************
|
{****************************************************************************
|
||||||
Ar Info
|
Ar Info
|
||||||
****************************************************************************}
|
****************************************************************************}
|
||||||
ar_infos : array[1..i386arcnt+m68karcnt] of tarinfo = (
|
ar_infos : array[1..arcnt] of tarinfo = (
|
||||||
{$ifdef i386}
|
|
||||||
(
|
(
|
||||||
|
id : ar_none;
|
||||||
|
)
|
||||||
|
{$ifdef i386}
|
||||||
|
,(
|
||||||
id : ar_i386_ar;
|
id : ar_i386_ar;
|
||||||
arbin : 'ar';
|
arbin : 'ar';
|
||||||
arcmd : 'rs $LIB $FILES'
|
arcmd : 'rs $LIB $FILES'
|
||||||
@ -613,12 +634,9 @@ implementation
|
|||||||
arbin : 'arw';
|
arbin : 'arw';
|
||||||
arcmd : 'rs $LIB $FILES'
|
arcmd : 'rs $LIB $FILES'
|
||||||
)
|
)
|
||||||
{$ifdef m68k}
|
|
||||||
,
|
|
||||||
{$endif m68k}
|
|
||||||
{$endif i386}
|
{$endif i386}
|
||||||
{$ifdef m68k}
|
{$ifdef m68k}
|
||||||
(
|
,(
|
||||||
id : ar_m68k_ar;
|
id : ar_m68k_ar;
|
||||||
arbin : 'ar';
|
arbin : 'ar';
|
||||||
arcmd : 'rs $LIB $FILES'
|
arcmd : 'rs $LIB $FILES'
|
||||||
@ -629,9 +647,14 @@ implementation
|
|||||||
{****************************************************************************
|
{****************************************************************************
|
||||||
Targets Info
|
Targets Info
|
||||||
****************************************************************************}
|
****************************************************************************}
|
||||||
target_infos : array[1..i386targetcnt+m68ktargetcnt] of ttargetinfo = (
|
target_infos : array[1..targetcnt] of ttargetinfo = (
|
||||||
{$ifdef i386}
|
|
||||||
(
|
(
|
||||||
|
target : target_none;
|
||||||
|
cpu : no_cpu;
|
||||||
|
short_name : 'notarget'
|
||||||
|
)
|
||||||
|
{$ifdef i386}
|
||||||
|
,(
|
||||||
target : target_i386_GO32V1;
|
target : target_i386_GO32V1;
|
||||||
cpu : i386;
|
cpu : i386;
|
||||||
short_name : 'GO32V1';
|
short_name : 'GO32V1';
|
||||||
@ -731,12 +754,9 @@ implementation
|
|||||||
maxheapsize : 32768*1024;
|
maxheapsize : 32768*1024;
|
||||||
stacksize : 32768
|
stacksize : 32768
|
||||||
)
|
)
|
||||||
{$ifdef m68k}
|
|
||||||
,
|
|
||||||
{$endif m68k}
|
|
||||||
{$endif i386}
|
{$endif i386}
|
||||||
{$ifdef m68k}
|
{$ifdef m68k}
|
||||||
(
|
,(
|
||||||
target : target_m68k_Amiga;
|
target : target_m68k_Amiga;
|
||||||
cpu : m68k;
|
cpu : m68k;
|
||||||
short_name : 'AMIGA';
|
short_name : 'AMIGA';
|
||||||
@ -842,9 +862,13 @@ implementation
|
|||||||
{****************************************************************************
|
{****************************************************************************
|
||||||
AsmModeInfo
|
AsmModeInfo
|
||||||
****************************************************************************}
|
****************************************************************************}
|
||||||
asmmodeinfos : array[1..i386asmmodecnt+m68kasmmodecnt] of tasmmodeinfo = (
|
asmmodeinfos : array[1..asmmodecnt] of tasmmodeinfo = (
|
||||||
{$ifdef i386}
|
|
||||||
(
|
(
|
||||||
|
id : asmmode_none;
|
||||||
|
idtxt : 'none'
|
||||||
|
)
|
||||||
|
{$ifdef i386}
|
||||||
|
,(
|
||||||
id : asmmode_i386_direct;
|
id : asmmode_i386_direct;
|
||||||
idtxt : 'DIRECT'
|
idtxt : 'DIRECT'
|
||||||
),
|
),
|
||||||
@ -856,12 +880,9 @@ implementation
|
|||||||
id : asmmode_i386_intel;
|
id : asmmode_i386_intel;
|
||||||
idtxt : 'INTEL'
|
idtxt : 'INTEL'
|
||||||
)
|
)
|
||||||
{$ifdef m68k}
|
|
||||||
,
|
|
||||||
{$endif m68k}
|
|
||||||
{$endif i386}
|
{$endif i386}
|
||||||
{$ifdef m68k}
|
{$ifdef m68k}
|
||||||
(
|
,(
|
||||||
id : asmmode_m68k_mot;
|
id : asmmode_m68k_mot;
|
||||||
idtxt : 'MOT'
|
idtxt : 'MOT'
|
||||||
)
|
)
|
||||||
@ -877,7 +898,8 @@ var
|
|||||||
i : longint;
|
i : longint;
|
||||||
begin
|
begin
|
||||||
set_target_os:=false;
|
set_target_os:=false;
|
||||||
for i:=1 to (sizeof(os_infos) div sizeof(tosinfo)) do
|
{ target 1 is none }
|
||||||
|
for i:=2 to oscnt do
|
||||||
if os_infos[i].id=t then
|
if os_infos[i].id=t then
|
||||||
begin
|
begin
|
||||||
target_os:=os_infos[i];
|
target_os:=os_infos[i];
|
||||||
@ -892,7 +914,7 @@ var
|
|||||||
i : longint;
|
i : longint;
|
||||||
begin
|
begin
|
||||||
set_target_asm:=false;
|
set_target_asm:=false;
|
||||||
for i:=1 to (sizeof(as_infos) div sizeof(tasminfo)) do
|
for i:=1 to asmcnt do
|
||||||
if as_infos[i].id=t then
|
if as_infos[i].id=t then
|
||||||
begin
|
begin
|
||||||
target_asm:=as_infos[i];
|
target_asm:=as_infos[i];
|
||||||
@ -907,7 +929,7 @@ var
|
|||||||
i : longint;
|
i : longint;
|
||||||
begin
|
begin
|
||||||
set_target_link:=false;
|
set_target_link:=false;
|
||||||
for i:=1 to (sizeof(link_infos) div sizeof(tlinkinfo)) do
|
for i:=1 to linkcnt do
|
||||||
if link_infos[i].id=t then
|
if link_infos[i].id=t then
|
||||||
begin
|
begin
|
||||||
target_link:=link_infos[i];
|
target_link:=link_infos[i];
|
||||||
@ -922,7 +944,7 @@ var
|
|||||||
i : longint;
|
i : longint;
|
||||||
begin
|
begin
|
||||||
set_target_ar:=false;
|
set_target_ar:=false;
|
||||||
for i:=1 to (sizeof(ar_infos) div sizeof(tarinfo)) do
|
for i:=1 to arcnt do
|
||||||
if ar_infos[i].id=t then
|
if ar_infos[i].id=t then
|
||||||
begin
|
begin
|
||||||
target_ar:=ar_infos[i];
|
target_ar:=ar_infos[i];
|
||||||
@ -937,7 +959,7 @@ var
|
|||||||
i : longint;
|
i : longint;
|
||||||
begin
|
begin
|
||||||
set_target_info:=false;
|
set_target_info:=false;
|
||||||
for i:=1 to (sizeof(target_infos) div sizeof(ttargetinfo)) do
|
for i:=1 to targetcnt do
|
||||||
if target_infos[i].target=t then
|
if target_infos[i].target=t then
|
||||||
begin
|
begin
|
||||||
target_info:=target_infos[i];
|
target_info:=target_infos[i];
|
||||||
@ -963,7 +985,7 @@ begin
|
|||||||
set_string_target:=false;
|
set_string_target:=false;
|
||||||
{ this should be case insensitive !! PM }
|
{ this should be case insensitive !! PM }
|
||||||
s:=upper(s);
|
s:=upper(s);
|
||||||
for i:=1 to (sizeof(target_infos) div sizeof(ttargetinfo)) do
|
for i:=1 to targetcnt do
|
||||||
if target_infos[i].short_name=s then
|
if target_infos[i].short_name=s then
|
||||||
begin
|
begin
|
||||||
target_info:=target_infos[i];
|
target_info:=target_infos[i];
|
||||||
@ -985,7 +1007,7 @@ begin
|
|||||||
set_string_asm:=false;
|
set_string_asm:=false;
|
||||||
{ this should be case insensitive !! PM }
|
{ this should be case insensitive !! PM }
|
||||||
s:=upper(s);
|
s:=upper(s);
|
||||||
for i:=1 to (sizeof(as_infos) div sizeof(tasminfo)) do
|
for i:=1 to asmcnt do
|
||||||
if as_infos[i].idtxt=s then
|
if as_infos[i].idtxt=s then
|
||||||
begin
|
begin
|
||||||
target_asm:=as_infos[i];
|
target_asm:=as_infos[i];
|
||||||
@ -1001,7 +1023,7 @@ begin
|
|||||||
set_string_asmmode:=false;
|
set_string_asmmode:=false;
|
||||||
{ this should be case insensitive !! PM }
|
{ this should be case insensitive !! PM }
|
||||||
s:=upper(s);
|
s:=upper(s);
|
||||||
for i:=1 to (sizeof(asmmodeinfos) div sizeof(tasmmodeinfo)) do
|
for i:=1 to asmmodecnt do
|
||||||
if asmmodeinfos[i].idtxt=s then
|
if asmmodeinfos[i].idtxt=s then
|
||||||
begin
|
begin
|
||||||
t:=asmmodeinfos[i].id;
|
t:=asmmodeinfos[i].id;
|
||||||
@ -1028,7 +1050,7 @@ var
|
|||||||
begin
|
begin
|
||||||
if source_os.name<>'' then
|
if source_os.name<>'' then
|
||||||
Message(exec_w_source_os_redefined);
|
Message(exec_w_source_os_redefined);
|
||||||
for i:=1 to (sizeof(os_infos) div sizeof(tosinfo)) do
|
for i:=1 to oscnt do
|
||||||
if os_infos[i].id=t then
|
if os_infos[i].id=t then
|
||||||
begin
|
begin
|
||||||
source_os:=os_infos[i];
|
source_os:=os_infos[i];
|
||||||
@ -1126,7 +1148,16 @@ begin
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.41 1998-10-13 13:10:31 peter
|
Revision 1.42 1998-10-13 16:50:23 pierre
|
||||||
|
* undid some changes of Peter that made the compiler wrong
|
||||||
|
for m68k (I had to reinsert some ifdefs)
|
||||||
|
* removed several memory leaks under m68k
|
||||||
|
* removed the meory leaks for assembler readers
|
||||||
|
* cross compiling shoud work again better
|
||||||
|
( crosscompiling sysamiga works
|
||||||
|
but as68k still complain about some code !)
|
||||||
|
|
||||||
|
Revision 1.41 1998/10/13 13:10:31 peter
|
||||||
* new style for m68k/i386 infos and enums
|
* new style for m68k/i386 infos and enums
|
||||||
|
|
||||||
Revision 1.40 1998/10/13 09:13:09 pierre
|
Revision 1.40 1998/10/13 09:13:09 pierre
|
||||||
|
@ -171,8 +171,11 @@ implementation
|
|||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
{ nasm can not cope with negativ reals !! }
|
{ nasm can not cope with negativ reals !! }
|
||||||
if is_constrealnode(p^.left) and
|
if is_constrealnode(p^.left)
|
||||||
not(aktoutputformat in [as_i386_nasmcoff,as_i386_nasmelf,as_i386_nasmobj]) then
|
{$ifdef i386}
|
||||||
|
and not(aktoutputformat in [as_i386_nasmcoff,as_i386_nasmelf,as_i386_nasmobj])
|
||||||
|
{$endif i386}
|
||||||
|
then
|
||||||
begin
|
begin
|
||||||
t:=genrealconstnode(-p^.left^.value_real);
|
t:=genrealconstnode(-p^.left^.value_real);
|
||||||
disposetree(p);
|
disposetree(p);
|
||||||
@ -319,7 +322,16 @@ implementation
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.3 1998-10-13 13:10:33 peter
|
Revision 1.4 1998-10-13 16:50:25 pierre
|
||||||
|
* undid some changes of Peter that made the compiler wrong
|
||||||
|
for m68k (I had to reinsert some ifdefs)
|
||||||
|
* removed several memory leaks under m68k
|
||||||
|
* removed the meory leaks for assembler readers
|
||||||
|
* cross compiling shoud work again better
|
||||||
|
( crosscompiling sysamiga works
|
||||||
|
but as68k still complain about some code !)
|
||||||
|
|
||||||
|
Revision 1.3 1998/10/13 13:10:33 peter
|
||||||
* new style for m68k/i386 infos and enums
|
* new style for m68k/i386 infos and enums
|
||||||
|
|
||||||
Revision 1.2 1998/10/11 14:31:20 peter
|
Revision 1.2 1998/10/11 14:31:20 peter
|
||||||
|
Loading…
Reference in New Issue
Block a user