Re: [PATCH] gcc: move assemble_start_function / assemble_end_function to output_mi_thunk

2019-05-16 Thread Max Filippov
On Wed, May 15, 2019 at 2:46 PM Richard Sandiford wrote: > > Max Filippov writes: > > Let backends call assemble_start_function after they have generated > > thunk function body so that a constant pool could be output if it is > > required. This may help backends to a

[PATCH] gcc: aarch64: move assemble_start_function / assemble_end_function

2019-05-17 Thread Max Filippov
Change that moved assemble_start_function/assemble_end_function to backends missed aarch64. Fix that. Committed as obvious. gcc/ 2019-05-17 Max Filippov * config/aarch64/aarch64.c (aarch64_output_mi_thunk): Call assemble_start_function and assemble_end_function. --- gcc

[RFC] moving assemble_start_function / assemble_end_function to output_mi_thunk

2019-01-08 Thread Max Filippov
to fix it differently? ---8<--- >From bad901880a3f9fc69726aa082e2b2c674bacca94 Mon Sep 17 00:00:00 2001 From: Max Filippov Date: Mon, 7 Jan 2019 18:22:12 -0800 Subject: [PATCH] gcc: move assemble_start_function / assemble_end_function to output_mi_thunk Let backends call assemble_start_fun

Re: [RFC] moving assemble_start_function / assemble_end_function to output_mi_thunk

2019-01-08 Thread Max Filippov
Sorry, wrong list, meant to send to g...@gcc.gnu.org -- Thanks. -- Max

Re: [RFC] moving assemble_start_function / assemble_end_function to output_mi_thunk

2019-01-11 Thread Max Filippov
On Fri, Jan 11, 2019 at 10:50 AM Jeff Law wrote: > I think this needs to defer to gcc-10 Ok, will resend when in stage1. -- Thanks. -- Max

[PATCH] xtensa: report stack usage

2016-08-26 Thread Max Filippov
This enables options -fstack-usage and -Wstack-usage. 2016-08-21 Max Filippov gcc/ * config/xtensa/xtensa.c (xtensa_expand_prologue): Update current_function_static_stack_size variable with the static stack frame size of the current function when

Re: [PATCH] xtensa: report stack usage

2016-08-26 Thread Max Filippov
On Fri, Aug 26, 2016 at 9:24 AM, augustine.sterl...@gmail.com wrote: > On Fri, Aug 26, 2016 at 12:02 AM, Max Filippov wrote: >> This enables options -fstack-usage and -Wstack-usage. >> >> 2016-08-21 Max Filippov >> gcc/ >> * config/xtensa/xtensa.c

[PATCH] Fix #line __LINE__ handling and added conformance tests.

2017-10-23 Thread Max Woodbury
>From 62ab7123e73563b43f1833842a419aa66eca7ce2 Mon Sep 17 00:00:00 2001 From: Max T Woodbury Date: Mon, 23 Oct 2017 16:58:49 -0400 Copyright 2017 Max TenEyck Woodbury, Durham North Carolina all rights assigned to the Free Software Foundation, Inc., 23 Oct 2017 The Problem: There i

[PATCH] fix PR translation/82185

2017-09-11 Thread Max Filippov
2017-09-11 Max Filippov gcc/ * expmed.c (emit_store_flag_int): Initialize rtx tem. --- gcc/expmed.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/expmed.c b/gcc/expmed.c index 7f0cb0a0ec05..945ab3d656a2 100644 --- a/gcc/expmed.c +++ b/gcc/expmed.c @@ -5601,7

[PATCH] xtensa: fix PR target/82181

2017-09-11 Thread Max Filippov
2017-09-11 Max Filippov gcc/ * config/xtensa/xtensa.c (xtensa_mem_offset): Check that both words of E_DImode object are reachable by xtensa_uimm8x4 access. --- gcc/config/xtensa/xtensa.c | 1 + 1 file changed, 1 insertion(+) diff --git a/gcc/config/xtensa/xtensa.c b/gcc/config

Re: [PATCH] xtensa: fix PR target/82181

2017-09-11 Thread Max Filippov
On Mon, Sep 11, 2017 at 2:18 PM, augustine.sterl...@gmail.com wrote: > On Mon, Sep 11, 2017 at 2:16 PM, Max Filippov wrote: >> 2017-09-11 Max Filippov >> gcc/ >> * config/xtensa/xtensa.c (xtensa_mem_offset): Check that both >> words of E_DIm

Re: [PATCH] fix PR translation/82185

2017-09-11 Thread Max Filippov
Hi Richard, On Mon, Sep 11, 2017 at 2:36 PM, Richard Sandiford wrote: > Max Filippov writes: >> 2017-09-11 Max Filippov >> gcc/ >> * expmed.c (emit_store_flag_int): Initialize rtx tem. > > LGTM, thanks, but I can't approve it. > > This makes the

[PATCH] xtensa: add support for SSP

2017-05-08 Thread Max Filippov
gcc/ 2017-03-27 Max Filippov * config/xtensa/xtensa-protos.h (xtensa_initial_elimination_offset): New declaration. * config/xtensa/xtensa.c (xtensa_initial_elimination_offset): New function. Move its body from the INITIAL_ELIMINATION_OFFSET macro

Re: [PATCH] xtensa: add support for SSP

2017-05-08 Thread Max Filippov
On Mon, May 8, 2017 at 4:24 PM, augustine.sterl...@gmail.com wrote: > On Mon, May 8, 2017 at 3:55 PM, Max Filippov wrote: >> gcc/ >> 2017-03-27 Max Filippov >> >> * config/xtensa/xtensa-protos.h >> (xtensa_initial_elimination_offset): New

[RFC 0/5] xtensa: support dynamic configuration

2017-05-22 Thread Max Filippov
data structure, initialization macros, redefines XCHAL_* macros to access this structure and declares function for loading configuration dynamically. Max Filippov (5): gcc: xtensa: allow XCHAL_* macros to be non-constant gcc: xtensa: make configuration dynamic gcc: xtensa: support dynconfig on wi

[RFC 1/5] gcc: xtensa: allow XCHAL_* macros to be non-constant

2017-05-22 Thread Max Filippov
XCHAL_* macros from the xtensa-config.h are used in a number of places that require them to be preprocessor constants. Rewrite these places so that non-constant XCHAL_* definitions could be used there. 2017-05-22 Max Filippov gcc/ * config/xtensa/xtensa.c (xtensa_option_override

[RFC 3/5] gcc: xtensa: support dynconfig on windows

2017-05-22 Thread Max Filippov
2017-05-22 Max Filippov gcc/ * config/xtensa/xtensa-config.c (dlfcn.h, windows.h): New #include'd headers. (RTLD_LAZY): New macro definition. (dlopen, dlsym, dlclose, dlerror): New function definitions. --- gcc/config/xtensa/xtensa-config.c

[RFC 2/5] gcc: xtensa: make configuration dynamic

2017-05-22 Thread Max Filippov
efine reusable function xtensa_load_config that tries to load configuration and return an address of an exported object from it. Define the function xtensa_get_config that uses xtensa_load_config to get structure xtensa_config, either dynamically configured or the default. 2017-05-22 Max Filippov

[RFC 4/5] gcc: xtensa: add __XCHAL_* builtins

2017-05-22 Thread Max Filippov
Provide essential XCHAL_* configuration parameters as __XCHAL_* built-in macros. This way it will be possible to use them in libgcc and libc without need to patch libgcc or libc source for the specific xtensa core configuration. 2017-05-22 Max Filippov gcc/ * config/xtensa/xtensa

[RFC 5/5] libgcc: xtensa: use built-in configuration

2017-05-22 Thread Max Filippov
Now that gcc provides __XCHAL_* definitions use them instead of XCHAL_* definitions from the include/xtensa-config.h. That makes libgcc dynamically configurable for the target xtensa core. 2017-05-22 Max Filippov include/ * xtensa-config-builtin.h: New File. libgcc/ * config

Re: [RFC 1/5] gcc: xtensa: allow XCHAL_* macros to be non-constant

2017-05-22 Thread Max Filippov
On Mon, May 22, 2017 at 2:30 PM, augustine.sterl...@gmail.com wrote: > On Mon, May 22, 2017 at 2:09 PM, Max Filippov wrote: >> XCHAL_* macros from the xtensa-config.h are used in a number of places >> that require them to be preprocessor constants. Rewrite these places so >&

Re: [RFC 2/5] gcc: xtensa: make configuration dynamic

2017-05-25 Thread Max Filippov
On Thu, May 25, 2017 at 11:24 AM, augustine.sterl...@gmail.com wrote: > On Mon, May 22, 2017 at 2:09 PM, Max Filippov wrote: >> Now that XCHAL_* macros don't have to be preprocessor constants add >> include/xtensa-dynconfig.h that defines them as fields of a structure

Re: [RFC 2/5] gcc: xtensa: make configuration dynamic

2017-05-26 Thread Max Filippov
On Fri, May 26, 2017 at 7:44 AM, Ian Lance Taylor wrote: > On Thu, May 25, 2017 at 1:31 PM, Max Filippov wrote: >> On Thu, May 25, 2017 at 11:24 AM, augustine.sterl...@gmail.com >> wrote: >> >>> Please note that by using a plugin mechanism, there are licensing

[PATCH] gcc: xtensa: fix fprintf format specifiers

2017-05-29 Thread Max Filippov
HOST_WIDE_INT may not be long as assumed in print_operand and xtensa_emit_call. Use HOST_WIDE_INT_PRINT_DEC/HOST_WIDE_INT_PRINT_HEX format strings instead of %ld/0x%lx. This fixes incorrect assembly code generation by the compiler running on armhf host. 2017-05-28 Max Filippov gcc

[PATCH] gcc: xtensa: fix unused parameter warning

2017-05-29 Thread Max Filippov
2017-05-28 Max Filippov gcc/ * config/xtensa/xtensa.c (xtensa_initial_elimination_offset): Mark 'to' argument with ATTRIBUTE_UNUSED. --- gcc/config/xtensa/xtensa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/config/xtensa/xtensa.c b/gcc/con

Re: [PATCH] gcc: xtensa: fix unused parameter warning

2017-05-29 Thread Max Filippov
On Mon, May 29, 2017 at 9:08 AM, augustine.sterl...@gmail.com wrote: > On Mon, May 29, 2017 at 4:11 AM, Max Filippov wrote: >> 2017-05-28 Max Filippov >> gcc/ >> * config/xtensa/xtensa.c (xtensa_initial_elimination_offset): >> Mark 'to' arg

Re: [PATCH] gcc: xtensa: fix fprintf format specifiers

2017-05-29 Thread Max Filippov
On Mon, May 29, 2017 at 9:08 AM, augustine.sterl...@gmail.com wrote: > On Mon, May 29, 2017 at 4:11 AM, Max Filippov wrote: >> HOST_WIDE_INT may not be long as assumed in print_operand and >> xtensa_emit_call. Use HOST_WIDE_INT_PRINT_DEC/HOST_WIDE_INT_PRINT_HEX >> format s

[PATCH] xtensa: add HW FPU sequences for DIV/SQRT/RECIP/RSQRT

2016-10-14 Thread Max Filippov
Use new FPU instruction sequences documented in the ISA book to implement __divsf3, __divdf3, __recipsf2, __recipdf2, __rsqrtsf2, __rsqrtdf2 and __ieee754_sqrtf and __ieee754_sqrt. 2013-02-12 Ding-Kai Chen libgcc/ * config/xtensa/ieee754-df.S (__recipdf2, __rsqrtdf2, __ieee754_s

[PATCH] xtensa: don't use unwind-dw2-fde-dip with elf targets

2016-10-17 Thread Max Filippov
Define LIB2ADDEH_XTENSA_UNWIND_DW2_FDE to unwind-dw2-fde.c in xtensa/t-elf and to unwind-dw2-fde-dip.c in xtensa/t-linux and use LIB2ADDEH_XTENSA_UNWIND_DW2_FDE in LIB2ADDEH definition. 2016-10-17 Max Filippov libgcc/ * config/xtensa/t-elf (LIB2ADDEH_XTENSA_UNWIND_DW2_FDE): New

[PATCH] xtensa: add -mpreferred-stack-boundary option

2016-10-17 Thread Max Filippov
2016-05-24 Max Filippov gcc/ * config/xtensa/xtensa.opt (mpreferred-stack-boundary=): New option. * config/xtensa/xtensa.h (STACK_BOUNDARY): Redefine as 64 for windowed ABI/32 for call0 ABI. (PREFERRED_STACK_BOUNDARY): New definition. * config

Re: [PATCH] xtensa: add HW FPU sequences for DIV/SQRT/RECIP/RSQRT

2016-10-18 Thread Max Filippov
On Tue, Oct 18, 2016 at 11:22 AM, augustine.sterl...@gmail.com wrote: > On Fri, Oct 14, 2016 at 12:14 PM, Max Filippov wrote: >> >> Use new FPU instruction sequences documented in the ISA book to >> implement __divsf3, __divdf3, __recipsf2, __recipdf2, __rsqrts

Re: [PATCH] xtensa: don't use unwind-dw2-fde-dip with elf targets

2016-10-18 Thread Max Filippov
On Tue, Oct 18, 2016 at 11:22 AM, augustine.sterl...@gmail.com wrote: > On Mon, Oct 17, 2016 at 4:23 PM, Max Filippov wrote: >> Define LIB2ADDEH_XTENSA_UNWIND_DW2_FDE to unwind-dw2-fde.c in >> xtensa/t-elf and to unwind-dw2-fde-dip.c in xtensa/t-linux and use >> LIB2ADDEH_

[PATCH] xtensa: Fix PR target/78118

2016-10-31 Thread Max Filippov
n structure. Implement predicate for the "return" pattern as a function. Don't communicate completion of epilogue generation through zeroing of xtensa_current_frame_size, add explicit epilogue_done variable to the machine_function structure. Don't update stack frame layout aft

Re: [PATCH] xtensa: Fix PR target/78118

2016-11-01 Thread Max Filippov
On Tue, Nov 1, 2016 at 9:28 AM, augustine.sterl...@gmail.com wrote: > On Mon, Oct 31, 2016 at 11:32 PM, Max Filippov wrote: >> 2016-10-26 Max Filippov >> gcc/ >> * config/xtensa/xtensa-protos.h >> (xtensa_use_return_instruction_p): New prototype.

[PATCH] xtensa: fix ICE on pr59037.c test

2016-11-01 Thread Max Filippov
handling literals of any power of 2 size not less than 4. 2016-11-01 Max Filippov gcc/ * config/xtensa/xtensa.c (xtensa_output_integer_literal_parts): New function. (xtensa_output_literal): Use xtensa_output_integer_literal_parts to format MODE_INT and MODE_PARTIAL_INT

[PATCH] xtensa: don't xfail gcc.c-torture/compile/20001226-1.c

2016-11-01 Thread Max Filippov
With jump trampolines implemented in binutils since 2.25 and enabled by default this test no longer fails on xtensa. 2016-11-01 Max Filippov gcc/testsuite/ * gcc.c-torture/compile/20001226-1.c: Don't xfail on xtensa. --- gcc/testsuite/gcc.c-torture/compile/20001226-1.c | 1 - 1

Re: [PATCH] xtensa: fix ICE on pr59037.c test

2016-11-02 Thread Max Filippov
On Wed, Nov 2, 2016 at 10:23 AM, augustine.sterl...@gmail.com wrote: > On Tue, Nov 1, 2016 at 12:11 PM, Max Filippov wrote: >> xtensa gcc gets ICE on pr59037.c test because its xtensa_output_literal >> function cannot handle integer literals of sizes other than 4 and 8, >>

Re: [PATCH] xtensa: don't xfail gcc.c-torture/compile/20001226-1.c

2016-11-02 Thread Max Filippov
On Wed, Nov 2, 2016 at 10:22 AM, augustine.sterl...@gmail.com wrote: > On Tue, Nov 1, 2016 at 12:45 PM, Max Filippov wrote: >> With jump trampolines implemented in binutils since 2.25 and enabled by >> default this test no longer fails on xtensa. >> >> 2016-11-01 Max

[PATCH] xtensa: Fix PR target/78603

2016-11-29 Thread Max Filippov
2016-11-29 Max Filippov gcc/ * config/xtensa/xtensa.c (hwloop_optimize): Don't emit zero overhead loop start between a call and its CALL_ARG_LOCATION note. --- gcc/config/xtensa/xtensa.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gcc/c

Re: [PATCH] xtensa: Fix PR target/78603

2016-11-29 Thread Max Filippov
On Tue, Nov 29, 2016 at 2:16 PM, augustine.sterl...@gmail.com wrote: > On Tue, Nov 29, 2016 at 2:08 PM, Max Filippov wrote: >> 2016-11-29 Max Filippov >> gcc/ >> * config/xtensa/xtensa.c (hwloop_optimize): Don't emit zero >> overhead l

[PATCH] xtensa: add -mauto-litpools option

2015-08-11 Thread Max Filippov
more than 256 KBytes of code. Don't turn constants into literals, instead use MOVI instruction to load them into registers and let the assembler turn them into literals as necessary. 2015-08-11 Max Filippov gcc/ * config/xtensa/constraints.md (define_constraint "Y"): New

Re: [PATCH] xtensa: add -mauto-litpools option

2015-08-12 Thread Max Filippov
On Wed, Aug 12, 2015 at 7:35 PM, augustine.sterl...@gmail.com wrote: > On Tue, Aug 11, 2015 at 6:09 PM, Max Filippov wrote: >> With support from assembler this option allows compiling huge functions, >> where single literal pool at the beginning of a function may not be >&

[PATCH 0/3] xtensa: libgcc: fixes for stack unwinding

2015-08-17 Thread Max Filippov
-cancelx21, nptl/tst-cleanupx1, nptl/tst-cleanupx3, nptl/tst-oncex3, nptl/tst-oncex4. Max Filippov (3): xtensa: reimplement register spilling xtensa: use unwind-dw2-fde-dip instead of unwind-dw2-fde xtensa: fix _Unwind_GetCFA libgcc/config/xtensa/lib2funcs.S | 30

[PATCH 1/3] xtensa: reimplement register spilling

2015-08-17 Thread Max Filippov
Spilling windowed registers in userspace is much easier, more portable, less error-prone and equally effective as in kernel. Now that register spilling syscall is considered obsolete in the xtensa linux kernel replace it with CALL12 followed by series of ENTRY in libgcc. 2015-08-18 Max Filippov

[PATCH 3/3] xtensa: fix _Unwind_GetCFA

2015-08-17 Thread Max Filippov
ontext->sp from _Unwind_GetCFA makes all CFA values valid and matching code that used them. 2015-08-18 Max Filippov libgcc/ * config/xtensa/unwind-dw2-xtensa.c (_Unwind_GetCFA): Return context->sp instead of context->cfa. --- libgcc/config/xtensa/unwind-dw2-xtensa.c

[PATCH 2/3] xtensa: use unwind-dw2-fde-dip instead of unwind-dw2-fde

2015-08-17 Thread Max Filippov
This allows having exception cleanup code in binaries that don't register their unwind tables. 2015-08-18 Max Filippov libgcc/ * config/xtensa/t-windowed (LIB2ADDEH): Replace unwind-dw2-fde with unwind-dw2-fde-dip. --- libgcc/config/xtensa/t-windowed | 2 +- 1 file chang

Re: [PATCH 1/3] xtensa: reimplement register spilling

2015-08-17 Thread Max Filippov
On Tue, Aug 18, 2015 at 3:50 AM, augustine.sterl...@gmail.com wrote: > On Mon, Aug 17, 2015 at 2:59 PM, Max Filippov wrote: >> 2015-08-18 Max Filippov >> libgcc/ >> * config/xtensa/lib2funcs.S (__xtensa_libgcc_window_spill): Use >> CALL12 followed

[PATCH 1/2] xtensa: fix TLS calls for call0 ABI

2015-09-15 Thread Max Filippov
2015-09-15 Max Filippov gcc/ * config/xtensa/xtensa.c (xtensa_call_tls_desc): Use a10 or a2 to pass TLS call argument, according to current ABI. * config/xtensa/xtensa.md (tls_call pattern): Use callx8 or callx0 for TLS call, according to current ABI. --- gcc

[PATCH 0/2] xtensa: call0 ABI fixes

2015-09-15 Thread Max Filippov
Hi Sterling, this series fixes two bugs in Xtensa call0 ABI support: callx8 unconditionally used for TLS calls and missing signal frame unwinding code for xtensa_fallback_frame_state. With these fixes uClibc testsuite results for windowed and call0 ABIs become identical. Max Filippov (2

[PATCH 2/2] xtensa: fix xtensa_fallback_frame_state for call0 ABI

2015-09-15 Thread Max Filippov
2015-09-15 Max Filippov gcc/ * config/xtensa/xtensa.h (DWARF_ALT_FRAME_RETURN_COLUMN): New definition. (DWARF_FRAME_REGISTERS): Reserve space for one extra register in call0 ABI. libgcc/ * config/xtensa/linux-unwind.h (xtensa_fallback_frame_state

[PATCH] Fix loop optimization when ZOL is not available in xtensa configuration

2014-12-29 Thread Max Filippov
12-30 Max Filippov * config/xtensa/xtensa.c (hwloop_optimize, hwloop_fail, hwloop_pattern_reg, xtensa_doloop_hooks, xtensa_reorg_loops): put under #if TARGET_LOOPS guard. --- gcc/config/xtensa/xtensa.c | 8 1 file changed, 8 insertions(+) diff --git a/gcc/c

Re: [PATCH] Fix loop optimization when ZOL is not available in xtensa configuration

2015-01-05 Thread Max Filippov
On Mon, Jan 5, 2015 at 7:21 PM, augustine.sterl...@gmail.com wrote: > [Adding Felix] > > On Mon, Dec 29, 2014 at 3:12 PM, Max Filippov wrote: >> >> Currently building gcc for xtensa configuration with XCHAL_HAVE_LOOPS >> set to 0 fails with the following error: >&

Re: Housekeeping work in backends.html

2015-01-06 Thread Max Filippov
t. Xtensa is now supported by the QEMU, so probably question mark in its 'S' slot may be removed. -- Thanks. -- Max

Re: [PATCH] xtensa: Define TARGET_DIFFERENT_ADDR_DISPLACEMENT_P target hook

2024-10-27 Thread Max Filippov
nsa.cc | 3 +++ > gcc/config/xtensa/xtensa.md | 12 ++-- > 2 files changed, 9 insertions(+), 6 deletions(-) Regtested for target=xtensa-linux-uclibc, no new regressions. Committed to master -- Thanks. -- Max

Re: [PATCH v2] xtensa: Fix the issue in "*extzvsi-1bit_addsubx"

2024-11-10 Thread Max Filippov
allocated registers that satisfy the above constraints. > --- > gcc/config/xtensa/xtensa.md | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) Regtested for target=xtensa-linux-uclibc, no new regressions. Committed to master -- Thanks. -- Max

Re: [PATCH v2 3/3] xtensa: Make large const_int legitimate during RTL instruction combination pass

2025-04-27 Thread Max Filippov
7b lra(_IO_FILE*, int) /home/jcmvbkbc/ws/tensilica/gcc/gcc/gcc/lra.cc:2636 0xbdbe77 do_reload /home/jcmvbkbc/ws/tensilica/gcc/gcc/gcc/ira.cc:5987 0xbdbe77 execute /home/jcmvbkbc/ws/tensilica/gcc/gcc/gcc/ira.cc:6175 -- Thanks. -- Max

Re: [PATCH v3] xtensa: Fix up unwanted spills of SFmode hard registers holding function arguments/returns

2025-05-11 Thread Max Filippov
retw.n > > gcc/ChangeLog: > > * config/xtensa/xtensa.cc (xtensa_register_move_cost): > Add appropriate move costs between AR_REGS and FP_REGS. > --- > gcc/config/xtensa/xtensa.cc | 28 +++++++- > 1 file changed, 19 insertions(+), 9 deletions(-) Regtested for target=xtensa-linux-uclibc, no new regressions. Committed to master. That's a nice fix, thank you Suwa-san! -- Thanks. -- Max

[COMMITTED] testsuite: xtensa: add support for effective_target_sync_*

2025-05-11 Thread Max Filippov
Add new function check_effective_target_xtensa_atomic and use it in the check_effective_target_sync_int_long and check_effective_target_sync_char_short. gcc/testsuite/ChangeLog: * lib/target-supports.exp (check_effective_target_xtensa_atomic): New function. (check_effectiv

Re: [PATCH 3/3] xtensa: Remove include of reload.h

2025-05-31 Thread Max Filippov
| 1 - > 1 file changed, 1 deletion(-) Regtested for target=xtensa-linux-uclibc, no new regressions. Committed the whole series to master with minor fixups in descriptions. -- Thanks. -- Max

Re: [PATCH] xtensa: Revert "xtensa: Eliminate unnecessary general-purpose reg-reg moves"

2025-06-15 Thread Max Filippov
arget/xtensa/elim_GP_regmove_1.c | 10 > 3 files changed, 79 deletions(-) > delete mode 100644 gcc/testsuite/gcc.target/xtensa/elim_GP_regmove_0.c > delete 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

Re: [PATCH] xtensa: Revert "xtensa: Eliminate unwanted reg-reg moves during DFmode input reloads"

2025-06-15 Thread Max Filippov
le2 pattern that was previously added. > --- > gcc/config/xtensa/predicates.md | 13 - > gcc/config/xtensa/xtensa.md | 30 -- > 2 files changed, 43 deletions(-) Regtested for target=xtensa-linux-uclibc, no new regressions. Committed to master. -- Thanks. -- Max

Re: [PATCH] xtensa: Remove TARGET_PROMOTE_FUNCTION_MODE

2025-06-21 Thread Max Filippov
On Sat, Jun 21, 2025 at 2:41 PM Max Filippov wrote: > > On Sat, Jun 21, 2025 at 2:12 PM Takayuki 'January June' Suwa > wrote: > > > > That hook has since been deprecated > > (commit a670ebde3995481225ec62b29686ec07a21e5c10) and has led to incorrect > >

Re: [PATCH] xtensa: Make use of DEPBITS instruction

2025-06-22 Thread Max Filippov
c, no new regressions. I don't have a working config with DEPBITS option, just checked that it doesn't break anything for other configs. Committed to master without the include/xtensa-config.h part. -- Thanks. -- Max

Re: [PATCH] xtensa: Remove TARGET_PROMOTE_FUNCTION_MODE

2025-06-22 Thread Max Filippov
On Sat, Jun 21, 2025 at 3:54 PM H.J. Lu wrote: > On Sun, Jun 22, 2025 at 6:35 AM Max Filippov wrote: > > On Sat, Jun 21, 2025 at 2:41 PM Max Filippov wrote: > > > On Sat, Jun 21, 2025 at 2:12 PM Takayuki 'January June' Suwa > > > wrote: > > >

Re: [PATCH] xtensa: Implement TARGET_ZERO_CALL_USED_REGS

2025-06-22 Thread Max Filippov
e changed, 56 insertions(+) Regtested for target=xtensa-linux-uclibc, no new regressions. Committed to master. -- Thanks. -- Max

Re: [PATCH] xtensa: Implement l(ceil|floor)sfsi2 insn patterns and their scaled variants

2025-06-08 Thread Max Filippov
statements. > (lsfsi2, *lsfsi2_2x, *lsfsi2_scaled): > New insn patterns. > --- > gcc/config/xtensa/xtensa.cc | 16 ++++ > gcc/config/xtensa/xtensa.md | 50 - > 2 files changed, 54 insertions(+), 12 deletions(-) Regtested for target=xtensa-linux-uclibc, no new regressions. Committed to master. -- Thanks. -- Max

Re: [PATCH] xtensa: Implement l(ceil|floor|round|)sfsi2 insn patterns and their scaled variants

2025-06-05 Thread Max Filippov
On Thu, Jun 5, 2025 at 7:20 PM Takayuki 'January June' Suwa wrote: > > On 2025/06/06 8:55, Max Filippov wrote: > > > On Thu, Jun 05, 2025 at 09:19:19PM +0900, Takayuki 'January June' Suwa > > wrote: > >> On 2025/06/05 5:09, Max Filippov wr

Re: [PATCH] xtensa: Implement l(ceil|floor|round|)sfsi2 insn patterns and their scaled variants

2025-06-05 Thread Max Filippov
On Thu, Jun 05, 2025 at 09:19:19PM +0900, Takayuki 'January June' Suwa wrote: > On 2025/06/05 5:09, Max Filippov wrote: > > On Tue, Jun 3, 2025 at 7:44 AM Takayuki 'January June' Suwa > > wrote: > > > > > > By using the previously unused

Re: [PATCH] xtensa: Remove TARGET_PROMOTE_FUNCTION_MODE

2025-06-21 Thread Max Filippov
*, int, bool, bool) gcc/expr.cc:6645 0xe8b7df expand_assignment(tree_node*, tree_node*, bool) gcc/expr.cc:6483 0xd50e9d expand_call_stmt gcc/cfgexpand.cc:3149 0xd50e9d expand_gimple_stmt_1 gcc/cfgexpand.cc:4223 0xd50e9d expand_gimple_stmt gcc/cfgexpand.cc:4370 0xd51b95 expand_gimple_basic_block gcc/cfgexpand.cc:6433 0xd53d26 execute gcc/cfgexpand.cc:7181 -- Thanks. -- Max

Re: [PATCH] xtensa: Remove TARGET_PROMOTE_FUNCTION_MODE

2025-06-22 Thread Max Filippov
On Sun, Jun 22, 2025 at 5:49 AM Takayuki 'January June' Suwa wrote: > > On 2025/06/22 6:41, Max Filippov wrote: > > On Sat, Jun 21, 2025 at 2:12 PM Takayuki 'January June' Suwa > > wrote: > >> > >> That hook has since been deprecated > &

Re: [PATCH] xtensa: Implement l(ceil|floor|round|)sfsi2 insn patterns and their scaled variants

2025-06-04 Thread Max Filippov
ointer -funroll-loops -fpeel-loops -ftracer -finline-functions execution test +FAIL: gfortran.dg/out_of_range_2.f90 -O3 -g execution test +FAIL: gfortran.dg/out_of_range_2.f90 -Os execution test At first glance they may be related to the rounding mode settings, let me take a closer look. -- Thanks. -- Max

Re: [PATCH v2] xtensa: Fix B[GE/LT]UI instructions with immediate values of 32768 or 65536 not being emitted

2025-07-08 Thread Max Filippov
s(+), 12 deletions(-) > create mode 100644 gcc/testsuite/gcc.target/xtensa/BGEUI-BLTUI-32k-64k.c Regtested for target=xtensa-linux-uclibc, no new regressions. Committed to master. -- Thanks. -- Max

[COMMITTED] xtensa: Remove TARGET_PROMOTE_PROTOTYPES

2025-07-07 Thread Max Filippov
From: "H.J. Lu" xtensa ABI requires sign extension of signed 8/16-bit arguments to 32 bits and zero extension of unsigned 8/16-bit arguments to 32 bits. TARGET_PROMOTE_PROTOTYPES is an optimization, not an ABI requirement. Remove TARGET_PROMOTE_PROTOTYPES and define xtensa_promote_function_mode t

Re: [PATCH 2/2] xtensa: Fix inaccuracy in xtensa_rtx_costs()

2025-07-22 Thread Max Filippov
n a0, sp, 12 addisp, sp, 16 ret.n which may be expected with -O2 and -O3 that enable -fstrict-aliasing. Committed to master. -- Thanks. -- Max

Re: [PATCH] xtensa: Fix remaining inaccuracies in xtensa_is_insn_L32R_p()

2025-07-27 Thread Max Filippov
gt; instructions wherever possible, and add comments that help understand > the intent of the process. > --- > gcc/config/xtensa/xtensa.cc | 46 - > 1 file changed, 35 insertions(+), 11 deletions(-) Regtested for target=xtensa-linux-uclibc, no new regressions. Committed to master. -- Thanks. -- Max

Re: [PATCH] xtensa: Refine constraint "T" to define_special_memory_constraint

2025-08-08 Thread Max Filippov
ensa/constraints.md (T): > Change define_memory_constraint to define_special_memory_constraint. > --- > gcc/config/xtensa/constraints.md | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Regtested for target=xtensa-linux-uclibc, no new regressions. Committed to master. -- Thanks. -- Max

Mardi 19 mai à 20h30 : Redémarrez à zéro

2020-05-17 Thread Max via Gcc-patches
Ne plus rien recevoir de notre part

Re: [PATCH 1/3] xtensa: Addendum of the commit e33d2dcb463161a110ac345a451132ce8b2b23d9

2023-05-26 Thread Max Filippov via Gcc-patches
sn attribute related to TARGET_DENSITY. > (*extzvsi-1bit_addsubx): Ditto. > --- > gcc/config/xtensa/xtensa.md | 11 ++- > 1 file changed, 6 insertions(+), 5 deletions(-) Regtested for target=xtensa-linux-uclibc, no new regressions. Committed to master with a more readable subject line. -- Thanks. -- Max

Re: [PATCH 2/3] xtensa: Add 'subtraction from constant' insn pattern

2023-05-26 Thread Max Filippov via Gcc-patches
ion. > * config/xtensa/xtensa.md (*subsi3_from_const): > New insn_and_split pattern. > --- > gcc/config/xtensa/constraints.md | 2 +- > gcc/config/xtensa/xtensa-protos.h | 1 + > gcc/config/xtensa/xtensa.cc | 7 +++ > gcc/config/xtensa/xtensa.md | 24 > 4 files changed, 33 insertions(+), 1 deletion(-) Regtested for target=xtensa-linux-uclibc, no new regressions. Committed to master. -- Thanks. -- Max

Re: [PATCH 3/3] xtensa: Rework 'setmemsi' insn pattern

2023-05-26 Thread Max Filippov via Gcc-patches
/config/xtensa/xtensa.md | 4 +- > 3 files changed, 172 insertions(+), 154 deletions(-) Regtested for target=xtensa-linux-uclibc, no new regressions. Committed to master. -- Thanks. -- Max

Re: [PATCH 3/3 v2] xtensa: Optimize 'cstoresi4' insn pattern

2023-05-30 Thread Max Filippov via Gcc-patches
/20070623-1.c) when an overflow occurs, e.g. for op0 == INT_MIN, op1 == INT_MAX. Maybe the dedicated instructions salt / saltu could be used in that pattern? They don't have their own XCHAL_* macros, but according to the ISA book they were introduced in RG-2015.0, which I believe could be tested as follows: #define TARGET_SALT (XTENSA_MARCH_EARLIEST >= 27) -- Thanks. -- Max

Re: [PATCH 2/3 v2] xtensa: Add 'adddi3' and 'subdi3' insn patterns

2023-05-30 Thread Max Filippov via Gcc-patches
o_op1)); > + emit_insn (gen_subsi3 (hi_dest, hi_op0, hi_op1)); > + emit_cmp_and_jump_insns (lo_op0, lo_op1, GEU, const0_rtx, > + SImode, true, label = gen_label_rtx ()); > + emit_insn (gen_addsi3 (hi_dest, hi_dest, constm1_rtx)); > + emit_label (label); > + DONE; > +}) > + > (define_insn "subsf3" >[(set (match_operand:SF 0 "register_operand" "=f") > (minus:SF (match_operand:SF 1 "register_operand" "f") > -- > 2.30.2 -- Thanks. -- Max

Re: [PATCH 1/3] xtensa: Improve "*shlrd_reg" insn pattern and its variant

2023-05-31 Thread Max Filippov via Gcc-patches
swapped. > In addition, replace use of code iterator with new operator > predicate. > (*shlrd_const, *shlrd_per_byte): > Likewise regarding the code iterator. > --- > gcc/config/xtensa/predicates.md | 3 ++ > gcc/config/xtensa/xtensa.md | 81 ++++++--- > 2 files changed, 58 insertions(+), 26 deletions(-) Regtested for target=xtensa-linux-uclibc, no new regressions. I can also confirm that the pattern is now used as expected in the case where I previously had an issue. Thanks for fixing that! Committed to master. -- Thanks. -- Max

Re: [PATCH 2/3 v3] xtensa: Add 'adddi3' and 'subdi3' insn patterns

2023-06-01 Thread Max Filippov via Gcc-patches
struc- > tion idioms described in the Xtensa ISA reference manual (p. 600). > --- > gcc/config/xtensa/xtensa.md | 52 + > 1 file changed, 52 insertions(+) Regtested for target=xtensa-linux-uclibc, no new regressions. Committed to master. -- Thanks. -- Max

Re: [PATCH 2/3 v3] xtensa: Add 'adddi3' and 'subdi3' insn patterns

2023-06-01 Thread Max Filippov via Gcc-patches
rtx_code_label *label; > + if (rtx_equal_p (operands[0], operands[1]) > + || rtx_equal_p (operands[0], operands[2]) > + || ! REG_P (operands[1]) || ! REG_P (operands[2])) I wonder if these additional conditions are necessary, given that the operands have the "register_operand" predicates? -- Thanks. -- Max

Re: [PATCH] xtensa: Optimize boolean evaluation or branching when EQ/NE to zero in S[IF]mode

2023-06-04 Thread Max Filippov via Gcc-patches
rtran build, all with the similar diagnostic: gcc/libgfortran/intrinsics/erfc_scaled_inc.c:179:1: error: unrecognizable insn: 179 | } | ^ (insn 23 22 24 2 (set (reg:CC 18 b0) (lt:CC (const_double:SF 0.0 [0x0.0p+0]) (reg/v:SF 96 [ x ]))) "gcc/libgfortran/intrinsics/erfc_scaled_inc.c":111:18 -1 (nil)) during RTL pass: vregs -- Thanks. -- Max

Re: [PATCH] xtensa: Optimize boolean evaluation or branching when EQ/NE to INT_MIN

2023-06-04 Thread Max Filippov via Gcc-patches
IN, *eqne_INT_MIN): > New insn_and_split patterns. > --- > gcc/config/xtensa/xtensa.md | 64 + > 1 file changed, 64 insertions(+) Regtested for target=xtensa-linux-uclibc, no new regressions. Committed to master. -- Thanks. -- Max

Re: [PATCH v2] xtensa: Optimize boolean evaluation or branching when EQ/NE to zero in S[IF]mode

2023-06-05 Thread Max Filippov via Gcc-patches
fig/xtensa/xtensa.md | 53 + > 3 files changed, 106 insertions(+), 9 deletions(-) This version performs much better than v1, but there's still new testsuite failure in the gcc.c-torture/execute/bitfld-3.c and the following change in the generated code from: l32i.n a11, a7, 8 l8uia9, a7, 12 movia10, 0xff add.n a9, a9, a10 addi.n a7, a11, -1 movi.n a10, 1 movi.n a6, 0 moveqz a10, a6, a11 to: l32i.n a10, a7, 8 l8uia9, a7, 12 movia11, 0xff add.n a9, a9, a11 addi.n a7, a10, -1 movi.n a11, 1 mov.n a10, a11 movnez a10, a11, a11 suggests that the pattern movsicc_ne0_reg_zero does not work correctly when its operands overlap. -- Thanks. -- Max

Re: [PATCH v2] xtensa: Optimize boolean evaluation or branching when EQ/NE to zero in S[IF]mode

2023-06-05 Thread Max Filippov via Gcc-patches
On Mon, Jun 5, 2023 at 8:15 AM Max Filippov wrote: > > Hi Suwa-san, > > On Mon, Jun 5, 2023 at 2:37 AM Takayuki 'January June' Suwa > wrote: > > > > This patch optimizes the boolean evaluation of EQ/NE against zero > > by adding two insn_and_split patte

Re: [PATCH 2/3] gcc: xtensa: use dynconfig settings as builtin-macros

2023-07-20 Thread Max Filippov via Gcc-patches
gt; +XTENSA_CPU_CPP_BUILTIN(XTENSA_MARCH_EARLIEST); > \ > +XTENSA_CPU_CPP_BUILTIN(XCHAL_HAVE_CLAMPS); > \ > +XTENSA_CPU_CPP_BUILTIN(XCHAL_HAVE_DEPBITS); > \ > +XTENSA_CPU_CPP_BUILTIN(XCHAL_HAVE_EXCLUSIVE); > \ > +XTENSA_CPU_CPP_BUILTIN(XCHAL_HAVE_XEA3); > \ >} while (0) > > #define CPP_SPEC " %(subtarget_cpp_spec) " > -- > 2.34.1 > -- Thanks. -- Max

Re: [PATCH 2/3] gcc: xtensa: use dynconfig settings as builtin-macros

2023-07-20 Thread Max Filippov via Gcc-patches
ctive values. Just notice that it adds two leading underscores in front of the names. > But the value must be set to make it work correctly. > It uses builtin_define() instead builtin_define_with_int_value() > > I will check how it could be soved with the loop approach. -- Thanks. -- Max

Re: [PATCH 2/3] gcc: xtensa: use dynconfig settings as builtin-macros

2023-07-20 Thread Max Filippov via Gcc-patches
ts for keeping backwards compatibility with the overlay-based configuration method (: I did the same for the uClibc, but the change is still in my queue: https://github.com/jcmvbkbc/uclibc-ng-xtensa/commit/842aede0537812a0d2158433c5e048ee87324075 -- Thanks. -- Max

Re: [PATCH 2/3] gcc: xtensa: use dynconfig settings as builtin-macros

2023-07-20 Thread Max Filippov via Gcc-patches
On Thu, Jul 20, 2023 at 10:45 AM Alexey Lapshin wrote: > > On Thu, 2023-07-20 at 08:25 -0700, Max Filippov wrote: > > But it defines them with their respective values. > > Just notice that it adds two leading underscores in front of the names. > > Why builtin macros

Re: [PATCH 2/3] gcc: xtensa: use dynconfig settings as builtin-macros

2023-07-20 Thread Max Filippov via Gcc-patches
als. -- Thanks. -- Max

Re: [PATCH] xtensa: Minor fix for FP constant synthesis

2022-07-14 Thread Max Filippov via Gcc-patches
n order to catch the issue. > --- > gcc/config/xtensa/xtensa.md | 35 +-- > .../gcc.target/xtensa/constsynth_double.c | 2 +- > 2 files changed, 9 insertions(+), 28 deletions(-) Regtested for target=xtensa-linux-uclibc, no new regressions. Committed to master. -- Thanks. -- Max

Re: [PATCH 1/2] xtensa: constantsynth: Make try to find shorter instruction

2022-07-16 Thread Max Filippov via Gcc-patches
the seed into a Narrow Move Immediate instruction "MOVI.N" > when the Code Density Option is configured. > --- > gcc/config/xtensa/xtensa.cc | 58 ++--- > 1 file changed, 29 insertions(+), 29 deletions(-) Regtested for target=xtensa-linux-uclibc, no new regressions. Committed to master. -- Thanks. -- Max

Re: [PATCH 2/2] xtensa: Optimize "bitwise AND with imm1" followed by "branch if (not) equal to imm2"

2022-07-16 Thread Max Filippov via Gcc-patches
ecause the comparison > expressions that don't satisfy such checks are determined as > compile-time constants and thus will be optimized away before > RTL expansion. > --- > gcc/config/xtensa/xtensa.md | 73 ++--- > 1 file changed, 44 insertions(+), 29 deletions(-) Regtested for target=xtensa-linux-uclibc, no new regressions. Committed to master. -- Thanks. -- Max

Re: [PATCH] xtensa: Correct the relative RTX cost that corresponds to the Move Immediate "MOVI" instruction

2022-07-18 Thread Max Filippov via Gcc-patches
ged, 1 insertion(+), 1 deletion(-) Regtested for target=xtensa-linux-uclibc, no new regressions. Committed to master. -- Thanks. -- Max

Re: [PATCH] xtensa: Optimize "bitwise AND NOT with imm" followed by "branch if (not) equal to zero"

2022-07-22 Thread Max Filippov via Gcc-patches
nsertions(+) Regtested for target=xtensa-linux-uclibc, no new regressions. Committed to master. -- Thanks. -- Max

Re: [PATCH 1/2] xtensa: Add RTX costs for if_then_else

2022-07-29 Thread Max Filippov via Gcc-patches
--- > gcc/config/xtensa/xtensa.cc | 1 + > 1 file changed, 1 insertion(+) Regtested for target=xtensa-linux-uclibc, no new regressions. Committed to master. -- Thanks. -- Max

<    1   2   3   4   >