nsa-linux-uclibc, no new regressions.
Committed to master.
--
Thanks.
-- Max
a_constantsynth_2insn):
> Add new pattern for the abovementioned case.
> ---
> gcc/config/xtensa/xtensa.cc | 12 ++--
> 1 file changed, 10 insertions(+), 2 deletions(-)
Regtested for target=xtensa-linux-uclibc, no new regressions.
Committed to master.
--
Thanks.
-- Max
inux-uclibc, no new regressions.
Committed to master.
--
Thanks.
-- Max
ed, 1 insertion(+), 1 deletion(-)
Regtested for target=xtensa-linux-uclibc, no new regressions.
Committed to master.
--
Thanks.
-- Max
clibc, no new regressions.
Committed to master.
--
Thanks.
-- Max
; + int array[1]; /* requires large stack. */
> + foo();
> + asm volatile("" : : "m"(array));
> + return a;
> +}
> +
> +/* register A15 is the reservoir of the stack pointer and cannot be
> eliminated if the frame pointer is needed.
> + other registers still can be, but through the frame pointer rather the
> stack pointer. */
> +int test2(int a) {
> + int* p = __builtin_alloca(16);
> + foo();
> + asm volatile("" : : "r"(p));
> + return a;
> +}
> +
> +/* in -O0 the composite hard registers may still remain unsplitted at
> pro_and_epilogue and must be excluded. */
> +extern double bar(void);
> +int __attribute__((optimize(0))) test3(int a) {
> + return bar() + a;
> +}
> +
> +/* { dg-final { scan-assembler-times "mov\t|mov.n\t" 21 } } */
This test looks quite fragile as the number of movs would vary
when the testsuite is run with additional options.
> +/* { dg-final { scan-assembler-times "a15, 8" 2 } } */
> --
> 2.30.2
--
Thanks.
-- Max
clibc, no new regressions.
Committed to master.
--
Thanks.
-- Max
gcc/
PR target/108876
* config/xtensa/xtensa.cc (xtensa_expand_epilogue): Drop emit_use
for A0_REG.
* config/xtensa/xtensa.md (sibcall, sibcall_internal)
(sibcall_value, sibcall_value_internal): Add 'use' expression
for A0_REG.
---
gcc/config/xtensa/
xtensa/xtensa.md | 12 ++--
> 1 file changed, 6 insertions(+), 6 deletions(-)
Regtested for target=xtensa-linux-uclibc, no new regressions.
Committed to master.
--
Thanks.
-- Max
same place as (return) in the normal call).
> * config/xtensa/xtensa.md
> (sibcall, sibcall_internal, sibcall_value, sibcall_value_internal):
> Revert changes by the previous patch.
> ---
> gcc/config/xtensa/xtensa.cc | 4 +++-
> gcc/config/xtensa/xtensa.md | 20 +++-
> 2 files changed, 10 insertions(+), 14 deletions(-)
I've reverted my fix and committed this fix minus the revert.
--
Thanks.
-- Max
In commit b2ef02e8cbbaf95fee98be255f697f47193960ec, the sibling call
insn included (use (reg:SI A0_REG)) to fix the problem, which added
a USE chain unconditionally to the data flow of register A0 during
the sibling call.
As a result, df_regs_ever_live_p (A0_REG) returns true, so even if
register
This reverts commit b2ef02e8cbbaf95fee98be255f697f47193960ec.
---
gcc/config/xtensa/xtensa.cc | 2 ++
gcc/config/xtensa/xtensa.md | 20 +++-
2 files changed, 9 insertions(+), 13 deletions(-)
diff --git a/gcc/config/xtensa/xtensa.cc b/gcc/config/xtensa/xtensa.cc
index 5c1c713e122d
es of gcc internal
> headers rather than "" style which is used everywhere else
> in gcc?
No real reason for either. I'll fix it.
Thanks for your review.
-- Max
+++
> .../gcc.target/xtensa/elim_GP_regmove_0.c | 23 ++
> .../gcc.target/xtensa/elim_GP_regmove_1.c | 10
> 3 files changed, 79 insertions(+)
> create mode 100644 gcc/testsuite/gcc.target/xtensa/elim_GP_regmove_0.c
> create mode 100644 gcc/testsuite/gcc.target/xtensa/elim_GP_regmove_1.c
Regtested for target=xtensa-linux-uclibc, no new regressions.
Committed to master.
--
Thanks.
-- Max
sa/elim_callee_saved.c | 37 +
> 2 files changed, 146 insertions(+), 25 deletions(-)
> create mode 100644 gcc/testsuite/gcc.target/xtensa/elim_callee_saved.c
Regtested for target=xtensa-linux-uclibc, no new regressions.
Committed to master.
--
Thanks.
-- Max
On Thu, Feb 23, 2023 at 1:35 AM Max Filippov wrote:
>
> On Wed, Feb 22, 2023 at 7:42 PM Takayuki 'January June' Suwa
> wrote:
> >
> > In commit b2ef02e8cbbaf95fee98be255f697f47193960ec, the sibling call
> > insn included (use (reg:SI A0_REG)) to fix the
gcc/
* config/xtensa/xtensa-dynconfig.cc (config.h, system.h)
(coretypes.h, diagnostic.h, intl.h): Use "..." instead of <...>
for the gcc-internal headers.
---
gcc/config/xtensa/xtensa-dynconfig.cc | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git
gcc/
* config/xtensa/t-xtensa (xtensa-dynconfig.o): Use $(COMPILE)
and $(POSTCOMPILE) instead of manual dependency listing.
* config/xtensa/xtensa-dynconfig.c: Rename to ...
* config/xtensa/xtensa-dynconfig.cc: ... this.
---
gcc/config/xtensa/t-xtensa
gcc/
PR target/108919
* config/xtensa/xtensa-protos.h
(xtensa_prepare_expand_call): Rename to xtensa_expand_call.
* config/xtensa/xtensa.cc (xtensa_prepare_expand_call): Rename
to xtensa_expand_call.
(xtensa_expand_call): Emit the call and add a clob
Hi Suwa-san,
On Sat, Feb 25, 2023 at 3:33 AM Takayuki 'January June' Suwa
wrote:
> On 2023/02/25 19:01, Max Filippov wrote:
> > diff --git a/gcc/config/xtensa/xtensa.cc b/gcc/config/xtensa/xtensa.cc
> > index e52fba082550..babe7f0ebd68 100644
> > --- a/gcc/config
gcc/
PR target/108919
* config/xtensa/xtensa-protos.h
(xtensa_prepare_expand_call): Rename to xtensa_expand_call.
* config/xtensa/xtensa.cc (xtensa_prepare_expand_call): Rename
to xtensa_expand_call.
(xtensa_expand_call): Emit the call and add a clob
's a chapter "Added instructions" at the end of the xtensa ISA book with
the list of such opcodes.
--
Thanks.
-- Max
gcc/
* config/xtensa/xtensa-dynconfig.cc (xtensa_get_config_v2)
(xtensa_get_config_v3): New functions.
include/
* xtensa-dynconfig.h (xtensa_config_v3): New struct.
(xtensa_get_config_v3): New declaration.
(XCHAL_HAVE_CLAMPS, XCHAL_HAVE_DEPBITS, XCHAL_HAVE_E
sa/xtensa-protos.h | 1 +
> gcc/config/xtensa/xtensa.cc | 13 +++
> gcc/config/xtensa/xtensa.h| 1 +
> gcc/config/xtensa/xtensa.md | 37 +++
> 4 files changed, 52 insertions(+)
Regtested for target=xtensa-linux-uclibc, no new regressions.
Committed to master.
--
Thanks.
-- Max
gcc/
* config/xtensa/xtensa.h (STRICT_ALIGNMENT): Make it 0 when the
hardware supports both unaligned loads and stores.
---
gcc/config/xtensa/xtensa.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/gcc/config/xtensa/xtensa.h b/gcc/config/xtensa/xtensa.h
index
gcc/
* config/xtensa/xtensa-dynconfig.cc (xtensa_get_config_v4): New
function.
include/
* xtensa-dynconfig.h (xtensa_config_v4): New struct.
(XCHAL_DATA_WIDTH, XCHAL_UNALIGNED_LOAD_EXCEPTION)
(XCHAL_UNALIGNED_STORE_EXCEPTION, XCHAL_UNALIGNED_LOAD_HW)
G_OK_STRICT, REG_OK_FOR_INDEX_P,
> REG_OK_FOR_BASE_P): Remove.
> ---
> gcc/config/xtensa/xtensa.h | 11 +--
> 1 file changed, 1 insertion(+), 10 deletions(-)
Regtested for target=xtensa-linux-uclibc, no new regressions.
Committed to master.
--
Thanks.
-- Max
gcc/
* config/xtensa/linux.h (TARGET_ASM_FILE_END): New macro.
libgcc/
* config/xtensa/crti.S: Add .note.GNU-stack section on linux.
* config/xtensa/crtn.S: Likewise.
* config/xtensa/lib1funcs.S: Likewise.
* config/xtensa/lib2funcs.S: Likewise.
---
gcc/conf
IL: c-c++-common/torture/builtin-arith-overflow-p-14.c -O2 execution test
+FAIL: c-c++-common/torture/builtin-arith-overflow-p-14.c -O2 -flto
-fno-use-linker-plugin -flto-partition=none execution test
+FAIL: c-c++-common/torture/builtin-shufflevector-1.c -O2 -flto
-fuse-linker-plugin -fno-fat-lto-objects execution test
--
Thanks.
-- Max
xecution test
+FAIL: gcc.dg/torture/pr97812.c -O2 -flto -fno-use-linker-plugin
-flto-partition=none execution test
+FAIL: gcc.dg/torture/pr97812.c -O2 -flto -fuse-linker-plugin
-fno-fat-lto-objects execution test
+FAIL: gcc.dg/tree-ssa/pr84969.c execution test
and some more in the gfortran testsuite.
--
Thanks.
-- Max
at do not fit into signed 12 bits in the
> patterns added above.
> ---
> gcc/config/xtensa/predicates.md | 3 ++
> gcc/config/xtensa/xtensa.cc | 3 +-
> gcc/config/xtensa/xtensa.md | 75 +
> 3 files changed, 80 insertions(+), 1 deletion(-)
This change introduces a bunch of test failures on big endian configuration.
I believe that's because the starting bit position for zero_extract is counted
from different ends depending on the endianness.
--
Thanks.
-- Max
On Mon, May 22, 2023 at 10:48 PM Takayuki 'January June' Suwa
wrote:
>
> On 2023/05/23 11:27, Max Filippov wrote:
> > Hi Suwa-san,
>
> Hi!
>
> > This change introduces a bunch of test failures on big endian configuration.
> > I believe that's becau
ge to also accept '*subx' pattern.
> (*subx): Remove.
> ---
> gcc/config/xtensa/xtensa.md | 31 +--
> 1 file changed, 13 insertions(+), 18 deletions(-)
Regtested for target=xtensa-linux-uclibc, no new regressions.
Committed to master.
--
Thanks.
-- Max
On Mon, Sep 12, 2022 at 8:00 PM Takayuki 'January June' Suwa
wrote:
> On 2022/09/13 4:34, Max Filippov wrote:
> > On Sun, Sep 11, 2022 at 1:50 PM Takayuki 'January June' Suwa
> > wrote:
> >>
> >> This patch implements new target hook TA
Suwa-san, could you please take a look?
This change fixes the fowllowing testsuite failures when building for
call0 ABI:
g++.dg/ipa/pr60640-4.C
g++.dg/ipa/pr83549.C
g++.dg/ipa/pr83667.C
g++.dg/torture/pr81812.C
gcc/
* config/xtensa/xtensa.cc (xtensa_can_output_mi_thunk)
(xtensa_o
gcc/
* config/xtensa/xtensa.cc (TARGET_MAX_ANCHOR_OFFSET): New
definition.
---
gcc/config/xtensa/xtensa.cc | 3 +++
1 file changed, 3 insertions(+)
diff --git a/gcc/config/xtensa/xtensa.cc b/gcc/config/xtensa/xtensa.cc
index e5abd356a745..828c7642b7cb 100644
--- a/gcc/config/xtens
On Tue, Sep 13, 2022 at 2:58 PM Max Filippov wrote:
>
> Suwa-san, could you please take a look?
>
> This change fixes the fowllowing testsuite failures when building for
> call0 ABI:
>
> g++.dg/ipa/pr60640-4.C
> g++.dg/ipa/pr83549.C
> g++.dg/ipa/pr83667.C
> g+
only on
call0 configuration:
+FAIL: gcc.c-torture/execute/20010122-1.c -O1 execution test
+FAIL: gcc.c-torture/execute/20010122-1.c -O2 execution test
+FAIL: gcc.c-torture/execute/20010122-1.c -O3 -g execution test
+FAIL: gcc.c-torture/execute/20010122-1.c -Os execution test
+FAIL: gcc.c-torture/execute/20010122-1.c -O2 -flto
-fno-use-linker-plugin -flto-partition=none execution test
--
Thanks.
-- Max
On Mon, Oct 17, 2022 at 7:57 PM Takayuki 'January June' Suwa
wrote:
> On 2022/10/16 14:03, Max Filippov wrote:
> > There's also the following runtime failures, but only on call0
> > configuration:
> >
> > +FAIL: gcc.c-torture/execute/20010122-1.c -O
Hi Suwa-san,
v2 fixes the regressions caused by ICEs, but not the runtime failures.
On Mon, Oct 17, 2022 at 8:14 PM Max Filippov wrote:
> On Mon, Oct 17, 2022 at 7:57 PM Takayuki 'January June' Suwa
> wrote:
> > On 2022/10/16 14:03, Max Filippov wrote:
> > > The
--
> gcc/config/xtensa/xtensa.h| 8 ++--
> gcc/config/xtensa/xtensa.md | 36
> gcc/config/xtensa/xtensa.opt | 4 ++
> 7 files changed, 99 insertions(+), 24 deletions(-)
Regtested for target=xtensa-linux-uclibc, no new regressions.
Committed to master after fixing the changelog.
--
Thanks.
-- Max
ctions execution
test
FAIL: g++.dg/coroutines/torture/co-yield-04-complex-local-state.C
-O3 -fomit-frame-pointer -funroll-loops -fpeel-loops -ftracer
-finline-functions execution test
FAIL: g++.dg/coroutines/torture/local-var-05-awaitable.C -O3
-fomit-frame-pointer -funroll-loops -fpeel-loops -ftracer
-finline-functions execution test
--
Thanks.
-- Max
g-call functions, in order to prevent misleading that
> register A0 is free to use.
> ---
> gcc/config/xtensa/xtensa.cc | 14 ++
> 1 file changed, 10 insertions(+), 4 deletions(-)
Regtested for target=xtensa-linux-uclibc, no new regressions.
Committed to master.
--
Thanks.
-- Max
> gcc/ChangeLog:
>
> * config/xtensa/xtensa.md (movdi):
> Copy operands[0...1] to ops[0...3] and then use the latter before
> calling xtensa_split_DI_reg_imm() and emitting insns.
> ---
> gcc/config/xtensa/xtensa.md | 7 ---
> 1 file changed, 4 insertions(+), 3 deletions(-)
Committed to master as obvious after cleaning up
the commit message.
--
Thanks.
-- Max
n/config/xtensa/xtensa-common.cc
> (xtensa_option_optimization_table): Add OPT_fsplit_wide_types_early
> for OPT_LEVELS_ALL in order to restore pre-GCC10 behavior.
> ---
> gcc/common/config/xtensa/xtensa-common.cc | 2 ++
> 1 file changed, 2 insertions(+)
Regtested for target=xtensa-linux-uclibc, no new regressions.
Committed to master.
--
Thanks.
-- Max
build with the following error:
undefined reference to `__addsi3'
E.g. gcc.c-torture/execute/2519-1.c
or gcc.c-torture/execute/20070919-1.c
--
Thanks.
-- Max
gt; >stack_pointer_rtx,
> >GEN_INT (offset)));// offset can
> > be zero!
> > }
Oh, nice catch! I'll post a patch that adds a check for non-zero offset here.
--
Thanks.
-- Max
iteral value conditions of that instruction
> when the CALL0 ABI is used.
> (xtensa_expand_epilogue): Ditto.
> And also inhibit the stack pointer addition of constant zero.
> ---
> gcc/config/xtensa/xtensa.cc | 79 +++++
> 1 file changed, 54 insertions(+), 25 deletions(-)
Regtested for target=xtensa-linux-uclibc, no new regressions.
Committed to master.
--
Thanks.
-- Max
> gcc/config/xtensa/constraints.md | 5
> gcc/config/xtensa/xtensa.h | 3 +++
> gcc/config/xtensa/xtensa.md| 29 ++
> gcc/testsuite/gcc.target/xtensa/sibcalls.c | 5
> 4 files changed, 15 insertions(+), 27 deletions(-)
Regtested for target=xtensa-linux-uclibc, no new regressions.
Committed to master.
--
Thanks.
-- Max
gt_ggc_mx_die_struct(void*)
./gt-dwarf2out.h:47
0xa470d7 gt_ggc_mx_die_struct(void*)
./gt-dwarf2out.h:27
0xa470d7 gt_ggc_mx_die_struct(void*)
./gt-dwarf2out.h:47
0xa470d7 gt_ggc_mx_die_struct(void*)
./gt-dwarf2out.h:27
--
Thanks.
-- Max
gcc/
* config/xtensa/linux.h (LINK_SPEC): Add static-pie.
---
gcc/config/xtensa/linux.h | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/gcc/config/xtensa/linux.h b/gcc/config/xtensa/linux.h
index 540e4bf538f8..bc7bee71517d 100644
--- a/gcc/config/xtensa/linux.h
+++
inor issue here: this change introduces a new regression
in the following test:
g++.dg/opt/pr100469.C
AFAICS it generates different code with and without the '-g' option: no
stack modification without -g, but adjustment in prologue and epilogue
with -g.
--
Thanks.
-- Max
t; ---
> gcc/config/xtensa/xtensa.cc | 164 ++--
> 1 file changed, 80 insertions(+), 84 deletions(-)
Regtested for target=xtensa-linux-uclibc, no new regressions.
Committed to master.
--
Thanks.
-- Max
d | 67 +
> 1 file changed, 45 insertions(+), 22 deletions(-)
Regtested for target=xtensa-linux-uclibc, no new regressions.
Committed to master.
--
Thanks.
-- Max
>
> * gcc.target/xtensa/constsynth_3insns.c (test_4):
> Add new test function.
> ---
> gcc/config/xtensa/xtensa.cc | 31 +++
> .../gcc.target/xtensa/constsynth_3insns.c | 11 +++
> 2 files changed, 42 insertions(+)
Regtested for target=xtensa-linux-uclibc, no new regressions.
Committed to master.
--
Thanks.
-- Max
xtensa may use up to 4 registers to return a value from a function, but
recognition of only one register in the xtensa_function_value_regno_p
and missing untyped_call pattern result in that only one register is
saved by the __builtin_apply and returned by the __builtin_apply_return.
gcc/
*
ions(+), 3 deletions(-)
Regtested for target=xtensa-linux-uclibc, no new regressions.
Committed to master.
--
Thanks.
-- Max
extv, extv_internal, extzv and
> extzv_internal, respectively.
> ---
> gcc/config/xtensa/xtensa.md | 16
> 1 file changed, 8 insertions(+), 8 deletions(-)
Regtested for target=xtensa-linux-uclibc, no new regressions.
Committed to master.
--
Thanks.
-- Max
ut does not.
It should be fixed in the kernel.
Committed to master.
--
Thanks.
-- Max
2021-09-07 Takayuki 'January June' Suwa
gcc/
PR target/102115
* config/xtensa/xtensa.c (xtensa_emit_move_sequence): Add
'CONST_INT_P (src)' to the condition of the block that tries to
eliminate literal when loading integer contant.
---
gcc/config/xtensa/xtensa.c
2021-09-14 Max Filippov
gcc/
PR target/102336
* config/xtensa/t-xtensa (TM_H): Add include/xtensa-config.h.
---
gcc/config/xtensa/t-xtensa | 1 +
1 file changed, 1 insertion(+)
diff --git a/gcc/config/xtensa/t-xtensa b/gcc/config/xtensa/t-xtensa
index 973815c8c2d6
ive, and thus the warning.
> > I think xtensa doesn't have 2G hard registers and so it is ok to just cast
> > it to int.
> >
> > Verified just by making sure the warnings go away in a cross, ok for trunk?
> >
> > 2021-06-02 Jakub Jelinek
> >
> > PR target/100841
> > * config/xtensa/xtensa.h (LEAF_REG_REMAP): Cast REGNO to int to avoid
> > -Wtype-limits warnings.
> > (DWARF_FRAME_REGISTER): Rewrite into ternary operator with addition
> > in operands to avoid -Wsign-compare warnings.
> OK.
> jeff
Looks good to me. Thank you!
-- Max
sa/xtensa.md | 105 ++-
> 7 files changed, 133 insertions(+), 127 deletions(-)
I've split it into independent parts and applied to master.
--
Thanks.
-- Max
From: Takayuki 'January June' Suwa
gcc/ChangeLog:
* config/xtensa/xtensa.md (set_frame_ptr): Fix to reflect
TARGET_DENSITY.
---
gcc/config/xtensa/xtensa.md | 7 +--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/gcc/config/xtensa/xtensa.md b/gcc/config/xtensa/
From: Takayuki 'January June' Suwa
gcc/ChangeLog:
* config/xtensa/xtensa.h (GP_RETURN, GP_RETURN_REG_COUNT):
Change to GP_RETURN_FIRST and GP_RETURN_LAST, respectively.
* config/xtensa/xtensa.cc (xtensa_function_value,
xtensa_libcall_value, xtensa_function_value_r
From: Takayuki 'January June' Suwa
gcc/ChangeLog:
* config/xtensa/xtensa.cc (xtensa_expand_prologue): Modify to
exit the inspection loops as soon as the necessity of stack
pointer is found.
---
gcc/config/xtensa/xtensa.cc | 10 --
1 file changed, 8 insertions(+),
This improves RTL dumps readability. No functional changes.
gcc/
* config/xtensa/xtensa.md (unspec): Extract UNSPEC_* constants
into this enum.
(unspecv): Extract UNSPECV_* constants into this enum.
---
gcc/config/xtensa/xtensa.md | 46 -
From: Takayuki 'January June' Suwa
Cosmetic and no functional changes.
gcc/ChangeLog:
* config/xtensa/elf.h: Tabify, and trim trailing spaces.
* config/xtensa/linux.h: Likewise.
* config/xtensa/uclinux.h: Likewise.
* config/xtensa/xtensa-dynconfig.c: Likewise.
> gcc/config/xtensa/xtensa.cc | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Regtested for target=xtensa-linux-uclibc, no new regressions.
Committed to master.
--
Thanks.
-- Max
gcc/
* config/xtensa/xtensa.cc (xtensa_return_in_memory): Use
GP_RETURN_* instead of magic constant.
---
gcc/config/xtensa/xtensa.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gcc/config/xtensa/xtensa.cc b/gcc/config/xtensa/xtensa.cc
index e726a115029f..ae4
4ab2: b0c112 addia1, a1, -80
...
+4abf: 20c112 addia1, a1, 32
+4ac2: f00dret.n
I.e. a1 is first moved into the parent stack frame, then back to the right
spot. This does not look correct, especially for bare-metal targets.
--
Thanks.
-- Max
your investigation, but it may be better to
> withdraw the patch.
The issue was in the unwinding code in the libgcc_s.so. I haven't figured
out the exact mechanism, but found that emitting a separate note for each
a1 change fixes it.
--
Thanks.
-- Max
hange:
textdata bss dec hex filename
7062530 635340 286400 7984270 79d48e vmlinux
generic_kc705_defconfig with the change:
textdata bss dec hex filename
7064078 635340 286400 7985818 79da9a vmlinux
--
Thanks.
-- Max
And also change to try reusing the content of scratch register
> A9 if the register is not modified in the function body.
> ---
> gcc/config/xtensa/xtensa.cc | 151 +---
> 1 file changed, 106 insertions(+), 45 deletions(-)
Regtested for target=xtensa-linux-uclibc, no new regressions.
Committed to master.
--
Thanks.
-- Max
ft = floor_log2 (INTVAL (operands[3]) + 1);
> + operands[3] = GEN_INT (shift);
> + operands[4] = GEN_INT (32 - shift);
> + operands[5] = gen_reg_rtx (SImode);
> + operands[6] = gen_reg_rtx (SImode);
> +}
> + [(set_attr "type""arith")
> + (set_attr "mode""SI")
> + (set (attr "length")
> + (if_then_else (match_test "TARGET_DENSITY
> + && (INTVAL (operands[3]) == 0x7FFF
> + || INTVAL (operands[4]) ==
> 0x7FFF)")
> + (const_int 11)
> + (const_int 12)))])
I wonder how the length could be 11 here? I always see 4 3-byte
instructions generated by this pattern.
--
Thanks.
-- Max
ed for target=xtensa-linux-uclibc, no new regressions.
Committed to master.
--
Thanks.
-- Max
angeLog:
>
> * config/xtensa/xtensa.cc (xtensa_insn_cost):
> Let insn cost for size be obtained by applying COSTS_N_INSNS()
> to instruction length and then dividing by 3.
> ---
> gcc/config/xtensa/xtensa.cc | 11 +++
> 1 file changed, 7 insertions(+), 4 deletions(-)
Regtested for target=xtensa-linux-uclibc, no new regressions.
Committed to master.
--
Thanks.
-- Max
+--
> 1 file changed, 9 insertions(+), 2 deletions(-)
Regtested for target=xtensa-linux-uclibc, no new regressions.
Committed to master.
--
Thanks.
-- Max
> gcc/config/xtensa/xtensa.md | 8
> 1 file changed, 4 insertions(+), 4 deletions(-)
Regtested for target=xtensa-linux-uclibc, no new regressions.
Committed to master.
--
Thanks.
-- Max
| 51 ++--
> 3 files changed, 31 insertions(+), 99 deletions(-)
Regtested for target=xtensa-linux-uclibc, no new regressions.
Committed to master.
--
Thanks.
-- Max
- mov.n a15, sp
+ s32i.n sp, sp, 0
sub sp, sp, a10
mov.n a6, sp
mov.n a12, a6
@@ -59,11 +58,10 @@
addi.n a2, a2, 4
bne a12, a13, .L6
.L1:
- mov.n sp, a15
+ l32i.n sp, sp, 0
l32i.n a0, sp, 12
l32i.n a12, sp, 8
l32i.n a13, sp, 4
- l32i.n a15, sp, 0
addisp, sp, 16
ret.n
.size foo, .-foo
--
Thanks.
-- Max
SN(rtx_def*)
gcc/gcc/rtl.h:1493
0x7c448d BLOCK_FOR_INSN(rtx_def*)
gcc/gcc/rtl.h:1509
0x7c448d gen_peephole2_4(rtx_insn*, rtx_def**)
gcc/gcc/config/xtensa/xtensa.md:3102
0xe1cce2 peephole2_optimize
gcc/gcc/recog.cc:4180
0xe1cce2 rest_of_handle_peephole2
gcc/gcc/recog.cc:4331
0xe1cce2 execute
gcc/gcc/recog.cc:4368
--
Thanks.
-- Max
1.c -Os (test for excess errors)
+FAIL: gcc.dg/torture/pr42878-1.c -O2 -flto -fno-use-linker-plugin
-flto-partition=none (test for excess errors)
E.g. check the following test with -g0 and -g:
gcc/cc1 gcc/testsuite/gcc.dg/torture/pr42878-1.c -mlongcalls
-mtext-section-literals -fdiagnostics-plain-output -O3
-fomit-frame-pointer -funroll-loops -fpeel-loops -ftracer
-finline-functions
--
Thanks.
-- Max
.c -Os execution test
FAIL: gcc.dg/torture/tls/thr-init-2.c -O2 -fpic execution test
FAIL: gcc.dg/torture/tls/thr-init-2.c -O3 -g -fpic execution test
FAIL: gcc.dg/torture/tls/thr-init-2.c -Os -fpic execution test
FAIL: gcc.dg/torture/tls/thr-init-2.c -O2 -fPIC execution test
FAIL: gcc.dg/torture/tls/thr-init-2.c -O3 -g -fPIC execution test
FAIL: gcc.dg/torture/tls/thr-init-2.c -Os -fPIC execution test
--
Thanks.
-- Max
0xd1bd77 df_scan_verify()
gcc/gcc/df-scan.cc:4246
0xd06ca7 df_verify()
gcc/gcc/df-core.cc:1818
0xd06ca7 df_analyze_1
gcc/gcc/df-core.cc:1214
0x1a7287c if_convert
gcc/gcc/ifcvt.cc:5858
0x1a73ddd execute
gcc/gcc/ifcvt.cc:6026
--
Thanks.
-- Max
sa.md | 26 +-
> 1 file changed, 25 insertions(+), 1 deletion(-)
Regtested for target=xtensa-linux-uclibc, no new regressions.
Committed to master.
--
Thanks.
-- Max
_LEND:
l32ra9, .LC12
add.n sp, sp, a9
l32i.n a0, sp, 12
l32i.n a12, sp, 8
addisp, sp, 16
ret.n
the stack pointer is modified after saving callee-saved registers,
but the stack offset where a2 is stored and reloaded does not take
this into an account.
After having this many attempts and getting to the issues that are
really hard to detect I wonder if the target backend is the right place
for this optimization?
--
Thanks.
-- Max
_def const*, char const*, int, char const*)
gcc/gcc/rtl-error.cc:108
0x6c3297 _fatal_insn_not_found(rtx_def const*, char const*, int, char const*)
gcc/gcc/rtl-error.cc:116
0x6b4735 extract_constrain_insn(rtx_insn*)
gcc/gcc/recog.cc:2692
0xe1f67e copyprop_hardreg_forward_1
gcc/gcc/regcprop.cc:826
0xe20a0f execute
gcc/gcc/regcprop.cc:1408
--
Thanks.
-- Max
minua2, a2, a9
> ret.n
ISTM that test1 could be done with movnez in the same two instructions:
movi a9, 1
movnez a2, a9, a2
--
Thanks.
-- Max
On Tue, Sep 5, 2023 at 9:24 PM Takayuki 'January June' Suwa
wrote:
> On 2023/09/06 8:01, Max Filippov wrote:
> > On Tue, Sep 5, 2023 at 2:29 AM Takayuki 'January June' Suwa
> > wrote:
> >> ;; after (prereq. TARGET_MINMAX)
> >> test0:
&
a.cc | 43 +++--
> gcc/config/xtensa/xtensa.md | 34 -----
> 2 files changed, 37 insertions(+), 40 deletions(-)
Regtested for target=xtensa-linux-uclibc, no new regressions.
Committed to master.
--
Thanks.
-- Max
gcc/
* config/xtensa/predicates.md (xtensa_cstoresi_operator): Add
unsigned comparisons.
* config/xtensa/xtensa.cc (xtensa_expand_scc): Add code
generation of salt/saltu instructions.
* config/xtensa/xtensa.h (TARGET_SALT): New macro.
* gcc/config/xte
registers.
> * config/xtensa/xtensa.md (*eqne_INT_MIN): Ditto.
> (eq_zero_NSA, eqne_zero, *eqne_zero_masked_bits): New patterns.
> ---
> gcc/config/xtensa/xtensa.cc | 35 +--
> gcc/config/xtensa/xtensa.md | 112
> 2 files changed, 113 insertions(+), 34 deletions(-)
Regtested for target=xtensa-linux-uclibc, no new regressions.
Committed to master.
--
Thanks.
-- Max
gcc/
* config/xtensa/predicates.md (xtensa_cstoresi_operator): Add
unsigned comparisons.
* config/xtensa/xtensa.cc (xtensa_expand_scc): Add code
generation of salt/saltu instructions.
* config/xtensa/xtensa.h (TARGET_SALT): New macro.
* config/xtensa/
Patterns zero_extendhisi2, zero_extendqisi2 and extendhisi2_internal can
load value from memory, but they don't treat volatile memory correctly.
Add %v1 before load instructions to emit 'memw' instruction when
-mserialize-volatile is in effect.
2020-04-13 Max Filippov
gcc/
On Tue, Apr 14, 2020 at 4:40 PM augustine.sterl...@gmail.com
wrote:
>
> On Mon, Apr 13, 2020 at 4:39 PM Max Filippov wrote:
> > 2020-04-13 Max Filippov
> > gcc/
> > * config/xtensa/xtensa.md (zero_extendhisi2, zero_extendqisi2)
> > (extendhisi2
This fixes 'non-delegitimized UNSPEC 3 found in variable location' notes
issued when building libraries which interferes with running tests.
2020-05-24 Max Filippov
gcc/
* config/xtensa/xtensa.c (xtensa_delegitimize_address): New
function.
(TARGET_DELEGITIMI
On Wed, May 27, 2020 at 4:35 PM augustine.sterl...@gmail.com
wrote:
>
> On Tue, May 26, 2020 at 11:43 AM Max Filippov wrote:
> >
> > This fixes 'non-delegitimized UNSPEC 3 found in variable location' notes
> > issued when building libraries which interferes with
2020-12-14 Max Filippov
gcc/
* config/xtensa/predicates.md (addsubx_operand): Change accepted
values from 2/4/8 to 1..3.
* config/xtensa/xtensa.md (*addx, *subx): Change RTL pattern
to use 'ashift' instead of 'mult'. Update operands[3] v
From: Takayuki 'January June' Suwa
2020-12-16 Takayuki 'January June' Suwa
gcc/
* config/xtensa/xtensa.c (xtensa_emit_move_sequence): Try to
replace 'l32r' with 'movi' + 'slli' when optimizing for size.
* config/xtensa/xtensa.md (movdi): Split loading DI mode constant
201 - 300 of 365 matches
Mail list logo