diff options
Diffstat (limited to 'compiler/aarch64/aasmcpu.pas')
-rw-r--r-- | compiler/aarch64/aasmcpu.pas | 28 |
1 files changed, 26 insertions, 2 deletions
diff --git a/compiler/aarch64/aasmcpu.pas b/compiler/aarch64/aasmcpu.pas index 09d4606aa2..2894e233b9 100644 --- a/compiler/aarch64/aasmcpu.pas +++ b/compiler/aarch64/aasmcpu.pas @@ -157,6 +157,8 @@ uses oppostfix : TOpPostfix; procedure loadshifterop(opidx:longint;const so:tshifterop); procedure loadconditioncode(opidx: longint; const c: tasmcond); + procedure loadrealconst(opidx: longint; const _value: bestreal); + constructor op_none(op : tasmop); constructor op_reg(op : tasmop;_op1 : tregister); @@ -168,6 +170,7 @@ uses constructor op_reg_cond(op: tasmop; _op1: tregister; _op2: tasmcond); constructor op_reg_const(op:tasmop; _op1: tregister; _op2: aint); constructor op_reg_const_shifterop(op : tasmop;_op1: tregister; _op2: aint;_op3 : tshifterop); + constructor op_reg_realconst(op: tasmop; _op1: tregister; _op2: bestreal); constructor op_reg_reg_reg(op : tasmop;_op1,_op2,_op3 : tregister); constructor op_reg_reg_reg_reg(op : tasmop;_op1,_op2,_op3,_op4 : tregister); @@ -180,7 +183,6 @@ uses constructor op_reg_reg_reg_shifterop(op : tasmop;_op1,_op2,_op3 : tregister; const _op4 : tshifterop); constructor op_reg_reg_reg_cond(op : tasmop;_op1,_op2,_op3 : tregister; const _op4: tasmcond); - { this is for Jmp instructions } constructor op_cond_sym(op : tasmop;cond:TAsmCond;_op1 : tasmsymbol); @@ -280,6 +282,19 @@ implementation end; + procedure taicpu.loadrealconst(opidx:longint;const _value:bestreal); + begin + allocate_oper(opidx+1); + with oper[opidx]^ do + begin + if typ<>top_realconst then + clearop(opidx); + val_real:=_value; + typ:=top_realconst; + end; + end; + + {***************************************************************************** taicpu Constructors *****************************************************************************} @@ -382,6 +397,15 @@ implementation end; + constructor taicpu.op_reg_realconst(op : tasmop; _op1 : tregister; _op2 : bestreal); + begin + inherited create(op); + ops:=2; + loadreg(0,_op1); + loadrealconst(1,_op2); + end; + + constructor taicpu.op_reg_reg_const(op : tasmop;_op1,_op2 : tregister; _op3: aint); begin inherited create(op); @@ -528,7 +552,7 @@ implementation const { invalid sizes for aarch64 are 0 } subreg2bytesize: array[TSubRegister] of byte = - (0,0,0,0,4,8,0,0,0,4,8,0,0,0,0,0,0,0,0,0,0,0,0); + (0,0,0,0,4,8,0,0,0,4,8,0,0,0,0,0,0,0,0,0,0,0,0,8,16); var scalefactor: byte; begin |