mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-05 10:58:06 +02:00
+ a_bit_scan_reg_reg gets a flag if src cannot be zero: this simplifies the generated code
This commit is contained in:
parent
b5254fbeb4
commit
b2f6214b33
@ -84,7 +84,7 @@ interface
|
|||||||
|
|
||||||
procedure a_opmm_reg_reg(list: TAsmList; Op: TOpCG; size: tcgsize; src, dst: tregister; shuffle: pmmshuffle); override;
|
procedure a_opmm_reg_reg(list: TAsmList; Op: TOpCG; size: tcgsize; src, dst: tregister; shuffle: pmmshuffle); override;
|
||||||
|
|
||||||
procedure a_bit_scan_reg_reg(list: TAsmList; reverse: boolean; srcsize, dstsize: tcgsize; src, dst: TRegister); override;
|
procedure a_bit_scan_reg_reg(list: TAsmList; reverse,not_zero: boolean; srcsize, dstsize: tcgsize; src, dst: TRegister); override;
|
||||||
{ comparison operations }
|
{ comparison operations }
|
||||||
procedure a_cmp_const_reg_label(list: TAsmList; size: tcgsize; cmp_op: topcmp; a: tcgint; reg: tregister; l: tasmlabel);override;
|
procedure a_cmp_const_reg_label(list: TAsmList; size: tcgsize; cmp_op: topcmp; a: tcgint; reg: tregister; l: tasmlabel);override;
|
||||||
procedure a_cmp_reg_reg_label(list: TAsmList; size: tcgsize; cmp_op: topcmp; reg1, reg2: tregister; l: tasmlabel);override;
|
procedure a_cmp_reg_reg_label(list: TAsmList; size: tcgsize; cmp_op: topcmp; reg1, reg2: tregister; l: tasmlabel);override;
|
||||||
@ -1292,7 +1292,7 @@ implementation
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure tcgaarch64.a_bit_scan_reg_reg(list: TAsmList; reverse: boolean; srcsize, dstsize: tcgsize; src, dst: TRegister);
|
procedure tcgaarch64.a_bit_scan_reg_reg(list: TAsmList; reverse,not_zero: boolean; srcsize, dstsize: tcgsize; src, dst: TRegister);
|
||||||
var
|
var
|
||||||
bitsize: longint;
|
bitsize: longint;
|
||||||
begin
|
begin
|
||||||
@ -1304,8 +1304,9 @@ implementation
|
|||||||
begin
|
begin
|
||||||
bitsize:=32;
|
bitsize:=32;
|
||||||
end;
|
end;
|
||||||
{ source is 0 -> dst will have to become 255 }
|
if not(not_zero) then
|
||||||
list.concat(taicpu.op_reg_const(A_CMP,src,0));
|
{ source is 0 -> dst will have to become 255 }
|
||||||
|
list.concat(taicpu.op_reg_const(A_CMP,src,0));
|
||||||
if reverse then
|
if reverse then
|
||||||
begin
|
begin
|
||||||
list.Concat(taicpu.op_reg_reg(A_CLZ,makeregsize(dst,srcsize),src));
|
list.Concat(taicpu.op_reg_reg(A_CLZ,makeregsize(dst,srcsize),src));
|
||||||
@ -1319,10 +1320,13 @@ implementation
|
|||||||
list.Concat(taicpu.op_reg_reg(A_CLZ,dst,dst));
|
list.Concat(taicpu.op_reg_reg(A_CLZ,dst,dst));
|
||||||
end;
|
end;
|
||||||
{ set dst to -1 if src was 0 }
|
{ set dst to -1 if src was 0 }
|
||||||
list.Concat(taicpu.op_reg_reg_reg_cond(A_CSINV,dst,dst,makeregsize(NR_XZR,dstsize),C_NE));
|
if not(not_zero) then
|
||||||
{ mask the -1 to 255 if src was 0 (anyone find a two-instruction
|
begin
|
||||||
branch-free version? All of mine are 3...) }
|
list.Concat(taicpu.op_reg_reg_reg_cond(A_CSINV,dst,dst,makeregsize(NR_XZR,dstsize),C_NE));
|
||||||
list.Concat(taicpu.op_reg_reg(A_UXTB,makeregsize(dst,OS_32),makeregsize(dst,OS_32)));
|
{ mask the -1 to 255 if src was 0 (anyone find a two-instruction
|
||||||
|
branch-free version? All of mine are 3...) }
|
||||||
|
list.Concat(taicpu.op_reg_reg(A_UXTB,makeregsize(dst,OS_32),makeregsize(dst,OS_32)));
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
@ -106,7 +106,7 @@ unit cgcpu;
|
|||||||
|
|
||||||
procedure a_opmm_reg_reg(list: TAsmList; Op: TOpCG; size : tcgsize;src,dst: tregister;shuffle : pmmshuffle); override;
|
procedure a_opmm_reg_reg(list: TAsmList; Op: TOpCG; size : tcgsize;src,dst: tregister;shuffle : pmmshuffle); override;
|
||||||
{ Transform unsupported methods into Internal errors }
|
{ Transform unsupported methods into Internal errors }
|
||||||
procedure a_bit_scan_reg_reg(list: TAsmList; reverse: boolean; srcsize, dstsize: TCGSize; src, dst: TRegister); override;
|
procedure a_bit_scan_reg_reg(list: TAsmList; reverse,not_zero: boolean; srcsize, dstsize: TCGSize; src, dst: TRegister); override;
|
||||||
|
|
||||||
{ try to generate optimized 32 Bit multiplication, returns true if successful generated }
|
{ try to generate optimized 32 Bit multiplication, returns true if successful generated }
|
||||||
function try_optimized_mul32_const_reg_reg(list: TAsmList; a: tcgint; src, dst: tregister) : boolean;
|
function try_optimized_mul32_const_reg_reg(list: TAsmList; a: tcgint; src, dst: tregister) : boolean;
|
||||||
@ -1827,7 +1827,7 @@ unit cgcpu;
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure tbasecgarm.a_bit_scan_reg_reg(list: TAsmList; reverse: boolean; srcsize, dstsize: TCGSize; src, dst: TRegister);
|
procedure tbasecgarm.a_bit_scan_reg_reg(list: TAsmList; reverse,not_zero: boolean; srcsize, dstsize: TCGSize; src, dst: TRegister);
|
||||||
begin
|
begin
|
||||||
if reverse then
|
if reverse then
|
||||||
begin
|
begin
|
||||||
|
@ -65,14 +65,14 @@ uses
|
|||||||
procedure a_cmp_reg_reg_label(list: TAsmList; size: tcgsize; cmp_op: topcmp; reg1, reg2: tregister; l: tasmlabel); override;
|
procedure a_cmp_reg_reg_label(list: TAsmList; size: tcgsize; cmp_op: topcmp; reg1, reg2: tregister; l: tasmlabel); override;
|
||||||
procedure a_call_reg(list: TAsmList; reg: tregister); override;
|
procedure a_call_reg(list: TAsmList; reg: tregister); override;
|
||||||
procedure a_call_name(list: TAsmList; const s: string; weak: boolean); override;
|
procedure a_call_name(list: TAsmList; const s: string; weak: boolean); override;
|
||||||
procedure a_bit_scan_reg_reg(list: TAsmList; reverse: boolean; srcsize, dstsize: tcgsize; src, dst: TRegister); override;
|
procedure a_bit_scan_reg_reg(list: TAsmList; reverse,not_zero: boolean; srcsize, dstsize: tcgsize; src, dst: TRegister); override;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
{ thlbasecgcpu }
|
{ thlbasecgcpu }
|
||||||
|
|
||||||
procedure thlbasecgcpu.a_bit_scan_reg_reg(list: TAsmList; reverse: boolean; srcsize, dstsize: tcgsize; src, dst: TRegister);
|
procedure thlbasecgcpu.a_bit_scan_reg_reg(list: TAsmList; reverse,not_zero: boolean; srcsize, dstsize: tcgsize; src, dst: TRegister);
|
||||||
begin
|
begin
|
||||||
internalerror(2012042801);
|
internalerror(2012042801);
|
||||||
end;
|
end;
|
||||||
|
@ -267,7 +267,7 @@ unit cgobj;
|
|||||||
procedure a_loadaddr_ref_reg(list : TAsmList;const ref : treference;r : tregister);virtual; abstract;
|
procedure a_loadaddr_ref_reg(list : TAsmList;const ref : treference;r : tregister);virtual; abstract;
|
||||||
|
|
||||||
{ bit scan instructions }
|
{ bit scan instructions }
|
||||||
procedure a_bit_scan_reg_reg(list: TAsmList; reverse: boolean; srcsize, dstsize: tcgsize; src, dst: TRegister); virtual;
|
procedure a_bit_scan_reg_reg(list: TAsmList; reverse,not_zero: boolean; srcsize, dstsize: tcgsize; src, dst: TRegister); virtual;
|
||||||
|
|
||||||
{ Multiplication with doubling result size.
|
{ Multiplication with doubling result size.
|
||||||
dstlo or dsthi may be NR_NO, in which case corresponding half of result is discarded. }
|
dstlo or dsthi may be NR_NO, in which case corresponding half of result is discarded. }
|
||||||
@ -3026,7 +3026,7 @@ implementation
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure tcg.a_bit_scan_reg_reg(list: TAsmList; reverse: boolean; srcsize, dstsize: tcgsize; src, dst: TRegister);
|
procedure tcg.a_bit_scan_reg_reg(list: TAsmList; reverse,not_zero: boolean; srcsize, dstsize: tcgsize; src, dst: TRegister);
|
||||||
begin
|
begin
|
||||||
internalerror(2014070601);
|
internalerror(2014070601);
|
||||||
end;
|
end;
|
||||||
|
@ -171,7 +171,7 @@ unit hlcg2ll;
|
|||||||
procedure a_loadaddr_ref_reg(list : TAsmList;fromsize, tosize : tdef;const ref : treference;r : tregister);override;
|
procedure a_loadaddr_ref_reg(list : TAsmList;fromsize, tosize : tdef;const ref : treference;r : tregister);override;
|
||||||
|
|
||||||
{ bit scan instructions }
|
{ bit scan instructions }
|
||||||
procedure a_bit_scan_reg_reg(list: TAsmList; reverse: boolean; srcsize, dstsize: tdef; src, dst: tregister); override;
|
procedure a_bit_scan_reg_reg(list: TAsmList; reverse,not_zero: boolean; srcsize, dstsize: tdef; src, dst: tregister); override;
|
||||||
|
|
||||||
{ fpu move instructions }
|
{ fpu move instructions }
|
||||||
procedure a_loadfpu_reg_reg(list: TAsmList; fromsize, tosize: tdef; reg1, reg2: tregister); override;
|
procedure a_loadfpu_reg_reg(list: TAsmList; fromsize, tosize: tdef; reg1, reg2: tregister); override;
|
||||||
@ -586,9 +586,9 @@ implementation
|
|||||||
cg.a_loadaddr_ref_reg(list,ref,r);
|
cg.a_loadaddr_ref_reg(list,ref,r);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure thlcg2ll.a_bit_scan_reg_reg(list: TAsmList; reverse: boolean; srcsize, dstsize: tdef; src, dst: tregister);
|
procedure thlcg2ll.a_bit_scan_reg_reg(list: TAsmList; reverse,not_zero: boolean; srcsize, dstsize: tdef; src, dst: tregister);
|
||||||
begin
|
begin
|
||||||
cg.a_bit_scan_reg_reg(list,reverse,def_cgsize(srcsize),def_cgsize(dstsize),src,dst);
|
cg.a_bit_scan_reg_reg(list,reverse,not_zero,def_cgsize(srcsize),def_cgsize(dstsize),src,dst);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure thlcg2ll.a_loadfpu_reg_reg(list: TAsmList; fromsize, tosize: tdef; reg1, reg2: tregister);
|
procedure thlcg2ll.a_loadfpu_reg_reg(list: TAsmList; fromsize, tosize: tdef; reg1, reg2: tregister);
|
||||||
|
@ -310,7 +310,7 @@ unit hlcgobj;
|
|||||||
public
|
public
|
||||||
|
|
||||||
{ bit scan instructions (still need transformation to thlcgobj) }
|
{ bit scan instructions (still need transformation to thlcgobj) }
|
||||||
procedure a_bit_scan_reg_reg(list: TAsmList; reverse: boolean; srcsize, dstsize: tdef; src, dst: tregister); virtual; abstract;
|
procedure a_bit_scan_reg_reg(list: TAsmList; reverse,not_zero: boolean; srcsize, dstsize: tdef; src, dst: tregister); virtual; abstract;
|
||||||
|
|
||||||
{ fpu move instructions }
|
{ fpu move instructions }
|
||||||
procedure a_loadfpu_reg_reg(list: TAsmList; fromsize, tosize: tdef; reg1, reg2: tregister); virtual; abstract;
|
procedure a_loadfpu_reg_reg(list: TAsmList; fromsize, tosize: tdef; reg1, reg2: tregister); virtual; abstract;
|
||||||
|
@ -114,7 +114,7 @@ uses
|
|||||||
procedure gen_exit_code(list: TAsmList); override;
|
procedure gen_exit_code(list: TAsmList); override;
|
||||||
|
|
||||||
{ unimplemented/unnecessary routines }
|
{ unimplemented/unnecessary routines }
|
||||||
procedure a_bit_scan_reg_reg(list: TAsmList; reverse: boolean; srcsize, dstsize: tdef; src, dst: tregister); override;
|
procedure a_bit_scan_reg_reg(list: TAsmList; reverse,not_zero: boolean; srcsize, dstsize: tdef; src, dst: tregister); override;
|
||||||
procedure a_loadmm_loc_reg(list: TAsmList; fromsize, tosize: tdef; const loc: tlocation; const reg: tregister; shuffle: pmmshuffle); override;
|
procedure a_loadmm_loc_reg(list: TAsmList; fromsize, tosize: tdef; const loc: tlocation; const reg: tregister; shuffle: pmmshuffle); override;
|
||||||
procedure a_loadmm_reg_reg(list: TAsmList; fromsize, tosize: tdef; reg1, reg2: tregister; shuffle: pmmshuffle); override;
|
procedure a_loadmm_reg_reg(list: TAsmList; fromsize, tosize: tdef; reg1, reg2: tregister; shuffle: pmmshuffle); override;
|
||||||
procedure a_loadmm_ref_reg(list: TAsmList; fromsize, tosize: tdef; const ref: treference; reg: tregister; shuffle: pmmshuffle); override;
|
procedure a_loadmm_ref_reg(list: TAsmList; fromsize, tosize: tdef; const ref: treference; reg: tregister; shuffle: pmmshuffle); override;
|
||||||
@ -1898,7 +1898,7 @@ implementation
|
|||||||
{ nothing }
|
{ nothing }
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure thlcgjvm.a_bit_scan_reg_reg(list: TAsmList; reverse: boolean; srcsize, dstsize: tdef; src, dst: tregister);
|
procedure thlcgjvm.a_bit_scan_reg_reg(list: TAsmList; reverse,not_zero: boolean; srcsize, dstsize: tdef; src, dst: tregister);
|
||||||
begin
|
begin
|
||||||
internalerror(2012090201);
|
internalerror(2012090201);
|
||||||
end;
|
end;
|
||||||
|
@ -145,7 +145,7 @@ uses
|
|||||||
{$endif cpuflags}
|
{$endif cpuflags}
|
||||||
|
|
||||||
{ unimplemented or unnecessary routines }
|
{ unimplemented or unnecessary routines }
|
||||||
procedure a_bit_scan_reg_reg(list: TAsmList; reverse: boolean; srcsize, dstsize: tdef; src, dst: tregister); override;
|
procedure a_bit_scan_reg_reg(list: TAsmList; reverse,not_zero: boolean; srcsize, dstsize: tdef; src, dst: tregister); override;
|
||||||
procedure g_stackpointer_alloc(list: TAsmList; size: longint); override;
|
procedure g_stackpointer_alloc(list: TAsmList; size: longint); override;
|
||||||
procedure g_intf_wrapper(list: TAsmList; procdef: tprocdef; const labelname: string; ioffset: longint); override;
|
procedure g_intf_wrapper(list: TAsmList; procdef: tprocdef; const labelname: string; ioffset: longint); override;
|
||||||
procedure g_adjust_self_value(list: TAsmList; procdef: tprocdef; ioffset: aint); override;
|
procedure g_adjust_self_value(list: TAsmList; procdef: tprocdef; ioffset: aint); override;
|
||||||
@ -2019,7 +2019,7 @@ implementation
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure thlcgllvm.a_bit_scan_reg_reg(list: TAsmList; reverse: boolean; srcsize, dstsize: tdef; src, dst: tregister);
|
procedure thlcgllvm.a_bit_scan_reg_reg(list: TAsmList; reverse,not_zero: boolean; srcsize, dstsize: tdef; src, dst: tregister);
|
||||||
begin
|
begin
|
||||||
internalerror(2012090201);
|
internalerror(2012090201);
|
||||||
end;
|
end;
|
||||||
|
@ -57,7 +57,7 @@ unit cgcpu;
|
|||||||
procedure a_loadaddr_ref_reg(list : TAsmList;const ref : treference;r : tregister);override;
|
procedure a_loadaddr_ref_reg(list : TAsmList;const ref : treference;r : tregister);override;
|
||||||
|
|
||||||
{ bit scan instructions }
|
{ bit scan instructions }
|
||||||
procedure a_bit_scan_reg_reg(list: TAsmList; reverse: boolean; srcsize, dstsize: tcgsize; src, dst: TRegister); override;
|
procedure a_bit_scan_reg_reg(list: TAsmList; reverse,not_zero: boolean; srcsize, dstsize: tcgsize; src, dst: TRegister); override;
|
||||||
|
|
||||||
{ fpu move instructions }
|
{ fpu move instructions }
|
||||||
procedure a_loadfpu_reg_reg(list: TAsmList; fromsize, tosize: tcgsize; reg1, reg2: tregister); override;
|
procedure a_loadfpu_reg_reg(list: TAsmList; fromsize, tosize: tcgsize; reg1, reg2: tregister); override;
|
||||||
@ -512,7 +512,7 @@ implementation
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure tcgloongarch64.a_bit_scan_reg_reg(list: TAsmList; reverse: boolean; srcsize, dstsize: tcgsize; src, dst: TRegister);
|
procedure tcgloongarch64.a_bit_scan_reg_reg(list: TAsmList; reverse,not_zero: boolean; srcsize, dstsize: tcgsize; src, dst: TRegister);
|
||||||
begin
|
begin
|
||||||
internalerror(2022111943);
|
internalerror(2022111943);
|
||||||
end;
|
end;
|
||||||
|
@ -81,7 +81,7 @@ implementation
|
|||||||
aasmbase,aasmdata,
|
aasmbase,aasmdata,
|
||||||
cgbase,pass_2,
|
cgbase,pass_2,
|
||||||
cpubase,procinfo,
|
cpubase,procinfo,
|
||||||
ncon,ncal,
|
nadd,ncon,ncal,
|
||||||
tgobj,ncgutil,
|
tgobj,ncgutil,
|
||||||
cgutils,cgobj,hlcgobj,
|
cgutils,cgobj,hlcgobj,
|
||||||
defcmp
|
defcmp
|
||||||
@ -994,10 +994,13 @@ implementation
|
|||||||
|
|
||||||
procedure tcginlinenode.second_BsfBsr;
|
procedure tcginlinenode.second_BsfBsr;
|
||||||
var
|
var
|
||||||
|
not_zero,
|
||||||
reverse: boolean;
|
reverse: boolean;
|
||||||
opsize: tcgsize;
|
opsize: tcgsize;
|
||||||
begin
|
begin
|
||||||
reverse:=(inlinenumber = in_bsr_x);
|
reverse:=(inlinenumber = in_bsr_x);
|
||||||
|
not_zero:=(left.nodetype=orn) and (((is_constintnode(taddnode(left).left) and (tordconstnode(taddnode(left).left).value<>0))) or
|
||||||
|
((is_constintnode(taddnode(left).right) and (tordconstnode(taddnode(left).right).value<>0))));
|
||||||
secondpass(left);
|
secondpass(left);
|
||||||
|
|
||||||
opsize:=tcgsize2unsigned[left.location.size];
|
opsize:=tcgsize2unsigned[left.location.size];
|
||||||
@ -1006,7 +1009,7 @@ implementation
|
|||||||
|
|
||||||
location_reset(location,LOC_REGISTER,def_cgsize(resultdef));
|
location_reset(location,LOC_REGISTER,def_cgsize(resultdef));
|
||||||
location.register:=cg.getintregister(current_asmdata.CurrAsmList,location.size);
|
location.register:=cg.getintregister(current_asmdata.CurrAsmList,location.size);
|
||||||
cg.a_bit_scan_reg_reg(current_asmdata.CurrAsmList,reverse,opsize,location.size,left.location.register,location.register);
|
cg.a_bit_scan_reg_reg(current_asmdata.CurrAsmList,reverse,not_zero,opsize,location.size,left.location.register,location.register);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
@ -35,7 +35,7 @@ unit cgppc;
|
|||||||
tcgppcgen = class(tcg)
|
tcgppcgen = class(tcg)
|
||||||
procedure a_loadaddr_ref_cgpara(list : TAsmList;const r : treference;const paraloc : tcgpara); override;
|
procedure a_loadaddr_ref_cgpara(list : TAsmList;const r : treference;const paraloc : tcgpara); override;
|
||||||
|
|
||||||
procedure a_bit_scan_reg_reg(list: TAsmList; reverse: boolean; srcsize, dstsize: tcgsize; src, dst: TRegister); override;
|
procedure a_bit_scan_reg_reg(list: TAsmList; reverse,not_zero: boolean; srcsize, dstsize: tcgsize; src, dst: TRegister); override;
|
||||||
|
|
||||||
procedure a_call_reg(list : TAsmList;reg: tregister); override;
|
procedure a_call_reg(list : TAsmList;reg: tregister); override;
|
||||||
|
|
||||||
@ -205,7 +205,7 @@ unit cgppc;
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure tcgppcgen.a_bit_scan_reg_reg(list: TAsmList; reverse: boolean; srcsize, dstsize: tcgsize; src, dst: TRegister);
|
procedure tcgppcgen.a_bit_scan_reg_reg(list: TAsmList; reverse,not_zero: boolean; srcsize, dstsize: tcgsize; src, dst: TRegister);
|
||||||
var
|
var
|
||||||
tmpreg: tregister;
|
tmpreg: tregister;
|
||||||
cntlzop: tasmop;
|
cntlzop: tasmop;
|
||||||
|
@ -35,7 +35,7 @@ unit cgrv;
|
|||||||
tcgrv = class(tcg)
|
tcgrv = class(tcg)
|
||||||
procedure a_loadaddr_ref_cgpara(list : TAsmList;const r : treference;const paraloc : tcgpara); override;
|
procedure a_loadaddr_ref_cgpara(list : TAsmList;const r : treference;const paraloc : tcgpara); override;
|
||||||
|
|
||||||
procedure a_bit_scan_reg_reg(list: TAsmList; reverse: boolean; srcsize, dstsize: tcgsize; src, dst: TRegister); override;
|
procedure a_bit_scan_reg_reg(list: TAsmList; reverse,not_zero: boolean; srcsize, dstsize: tcgsize; src, dst: TRegister); override;
|
||||||
|
|
||||||
procedure a_call_reg(list : TAsmList;reg: tregister); override;
|
procedure a_call_reg(list : TAsmList;reg: tregister); override;
|
||||||
procedure a_call_name(list : TAsmList;const s : string; weak: boolean); override;
|
procedure a_call_name(list : TAsmList;const s : string; weak: boolean); override;
|
||||||
@ -196,7 +196,7 @@ unit cgrv;
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure tcgrv.a_bit_scan_reg_reg(list: TAsmList; reverse: boolean; srcsize, dstsize: tcgsize; src, dst: TRegister);
|
procedure tcgrv.a_bit_scan_reg_reg(list: TAsmList; reverse,not_zero: boolean; srcsize, dstsize: tcgsize; src, dst: TRegister);
|
||||||
begin
|
begin
|
||||||
internalerror(2016060401);
|
internalerror(2016060401);
|
||||||
end;
|
end;
|
||||||
|
@ -133,7 +133,7 @@ uses
|
|||||||
procedure gen_stack_check_call(list: TAsmList); override;
|
procedure gen_stack_check_call(list: TAsmList); override;
|
||||||
|
|
||||||
{ unimplemented/unnecessary routines }
|
{ unimplemented/unnecessary routines }
|
||||||
procedure a_bit_scan_reg_reg(list: TAsmList; reverse: boolean; srcsize, dstsize: tdef; src, dst: tregister); override;
|
procedure a_bit_scan_reg_reg(list: TAsmList; reverse,not_zero: boolean; srcsize, dstsize: tdef; src, dst: tregister); override;
|
||||||
procedure a_loadmm_loc_reg(list: TAsmList; fromsize, tosize: tdef; const loc: tlocation; const reg: tregister; shuffle: pmmshuffle); override;
|
procedure a_loadmm_loc_reg(list: TAsmList; fromsize, tosize: tdef; const loc: tlocation; const reg: tregister; shuffle: pmmshuffle); override;
|
||||||
procedure a_loadmm_reg_reg(list: TAsmList; fromsize, tosize: tdef; reg1, reg2: tregister; shuffle: pmmshuffle); override;
|
procedure a_loadmm_reg_reg(list: TAsmList; fromsize, tosize: tdef; reg1, reg2: tregister; shuffle: pmmshuffle); override;
|
||||||
procedure a_loadmm_ref_reg(list: TAsmList; fromsize, tosize: tdef; const ref: treference; reg: tregister; shuffle: pmmshuffle); override;
|
procedure a_loadmm_ref_reg(list: TAsmList; fromsize, tosize: tdef; const ref: treference; reg: tregister; shuffle: pmmshuffle); override;
|
||||||
@ -2446,7 +2446,7 @@ implementation
|
|||||||
inherited;
|
inherited;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure thlcgwasm.a_bit_scan_reg_reg(list: TAsmList; reverse: boolean; srcsize, dstsize: tdef; src, dst: tregister);
|
procedure thlcgwasm.a_bit_scan_reg_reg(list: TAsmList; reverse,not_zero: boolean; srcsize, dstsize: tdef; src, dst: tregister);
|
||||||
begin
|
begin
|
||||||
internalerror(2012090201);
|
internalerror(2012090201);
|
||||||
end;
|
end;
|
||||||
|
@ -84,7 +84,7 @@ unit cgx86;
|
|||||||
procedure a_loadaddr_ref_reg(list : TAsmList;const ref : treference;r : tregister);override;
|
procedure a_loadaddr_ref_reg(list : TAsmList;const ref : treference;r : tregister);override;
|
||||||
|
|
||||||
{ bit scan instructions }
|
{ bit scan instructions }
|
||||||
procedure a_bit_scan_reg_reg(list: TAsmList; reverse: boolean; srcsize, dstsize: TCGSize; src, dst: TRegister); override;
|
procedure a_bit_scan_reg_reg(list: TAsmList; reverse,not_zero: boolean; srcsize, dstsize: TCGSize; src, dst: TRegister); override;
|
||||||
|
|
||||||
{ fpu move instructions }
|
{ fpu move instructions }
|
||||||
procedure a_loadfpu_reg_reg(list: TAsmList; fromsize, tosize: tcgsize; reg1, reg2: tregister); override;
|
procedure a_loadfpu_reg_reg(list: TAsmList; fromsize, tosize: tcgsize; reg1, reg2: tregister); override;
|
||||||
@ -2473,7 +2473,7 @@ unit cgx86;
|
|||||||
list.concat(taicpu.op_ref(TOpCG2AsmOp[op],tcgsize2opsize[size],tmpref));
|
list.concat(taicpu.op_ref(TOpCG2AsmOp[op],tcgsize2opsize[size],tmpref));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure tcgx86.a_bit_scan_reg_reg(list: TAsmList; reverse: boolean; srcsize, dstsize: TCGSize; src, dst: TRegister);
|
procedure tcgx86.a_bit_scan_reg_reg(list: TAsmList; reverse,not_zero: boolean; srcsize, dstsize: TCGSize; src, dst: TRegister);
|
||||||
var
|
var
|
||||||
tmpreg: tregister;
|
tmpreg: tregister;
|
||||||
opsize: topsize;
|
opsize: topsize;
|
||||||
|
@ -68,7 +68,7 @@ interface
|
|||||||
procedure a_cmp_reg_reg_label(list: TAsmList; size: tcgsize; cmp_op: topcmp; reg1, reg2: tregister; l: tasmlabel);override;
|
procedure a_cmp_reg_reg_label(list: TAsmList; size: tcgsize; cmp_op: topcmp; reg1, reg2: tregister; l: tasmlabel);override;
|
||||||
procedure a_jmp_always(list: TAsmList; l: TAsmLabel);override;
|
procedure a_jmp_always(list: TAsmList; l: TAsmLabel);override;
|
||||||
|
|
||||||
procedure a_bit_scan_reg_reg(list: TAsmList; reverse: boolean; srcsize, dstsize: TCGSize; src, dst: TRegister);override;
|
procedure a_bit_scan_reg_reg(list: TAsmList; reverse,not_zero: boolean; srcsize, dstsize: TCGSize; src, dst: TRegister);override;
|
||||||
|
|
||||||
procedure g_flags2reg(list: TAsmList; size: TCgSize; const f: tresflags; reg: TRegister);override;
|
procedure g_flags2reg(list: TAsmList; size: TCgSize; const f: tresflags; reg: TRegister);override;
|
||||||
|
|
||||||
@ -1320,7 +1320,7 @@ implementation
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure tcgcpu.a_bit_scan_reg_reg(list: TAsmList; reverse: boolean; srcsize, dstsize: TCGSize; src, dst: TRegister);
|
procedure tcgcpu.a_bit_scan_reg_reg(list: TAsmList; reverse,not_zero: boolean; srcsize, dstsize: TCGSize; src, dst: TRegister);
|
||||||
var
|
var
|
||||||
ai: taicpu;
|
ai: taicpu;
|
||||||
tmpreg: TRegister;
|
tmpreg: TRegister;
|
||||||
|
Loading…
Reference in New Issue
Block a user