|
@@ -63,7 +63,7 @@ unit cgcpu;
|
|
|
|
|
|
procedure a_load_subsetreg_reg(list : TAsmList; subsetsize: tcgsize;
|
|
procedure a_load_subsetreg_reg(list : TAsmList; subsetsize: tcgsize;
|
|
tosize: tcgsize; const sreg: tsubsetregister; destreg: tregister); override;
|
|
tosize: tcgsize; const sreg: tsubsetregister; destreg: tregister); override;
|
|
- procedure a_load_subsetreg_subsetreg(list: TAsmlist; fromsubsetsize, tosubsetsize: tcgsize; const fromsreg, tosreg: tsubsetregister); override;
|
|
|
|
|
|
+ procedure a_load_subsetreg_subsetreg(list: TAsmlist; fromsubsetsize, tosubsetsize: tcgsize; const fromsreg, tosreg: tsubsetregister); override;
|
|
|
|
|
|
{ comparison operations }
|
|
{ comparison operations }
|
|
procedure a_cmp_const_reg_label(list : TAsmList;size : tcgsize;cmp_op : topcmp;a : aint;reg : tregister;
|
|
procedure a_cmp_const_reg_label(list : TAsmList;size : tcgsize;cmp_op : topcmp;a : aint;reg : tregister;
|
|
@@ -85,13 +85,10 @@ unit cgcpu;
|
|
|
|
|
|
procedure g_concatcopy(list : TAsmList;const source,dest : treference;len : aint);override;
|
|
procedure g_concatcopy(list : TAsmList;const source,dest : treference;len : aint);override;
|
|
|
|
|
|
- procedure g_overflowcheck(list: TAsmList; const l: tlocation; def: tdef); override;
|
|
|
|
{ find out whether a is of the form 11..00..11b or 00..11...00. If }
|
|
{ find out whether a is of the form 11..00..11b or 00..11...00. If }
|
|
{ that's the case, we can use rlwinm to do an AND operation }
|
|
{ that's the case, we can use rlwinm to do an AND operation }
|
|
function get_rlwi_const(a: aint; var l1, l2: longint): boolean;
|
|
function get_rlwi_const(a: aint; var l1, l2: longint): boolean;
|
|
|
|
|
|
- procedure a_jmp_cond(list : TAsmList;cond : TOpCmp;l: tasmlabel);
|
|
|
|
-
|
|
|
|
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;
|
|
|
|
|
|
protected
|
|
protected
|
|
@@ -123,11 +120,6 @@ unit cgcpu;
|
|
procedure a_load_store(list:TAsmList;op: tasmop;reg:tregister;
|
|
procedure a_load_store(list:TAsmList;op: tasmop;reg:tregister;
|
|
ref: treference); override;
|
|
ref: treference); override;
|
|
|
|
|
|
- { creates the correct branch instruction for a given combination }
|
|
|
|
- { of asmcondflags and destination addressing mode }
|
|
|
|
- procedure a_jmp(list: TAsmList; op: tasmop;
|
|
|
|
- c: tasmcondflag; crval: longint; l: tasmlabel);
|
|
|
|
-
|
|
|
|
function save_regs(list : TAsmList):longint;
|
|
function save_regs(list : TAsmList):longint;
|
|
procedure restore_regs(list : TAsmList);
|
|
procedure restore_regs(list : TAsmList);
|
|
end;
|
|
end;
|
|
@@ -148,9 +140,6 @@ const
|
|
A_DIVWU,A_DIVW, A_MULLW,A_MULLW,A_NONE,A_NONE,
|
|
A_DIVWU,A_DIVW, A_MULLW,A_MULLW,A_NONE,A_NONE,
|
|
A_ORIS,A_NONE, A_NONE,A_NONE,A_SUBIS,A_XORIS);
|
|
A_ORIS,A_NONE, A_NONE,A_NONE,A_SUBIS,A_XORIS);
|
|
|
|
|
|
- TOpCmp2AsmCond: Array[topcmp] of TAsmCondFlag = (C_NONE,C_EQ,C_GT,
|
|
|
|
- C_LT,C_GE,C_LE,C_NE,C_LE,C_LT,C_GE,C_GT);
|
|
|
|
-
|
|
|
|
implementation
|
|
implementation
|
|
|
|
|
|
uses
|
|
uses
|
|
@@ -769,13 +758,6 @@ const
|
|
end;
|
|
end;
|
|
|
|
|
|
|
|
|
|
- procedure tcgppc.a_jmp_cond(list : TAsmList;cond : TOpCmp;l: tasmlabel);
|
|
|
|
-
|
|
|
|
- begin
|
|
|
|
- a_jmp(list,A_BC,TOpCmp2AsmCond[cond],0,l);
|
|
|
|
- end;
|
|
|
|
-
|
|
|
|
-
|
|
|
|
procedure tcgppc.a_jmp_name(list : TAsmList;const s : string);
|
|
procedure tcgppc.a_jmp_name(list : TAsmList;const s : string);
|
|
var
|
|
var
|
|
p : taicpu;
|
|
p : taicpu;
|
|
@@ -1794,28 +1776,6 @@ const
|
|
end;
|
|
end;
|
|
|
|
|
|
|
|
|
|
- procedure tcgppc.g_overflowcheck(list: TAsmList; const l: tlocation; def: tdef);
|
|
|
|
- var
|
|
|
|
- hl : tasmlabel;
|
|
|
|
- begin
|
|
|
|
- if not(cs_check_overflow in current_settings.localswitches) then
|
|
|
|
- exit;
|
|
|
|
- current_asmdata.getjumplabel(hl);
|
|
|
|
- if not ((def.typ=pointerdef) or
|
|
|
|
- ((def.typ=orddef) and
|
|
|
|
- (torddef(def).ordtype in [u64bit,u16bit,u32bit,u8bit,uchar,
|
|
|
|
- bool8bit,bool16bit,bool32bit,bool64bit]))) then
|
|
|
|
- begin
|
|
|
|
- list.concat(taicpu.op_reg(A_MCRXR,NR_CR7));
|
|
|
|
- a_jmp(list,A_BC,C_NO,7,hl)
|
|
|
|
- end
|
|
|
|
- else
|
|
|
|
- a_jmp_cond(list,OC_AE,hl);
|
|
|
|
- a_call_name(list,'FPC_OVERFLOW');
|
|
|
|
- a_label(list,hl);
|
|
|
|
- end;
|
|
|
|
-
|
|
|
|
-
|
|
|
|
procedure tcgppc.g_intf_wrapper(list: TAsmList; procdef: tprocdef; const labelname: string; ioffset: longint);
|
|
procedure tcgppc.g_intf_wrapper(list: TAsmList; procdef: tprocdef; const labelname: string; ioffset: longint);
|
|
|
|
|
|
procedure loadvmttor11;
|
|
procedure loadvmttor11;
|
|
@@ -2116,20 +2076,6 @@ const
|
|
end;
|
|
end;
|
|
|
|
|
|
|
|
|
|
- procedure tcgppc.a_jmp(list: TAsmList; op: tasmop; c: tasmcondflag;
|
|
|
|
- crval: longint; l: tasmlabel);
|
|
|
|
- var
|
|
|
|
- p: taicpu;
|
|
|
|
-
|
|
|
|
- begin
|
|
|
|
- p := taicpu.op_sym(op,l);
|
|
|
|
- if op <> A_B then
|
|
|
|
- create_cond_norm(c,crval,p.condition);
|
|
|
|
- p.is_jmp := true;
|
|
|
|
- list.concat(p)
|
|
|
|
- end;
|
|
|
|
-
|
|
|
|
-
|
|
|
|
procedure tcg64fppc.a_op64_reg_reg(list : TAsmList;op:TOpCG;size : tcgsize;regsrc,regdst : tregister64);
|
|
procedure tcg64fppc.a_op64_reg_reg(list : TAsmList;op:TOpCG;size : tcgsize;regsrc,regdst : tregister64);
|
|
begin
|
|
begin
|
|
a_op64_reg_reg_reg(list,op,size,regsrc,regdst,regdst);
|
|
a_op64_reg_reg_reg(list,op,size,regsrc,regdst,regdst);
|