mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-15 22:49:07 +02:00
* 64 bit multiplications for sparc64 fixed
git-svn-id: trunk@36675 -
This commit is contained in:
parent
47bdbb2d1f
commit
25950b8575
@ -102,7 +102,7 @@ interface
|
|||||||
A_NONE,A_MOV,A_ADD,A_AND,A_UDIV,A_SDIV,A_SMUL,A_UMUL,A_NEG,A_NOT,A_OR,A_SRA,A_SLL,A_SRL,A_SUB,A_XOR,A_NONE,A_NONE
|
A_NONE,A_MOV,A_ADD,A_AND,A_UDIV,A_SDIV,A_SMUL,A_UMUL,A_NEG,A_NOT,A_OR,A_SRA,A_SLL,A_SRL,A_SUB,A_XOR,A_NONE,A_NONE
|
||||||
),
|
),
|
||||||
(
|
(
|
||||||
A_NONE,A_MOV,A_ADD,A_AND,A_UDIV,A_SDIV,A_SMUL,A_UMUL,A_NEG,A_NOT,A_OR,A_SRAX,A_SLLX,A_SRLX,A_SUB,A_XOR,A_NONE,A_NONE
|
A_NONE,A_MOV,A_ADD,A_AND,A_UDIV,A_SDIV,A_MULX,A_MULX,A_NEG,A_NOT,A_OR,A_SRAX,A_SLLX,A_SRLX,A_SUB,A_XOR,A_NONE,A_NONE
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -45,12 +45,14 @@ interface
|
|||||||
public
|
public
|
||||||
function pass_1: tnode; override;
|
function pass_1: tnode; override;
|
||||||
function use_generic_mul32to64: boolean; override;
|
function use_generic_mul32to64: boolean; override;
|
||||||
|
function use_generic_mul64bit : boolean; override;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
uses
|
uses
|
||||||
systems,
|
systems,
|
||||||
|
globals,globtype,
|
||||||
cutils,verbose,
|
cutils,verbose,
|
||||||
paramgr,procinfo,
|
paramgr,procinfo,
|
||||||
aasmtai,aasmdata,aasmcpu,defutil,
|
aasmtai,aasmdata,aasmcpu,defutil,
|
||||||
@ -477,7 +479,7 @@ interface
|
|||||||
location_reset(location,LOC_REGISTER,def_cgsize(resultdef));
|
location_reset(location,LOC_REGISTER,def_cgsize(resultdef));
|
||||||
{$ifdef SPARC64}
|
{$ifdef SPARC64}
|
||||||
location.register:=cg.getintregister(current_asmdata.CurrAsmList,location.size);
|
location.register:=cg.getintregister(current_asmdata.CurrAsmList,location.size);
|
||||||
current_asmdata.CurrAsmList.Concat(taicpu.op_reg_reg_reg(multops[unsigned],left.location.register,right.location.register,location.register));
|
current_asmdata.CurrAsmList.Concat(taicpu.op_reg_reg_reg(A_MULX,left.location.register,right.location.register,location.register));
|
||||||
{$else SPARC64}
|
{$else SPARC64}
|
||||||
location.register64.reglo:=cg.getintregister(current_asmdata.CurrAsmList,OS_INT);
|
location.register64.reglo:=cg.getintregister(current_asmdata.CurrAsmList,OS_INT);
|
||||||
location.register64.reghi:=cg.getintregister(current_asmdata.CurrAsmList,OS_INT);
|
location.register64.reghi:=cg.getintregister(current_asmdata.CurrAsmList,OS_INT);
|
||||||
@ -496,6 +498,16 @@ interface
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
function tsparcaddnode.use_generic_mul64bit: boolean;
|
||||||
|
begin
|
||||||
|
{$ifdef SPARC64}
|
||||||
|
result:=(cs_check_overflow in current_settings.localswitches);
|
||||||
|
{$else SPARC64}
|
||||||
|
result:=inherited;
|
||||||
|
{$endif SPARC64}
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
function tsparcaddnode.pass_1: tnode;
|
function tsparcaddnode.pass_1: tnode;
|
||||||
begin
|
begin
|
||||||
result:=inherited pass_1;
|
result:=inherited pass_1;
|
||||||
|
Loading…
Reference in New Issue
Block a user