diff options
Diffstat (limited to 'avx512-0037785/compiler/xtensa/cgcpu.pas')
-rw-r--r-- | avx512-0037785/compiler/xtensa/cgcpu.pas | 66 |
1 files changed, 52 insertions, 14 deletions
diff --git a/avx512-0037785/compiler/xtensa/cgcpu.pas b/avx512-0037785/compiler/xtensa/cgcpu.pas index 7c1828ee17..d0e66c52b1 100644 --- a/avx512-0037785/compiler/xtensa/cgcpu.pas +++ b/avx512-0037785/compiler/xtensa/cgcpu.pas @@ -283,7 +283,7 @@ implementation OS_32, OS_S32: op:=A_L32I; else - internalerror(2020030801); + internalerror(2020030805); end; href:=ref; @@ -688,7 +688,16 @@ implementation if LocalSize<>0 then begin a_reg_alloc(list,NR_STACK_POINTER_REG); - list.concat(taicpu.op_reg_reg_const(A_ADDI,NR_STACK_POINTER_REG,NR_STACK_POINTER_REG,-localsize)); + { not sure if 32512 is the correct value or if it can be larger } + if Localsize>32512 then + begin + reference_reset(ref,4,[]); + ref.symbol:=create_data_entry(nil,-localsize); + list.concat(taicpu.op_reg_ref(A_L32R,NR_A8,ref)); + list.concat(taicpu.op_reg_reg_reg(A_ADD,NR_STACK_POINTER_REG,NR_STACK_POINTER_REG,NR_A8)); + end + else + list.concat(taicpu.op_reg_reg_const(A_ADDI,NR_STACK_POINTER_REG,NR_STACK_POINTER_REG,-localsize)); end; reference_reset(ref,4,[]); @@ -703,8 +712,15 @@ implementation ref.base:=NR_A8; end else - { fix me! } - Internalerror(2020031101); + begin + reference_reset(ref,4,[]); + ref.symbol:=create_data_entry(nil,localsize-registerarea); + list.concat(taicpu.op_reg_ref(A_L32R,NR_A8,ref)); + list.concat(taicpu.op_reg_reg_reg(A_ADD,NR_A8,NR_A8,NR_STACK_POINTER_REG)); + reference_reset(ref,4,[]); + ref.base:=NR_A8; + ref.offset:=registerarea; + end; end; if current_procinfo.framepointer<>NR_STACK_POINTER_REG then @@ -831,8 +847,15 @@ implementation ref.base:=NR_A8; end else - { fix me! } - Internalerror(2020031102); + begin + reference_reset(ref,4,[]); + ref.symbol:=create_data_entry(nil,ref.offset); + list.concat(taicpu.op_reg_ref(A_L32R,NR_A8,ref)); + list.concat(taicpu.op_reg_reg_reg(A_ADD,NR_A8,NR_A8,NR_STACK_POINTER_REG)); + reference_reset(ref,4,[]); + ref.base:=NR_A8; + ref.offset:=0; + end; end; // restore a15 if used @@ -855,7 +878,16 @@ implementation end; // restore stack pointer - list.concat(taicpu.op_reg_reg_const(A_ADDI,NR_STACK_POINTER_REG,NR_STACK_POINTER_REG,localsize)); + { not sure if 32512 is the correct value or if it can be larger } + if Localsize>32512 then + begin + reference_reset(ref,4,[]); + ref.symbol:=create_data_entry(nil,localsize); + list.concat(taicpu.op_reg_ref(A_L32R,NR_A8,ref)); + list.concat(taicpu.op_reg_reg_reg(A_ADD,NR_STACK_POINTER_REG,NR_STACK_POINTER_REG,NR_A8)); + end + else + list.concat(taicpu.op_reg_reg_const(A_ADDI,NR_STACK_POINTER_REG,NR_STACK_POINTER_REG,localsize)); a_reg_dealloc(list,NR_STACK_POINTER_REG); end; end; @@ -904,7 +936,7 @@ implementation OC_LT: op:=C_LTZ; OC_GTE: op:=C_GEZ; else - Internalerror(2020030801); + Internalerror(2020030806); end; instr:=taicpu.op_reg_sym(A_B,reg,l); instr.condition:=op; @@ -920,7 +952,7 @@ implementation OC_LT: op:=C_LTI; OC_GTE: op:=C_GEI; else - Internalerror(2020030801); + Internalerror(2020030807); end; instr:=taicpu.op_reg_const_sym(A_B,reg,a,l); @@ -935,7 +967,7 @@ implementation OC_B: op:=C_LTUI; OC_AE: op:=C_GEUI; else - Internalerror(2020030801); + Internalerror(2020030808); end; instr:=taicpu.op_reg_const_sym(A_B,reg,a,l); @@ -1179,11 +1211,14 @@ implementation InternalError(2020032602); href:=ref; if assigned(href.symbol) or - (href.index<>NR_NO) or + ((href.index<>NR_NO) and (href.offset<>0)) or (((href.offset<0) or (href.offset>1020) or (href.offset mod 4<>0))) then fixref(list,href); - list.concat(taicpu.op_reg_ref(A_LSI,reg,href)); + if (href.base<>NR_NO) and (href.index<>NR_NO) then + list.concat(taicpu.op_reg_ref(A_LSX,reg,href)) + else + list.concat(taicpu.op_reg_ref(A_LSI,reg,href)); if fromsize<>tosize then a_loadfpu_reg_reg(list,fromsize,tosize,reg,reg); @@ -1198,11 +1233,14 @@ implementation InternalError(2020032604); href:=ref; if assigned(href.symbol) or - (href.index<>NR_NO) or + ((href.index<>NR_NO) and (href.offset<>0)) or (((href.offset<0) or (href.offset>1020) or (href.offset mod 4<>0))) then fixref(list,href); - list.concat(taicpu.op_reg_ref(A_SSI,reg,href)); + if (href.base<>NR_NO) and (href.index<>NR_NO) then + list.concat(taicpu.op_reg_ref(A_SSX,reg,href)) + else + list.concat(taicpu.op_reg_ref(A_SSI,reg,href)); end; |