* aktcputype and aktoptimizecputype was missing in the previous optimization commits

git-svn-id: trunk@2907 -
This commit is contained in:
peter 2006-03-13 12:29:56 +00:00
parent 5a90c00aae
commit d8dc5679e3
13 changed files with 50 additions and 50 deletions

View File

@ -545,7 +545,7 @@ Implementation
begin
result:=target_asm.asmcmd;
{$ifdef m68k}
if aktoptcputype = cpu_MC68020 then
if aktcputype = cpu_MC68020 then
result:='-m68020 '+result
else
result:='-m68000 '+result;

View File

@ -238,13 +238,13 @@ interface
aktpackenum : shortint;
aktmaxfpuregisters : longint;
aktalignment : talignmentinfo;
aktoptcputype,
aktspecificoptcputype : tcputype;
aktfputype : tfputype;
aktcputype,
aktoptimizecputype : tcputype;
aktfputype : tfputype;
aktasmmode : tasmmode;
aktinterfacetype : tinterfacetypes;
aktdefproccall : tproccalloption;
aktsourcecodepage : tcodepagestring;
aktsourcecodepage : tcodepagestring;
{ Memory sizes }
heapsize,

View File

@ -92,7 +92,7 @@ implementation
else
if (pop_size=8) and
not(cs_opt_size in aktoptimizerswitches) and
(aktoptcputype=cpu_Pentium) then
(aktoptimizecputype=cpu_Pentium) then
begin
hreg:=cg.getintregister(exprasmlist,OS_INT);
exprasmlist.concat(taicpu.op_reg(A_POP,S_L,hreg));

View File

@ -107,7 +107,7 @@ implementation
"Cardinal($ffffffff) div 16" overflows! (JM) }
if is_signed(left.resulttype.def) Then
begin
if (aktOptcputype <> cpu_386) and
if (aktoptimizecputype <> cpu_386) and
not(cs_opt_size in aktoptimizerswitches) then
{ use a sequence without jumps, saw this in
comp.compilers (JM) }

View File

@ -59,13 +59,13 @@ implementation
procedure ti386casenode.optimizevalues(var max_linear_list:aint;var max_dist:aword);
begin
{ a jump table crashes the pipeline! }
if aktoptcputype=cpu_386 then
if aktoptimizecputype=cpu_386 then
inc(max_linear_list,3)
else if aktoptcputype=cpu_Pentium then
else if aktoptimizecputype=cpu_Pentium then
inc(max_linear_list,6)
else if aktoptcputype in [cpu_Pentium2,cpu_Pentium3] then
else if aktoptimizecputype in [cpu_Pentium2,cpu_Pentium3] then
inc(max_linear_list,9)
else if aktoptcputype=cpu_Pentium4 then
else if aktoptimizecputype=cpu_Pentium4 then
inc(max_linear_list,14);
end;

View File

@ -148,7 +148,7 @@ begin
else if
((taicpu(p).ops <= 2) or
(taicpu(p).oper[2]^.typ = Top_Reg)) and
(aktoptcputype < cpu_Pentium2) and
(aktoptimizecputype < cpu_Pentium2) and
(taicpu(p).oper[0]^.val <= 12) and
not(cs_opt_size in aktoptimizerswitches) and
(not(GetNextInstruction(p, hp1)) or
@ -198,7 +198,7 @@ begin
imul 6, reg1 to
lea (reg1,reg1,2), reg1
add reg1, reg1}
if (aktoptcputype <= cpu_386) then
if (aktoptimizecputype <= cpu_386) then
begin
TmpRef.index := taicpu(p).oper[1]^.reg;
if (taicpu(p).ops = 3) then
@ -255,7 +255,7 @@ begin
imul 10, reg1 to
lea (reg1,reg1,4), reg1
add reg1, reg1}
if (aktoptcputype <= cpu_386) then
if (aktoptimizecputype <= cpu_386) then
begin
if (taicpu(p).ops = 3) then
hp1 := taicpu.op_reg_reg(A_ADD, S_L,
@ -283,7 +283,7 @@ begin
imul 12, reg1 to
lea (reg1,reg1,2), reg1
lea (,reg1,4), reg1}
if (aktoptcputype <= cpu_386)
if (aktoptimizecputype <= cpu_386)
then
begin
TmpRef.index := taicpu(p).oper[1]^.reg;
@ -1509,7 +1509,7 @@ begin
end;
end;
if TmpBool2 or
((aktoptcputype < cpu_Pentium2) and
((aktoptimizecputype < cpu_Pentium2) and
(taicpu(p).oper[0]^.val <= 3) and
not(cs_opt_size in aktoptimizerswitches)) then
begin
@ -1528,7 +1528,7 @@ begin
end;
end
else
if (aktoptcputype < cpu_Pentium2) and
if (aktoptimizecputype < cpu_Pentium2) and
(taicpu(p).oper[0]^.typ = top_const) and
(taicpu(p).oper[1]^.typ = top_reg) then
if (taicpu(p).oper[0]^.val = 1) then
@ -1698,7 +1698,7 @@ begin
case taicpu(p).opcode Of
{$ifdef USECMOV}
A_Jcc:
if (aktspecificoptcputype>=cpu_Pentium2) then
if (aktcputype>=cpu_Pentium2) then
begin
{ check for
jCC xxx
@ -1930,7 +1930,7 @@ begin
begin
case taicpu(p).opcode Of
A_CALL:
if (AktOptcputype < cpu_Pentium2) and
if (aktoptimizecputype < cpu_Pentium2) and
GetNextInstruction(p, hp1) and
(hp1.typ = ait_instruction) and
(taicpu(hp1).opcode = A_JMP) and
@ -1983,7 +1983,7 @@ See test/tgadint64 in the test suite.
begin
if IsGP32Reg(getsupreg(taicpu(p).oper[1]^.reg)) and
not(cs_opt_size in aktoptimizerswitches) and
(aktoptcputype = cpu_Pentium) then
(aktoptimizecputype = cpu_Pentium) then
{Change "movzbl %reg1, %reg2" to
"xorl %reg2, %reg2; movb %reg1, %reg2" for Pentium and
PentiumMMX}
@ -2002,7 +2002,7 @@ See test/tgadint64 in the test suite.
(taicpu(p).oper[0]^.ref^.index <> taicpu(p).oper[1]^.reg) and
not(cs_opt_size in aktoptimizerswitches) and
IsGP32Reg(getsupreg(taicpu(p).oper[1]^.reg)) and
(aktoptcputype = cpu_Pentium) and
(aktoptimizecputype = cpu_Pentium) and
(taicpu(p).opsize = S_BL) then
{changes "movzbl mem, %reg" to "xorl %reg, %reg; movb mem, %reg8" for
Pentium and PentiumMMX}

View File

@ -211,7 +211,7 @@ unit cgcpu;
addressing capabilities with a 32-bit
displacement.
}
if (aktoptcputype<>cpu_MC68000) then
if (aktcputype<>cpu_MC68000) then
exit;
if (ref.base<>NR_NO) then
begin
@ -434,7 +434,7 @@ unit cgcpu;
end;
OP_IMUL :
begin
if aktoptcputype = cpu_MC68000 then
if aktcputype = cpu_MC68000 then
begin
r:=NR_D0;
r2:=NR_D1;
@ -463,7 +463,7 @@ unit cgcpu;
end;
OP_MUL :
begin
if aktoptcputype = cpu_MC68000 then
if aktcputype = cpu_MC68000 then
begin
r:=NR_D0;
r2:=NR_D1;
@ -550,7 +550,7 @@ unit cgcpu;
case op of
OP_ADD :
begin
if aktoptcputype = cpu_ColdFire then
if aktcputype = cpu_ColdFire then
begin
{ operation only allowed only a longword }
sign_extend(list, size, reg1);
@ -583,7 +583,7 @@ unit cgcpu;
else
hreg2 := reg2;
if aktoptcputype = cpu_ColdFire then
if aktcputype = cpu_ColdFire then
begin
{ operation only allowed only a longword }
{!***************************************
@ -620,7 +620,7 @@ unit cgcpu;
begin
sign_extend(list, size,reg1);
sign_extend(list, size,reg2);
if aktoptcputype = cpu_MC68000 then
if aktcputype = cpu_MC68000 then
begin
r:=NR_D0;
r2:=NR_D1;
@ -663,7 +663,7 @@ unit cgcpu;
begin
sign_extend(list, size,reg1);
sign_extend(list, size,reg2);
if aktoptcputype = cpu_MC68000 then
if aktcputype = cpu_MC68000 then
begin
r:=NR_D0;
r2:=NR_D1;
@ -722,7 +722,7 @@ unit cgcpu;
hreg2 := reg2;
{ coldfire only supports long version }
if aktoptcputype = cpu_ColdFire then
if aktcputype = cpu_ColdFire then
begin
sign_extend(list, size,hreg2);
list.concat(taicpu.op_reg(topcg2tasmop[op],S_L,hreg2));
@ -756,7 +756,7 @@ unit cgcpu;
end
else
begin
if (aktoptcputype = cpu_ColdFire) then
if (aktcputype = cpu_ColdFire) then
begin
{
only longword comparison is supported,
@ -818,7 +818,7 @@ unit cgcpu;
ai.SetCondition(flags_to_cond(f));
list.concat(ai);
if (aktoptcputype = cpu_ColdFire) then
if (aktcputype = cpu_ColdFire) then
begin
{ neg.b does not exist on the Coldfire
so we need to sign extend the value
@ -840,7 +840,7 @@ unit cgcpu;
ai.SetCondition(flags_to_cond(f));
list.concat(ai);
if (aktoptcputype = cpu_ColdFire) then
if (aktcputype = cpu_ColdFire) then
begin
{ neg.b does not exist on the Coldfire
so we need to sign extend the value
@ -943,7 +943,7 @@ unit cgcpu;
{ double word move only on 68020+ machines }
{ because of possible alignment problems }
{ use fast loop mode }
if (aktoptcputype=cpu_MC68020) then
if (aktcputype=cpu_MC68020) then
begin
helpsize := len - len mod 4;
len := len mod 4;
@ -1059,7 +1059,7 @@ unit cgcpu;
{ return with immediate size possible here
signed!
RTD is not supported on the coldfire }
if (aktoptcputype=cpu_MC68020) and (parasize<$7FFF) then
if (aktcputype=cpu_MC68020) and (parasize<$7FFF) then
list.concat(taicpu.op_const(A_RTD,S_NO,parasize))
{ manually restore the stack }
else
@ -1143,7 +1143,7 @@ unit cgcpu;
begin
if (isaddressregister(reg)) then
internalerror(20020729);
if (aktoptcputype = cpu_MC68000) then
if (aktcputype = cpu_MC68000) then
begin
list.concat(taicpu.op_reg(A_EXT,S_W,reg));
list.concat(taicpu.op_reg(A_EXT,S_L,reg));

View File

@ -145,7 +145,7 @@ implementation
paraloc1 : tcgpara;
begin
{ no RTL call, so inline a zero denominator verification }
if aktoptcputype <> cpu_MC68000 then
if aktcputype <> cpu_MC68000 then
begin
{ verify if denominator is zero }
objectlibrary.getjumplabel(continuelabel);
@ -193,7 +193,7 @@ implementation
begin
// writeln('emit mod reg reg');
{ no RTL call, so inline a zero denominator verification }
if aktoptcputype <> cpu_MC68000 then
if aktcputype <> cpu_MC68000 then
begin
{ verify if denominator is zero }
objectlibrary.getjumplabel(continuelabel);

View File

@ -1555,7 +1555,7 @@ const
{ DIVSL/DIVS/MULS/MULU with long for MC68020 only }
if (actasmtoken = AS_COLON) then
begin
if (aktoptcputype = cpu_MC68020) or (cs_compilesystem in aktmoduleswitches) then
if (aktcputype = cpu_MC68020) or (cs_compilesystem in aktmoduleswitches) then
begin
Consume(AS_COLON);
if (actasmtoken = AS_REGISTER) then

View File

@ -61,7 +61,7 @@ unit optunrol;
begin
{$ifdef i386}
{ multiply by 2 for CPUs with a long pipeline }
if aktoptcputype in [cpu_Pentium4] then
if aktcputype in [cpu_Pentium4] then
number_unrolls:=60 div countnodes(node)
else
{$endif i386}

View File

@ -329,9 +329,9 @@ implementation
oldaktpackrecords,
oldaktpackenum : shortint;
oldaktmaxfpuregisters : longint;
oldaktalignment : talignmentinfo;
oldaktspecificoptcputype,
oldaktoptcputype : tcputype;
oldaktalignment : talignmentinfo;
oldaktoptimizecputype,
oldaktcputype : tcputype;
oldaktfputype : tfputype;
oldaktasmmode : tasmmode;
oldaktinterfacetype: tinterfacetypes;
@ -390,8 +390,8 @@ implementation
oldaktpackrecords:=aktpackrecords;
oldaktfputype:=aktfputype;
oldaktmaxfpuregisters:=aktmaxfpuregisters;
oldaktoptcputype:=aktoptcputype;
oldaktspecificoptcputype:=aktspecificoptcputype;
oldaktcputype:=aktcputype;
oldaktoptimizecputype:=aktoptimizecputype;
oldaktasmmode:=aktasmmode;
oldaktinterfacetype:=aktinterfacetype;
oldaktfilepos:=aktfilepos;
@ -448,8 +448,8 @@ implementation
aktfputype:=initfputype;
aktpackenum:=initpackenum;
aktpackrecords:=0;
aktoptcputype:=initcputype;
aktspecificoptcputype:=initoptimizecputype;
aktcputype:=initcputype;
aktoptimizecputype:=initoptimizecputype;
aktasmmode:=initasmmode;
aktinterfacetype:=initinterfacetype;
@ -566,8 +566,8 @@ implementation
aktpackenum:=oldaktpackenum;
aktpackrecords:=oldaktpackrecords;
aktmaxfpuregisters:=oldaktmaxfpuregisters;
aktoptcputype:=oldaktoptcputype;
aktspecificoptcputype:=oldaktspecificoptcputype;
aktcputype:=oldaktcputype;
aktoptimizecputype:=oldaktoptimizecputype;
aktfputype:=oldaktfputype;
aktasmmode:=oldaktasmmode;
aktinterfacetype:=oldaktinterfacetype;

View File

@ -874,7 +874,7 @@ unit nx86add;
left_and_right_must_be_fpureg;
{$ifndef x86_64}
if aktspecificoptcputype<cpu_Pentium2 then
if aktoptimizecputype<cpu_Pentium2 then
begin
emit_none(A_FCOMPP,S_NO);
tcgx86(cg).dec_fpu_stack;

View File

@ -309,7 +309,7 @@ implementation
r : tregister;
begin
{$ifdef i386}
if aktspecificoptcputype>=cpu_Pentium3 then
if aktoptimizecputype>=cpu_Pentium3 then
{$endif i386}
begin
secondpass(left);