mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-09 00:08:12 +02:00
* Xtensa: tcgcpu.g_concatcopy makes use of loop extensions if available
git-svn-id: trunk@46781 -
This commit is contained in:
parent
451bb09e8f
commit
8ef6372340
@ -1053,15 +1053,28 @@ implementation
|
||||
tmpreg1 := GetIntRegister(list, OS_INT);
|
||||
a_load_const_reg(list, OS_INT, Count, countreg);
|
||||
current_asmdata.getjumplabel(lab);
|
||||
a_label(list, lab);
|
||||
list.concat(taicpu.op_reg_ref(A_L32I, tmpreg1, src));
|
||||
list.concat(taicpu.op_reg_ref(A_S32I, tmpreg1, dst));
|
||||
list.concat(taicpu.op_reg_reg_const(A_ADDI, src.base, src.base, 4));
|
||||
list.concat(taicpu.op_reg_reg_const(A_ADDI, dst.base, dst.base, 4));
|
||||
list.concat(taicpu.op_reg_reg_const(A_ADDI, countreg, countreg, -1));
|
||||
a_cmp_const_reg_label(list,OS_INT,OC_NE,0,countreg,lab);
|
||||
if CPUXTENSA_HAS_LOOPS in cpu_capabilities[current_settings.cputype] then
|
||||
begin
|
||||
list.concat(taicpu.op_reg_sym(A_LOOP, countreg, lab));
|
||||
list.concat(taicpu.op_reg_ref(A_L32I, tmpreg1, src));
|
||||
list.concat(taicpu.op_reg_ref(A_S32I, tmpreg1, dst));
|
||||
list.concat(taicpu.op_reg_reg_const(A_ADDI, src.base, src.base, 4));
|
||||
list.concat(taicpu.op_reg_reg_const(A_ADDI, dst.base, dst.base, 4));
|
||||
a_label(list, lab);
|
||||
end
|
||||
else
|
||||
begin
|
||||
a_label(list, lab);
|
||||
list.concat(taicpu.op_reg_ref(A_L32I, tmpreg1, src));
|
||||
list.concat(taicpu.op_reg_ref(A_S32I, tmpreg1, dst));
|
||||
list.concat(taicpu.op_reg_reg_const(A_ADDI, src.base, src.base, 4));
|
||||
list.concat(taicpu.op_reg_reg_const(A_ADDI, dst.base, dst.base, 4));
|
||||
list.concat(taicpu.op_reg_reg_const(A_ADDI, countreg, countreg, -1));
|
||||
a_cmp_const_reg_label(list,OS_INT,OC_NE,0,countreg,lab);
|
||||
{ keep the registers alive }
|
||||
list.concat(taicpu.op_reg_reg(A_MOV,countreg,countreg));
|
||||
end;
|
||||
{ keep the registers alive }
|
||||
list.concat(taicpu.op_reg_reg(A_MOV,countreg,countreg));
|
||||
list.concat(taicpu.op_reg_reg(A_MOV,src.base,src.base));
|
||||
list.concat(taicpu.op_reg_reg(A_MOV,dst.base,dst.base));
|
||||
len := len mod 4;
|
||||
|
@ -139,7 +139,8 @@ Const
|
||||
CPUXTENSA_HAS_SEXT,
|
||||
CPUXTENSA_HAS_BOOLEAN_OPTION,
|
||||
CPUXTENSA_HAS_MUL32HIGH,
|
||||
CPUXTENSA_HAS_DIV
|
||||
CPUXTENSA_HAS_DIV,
|
||||
CPUXTENSA_HAS_LOOPS
|
||||
);
|
||||
|
||||
tfpuflags =
|
||||
@ -153,7 +154,7 @@ Const
|
||||
(
|
||||
{ cpu_none } [],
|
||||
{ cpu_lx106 } [],
|
||||
{ cpu_lx6 } [CPUXTENSA_REGWINDOW, CPUXTENSA_HAS_SEXT, CPUXTENSA_HAS_BOOLEAN_OPTION, CPUXTENSA_HAS_MUL32HIGH, CPUXTENSA_HAS_DIV]
|
||||
{ cpu_lx6 } [CPUXTENSA_REGWINDOW, CPUXTENSA_HAS_SEXT, CPUXTENSA_HAS_BOOLEAN_OPTION, CPUXTENSA_HAS_MUL32HIGH, CPUXTENSA_HAS_DIV, CPUXTENSA_HAS_LOOPS]
|
||||
);
|
||||
|
||||
fpu_capabilities : array[tfputype] of set of tfpuflags =
|
||||
|
Loading…
Reference in New Issue
Block a user