RFC ThreadSanitizer tests

2013-12-04 Thread max
-05 Max Ostapenko * c-c++-common/tsan: New folder with tests added. * lib/tsan-dg.exp: New testfiles. * gcc.dg/tsan/tsan.exp: New testfiles. * g++.dg/dg.exp: Add tsan directory to the list of folders that are handled specially. diff --git a/gcc/testsuite/c-c

[COMMITTED] gcc: xtensa: fix salt/saltu version check

2023-10-28 Thread Max Filippov
gcc/ * config/xtensa/xtensa.h (TARGET_SALT): Change HW version from 26 (which corresponds to RF-2014.0) to 27 (which corresponds to RG-2015.0, the release where salt/saltu opcodes were introduced). --- gcc/config/xtensa/xtensa.h | 2 +- 1 file changed, 1 ins

[PATCH] gcc: xtensa: reorder movsi_internal patterns for better code generation during LRA

2024-03-14 Thread Max Filippov
After switching to LRA xtensa backend generates the following code for saving/loading registers: movi a9, 0x190 add a9, a9, sp s32i.n a3, a9, 0 instead of the shorter and more efficient s32i a3, a9, 0x190 E.g. the following code can be used to reproduce it: i

[PATCH] libgcc: arm: fix build for FDPIC target

2024-03-22 Thread Max Filippov
libgcc/ * unwind-arm-common.inc (__gnu_personality_sigframe_fdpic): Cast last argument of _Unwind_VRS_Set to void *. --- libgcc/unwind-arm-common.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libgcc/unwind-arm-common.inc b/libgcc/unwind-arm-common.inc inde

Re: [PATCH] xtensa: Add supplementary split pattern for "*addsubx"

2024-03-22 Thread Max Filippov
, so it is easy to solve by defining that pattern. > > gcc/ChangeLog: > > * config/xtensa/xtensa.md: Add new split pattern described above. > --- > gcc/config/xtensa/xtensa.md | 14 ++ > 1 file changed, 14 insertions(+) Regtested for target=xtensa-linux-uclibc, no new regressions. Committed to master. -- Thanks. -- Max

Re: [PATCH] libgcc: arm: fix build for FDPIC target

2024-03-25 Thread Max Filippov
On Fri, Mar 22, 2024 at 1:15 PM Max Filippov wrote: > > libgcc/ > * unwind-arm-common.inc (__gnu_personality_sigframe_fdpic): Cast > last argument of _Unwind_VRS_Set to void *. > --- > libgcc/unwind-arm-common.inc | 2 +- > 1 file changed, 1 insertion(+),

Re: [PATCH 1/2] xtensa: Recover constant synthesis for HImode after LRA transition

2024-02-03 Thread Max Filippov
812 0x1c08b57 decompose_multiword_subregs /home/jcmvbkbc/ws/tensilica/gcc/gcc/gcc/lower-subreg.cc:1569 0x1c09d7d execute /home/jcmvbkbc/ws/tensilica/gcc/gcc/gcc/lower-subreg.cc:1834 -- Thanks. -- Max

Re: [PATCH 1/2 v2] xtensa: Recover constant synthesis for HImode after LRA transition

2024-02-04 Thread Max Filippov
gcc/config/xtensa/xtensa.md | 22 ++ > 1 file changed, 14 insertions(+), 8 deletions(-) Regtested for target=xtensa-linux-uclibc, no new regressions. Committed to master. -- Thanks. -- Max

Re: [PATCH 2/2] xtensa: Fix missing mode warning in "*eqne_zero_masked_bits"

2024-02-04 Thread Max Filippov
1 file changed, 1 insertion(+), 1 deletion(-) Regtested for target=xtensa-linux-uclibc, no new regressions. Committed to master. -- Thanks. -- Max

Re: [PATCH] xtensa: Make full transition to LRA

2024-01-23 Thread Max Filippov
Hi Suwa-san, I've finally processed the new issues introduced by this change. On Wed, May 10, 2023 at 2:10 AM Max Filippov wrote: > On Mon, May 8, 2023 at 6:38 AM Takayuki 'January June' Suwa > wrote: > > > > gcc/ChangeLog: > > > >

[PATCH v2] xtensa: Make full transition to LRA

2024-01-23 Thread Max Filippov
From: Takayuki 'January June' Suwa gcc/ChangeLog: * config/xtensa/constraints.md (R, T, U): Change define_constraint to define_memory_constraint. * config/xtensa/predicates.md (move_operand): Don't check that a constant pool operand size is a multiple of UNITS_PER

[COMMITTED] xtensa: Make full transition to LRA

2024-01-30 Thread Max Filippov
From: Takayuki 'January June' Suwa gcc/ChangeLog: * config/xtensa/constraints.md (R, T, U): Change define_constraint to define_memory_constraint. * config/xtensa/predicates.md (move_operand): Don't check that a constant pool operand size is a multiple of UNITS_PER

Re: [RFC 1/2] libbacktrace: add FDPIC support

2024-07-13 Thread Max Filippov
On Wed, Jul 10, 2024 at 12:49 PM Ian Lance Taylor wrote: > On Sun, May 26, 2024 at 11:51 PM Max Filippov wrote: > > diff --git a/libbacktrace/internal.h b/libbacktrace/internal.h > > index 4fa0af8cb6c9..456911166026 100644 > > --- a/libbacktrace/internal.h > > ++

Re: [RFC 1/2] libbacktrace: add FDPIC support

2024-07-15 Thread Max Filippov
On Mon, Jul 15, 2024 at 10:21:18AM -0700, Ian Lance Taylor wrote: > Can you see whether this patch works for FDPIC support? This is based > on your patch but has various changes. Thanks. Yes, it is working. -- Thanks. -- Max

[RFC 2/2] libstdc++-v3/src/libbacktrace: add -funwind-tables

2024-05-26 Thread Max Filippov
libstdc++-v3/ * src/libbacktrace/Makefile.am (AM_CFLAGS, AM_CXXFLAGS): Add -funwind-tables * src/libbacktrace/Makefile.in: Regenerate. --- libstdc++-v3/src/libbacktrace/Makefile.am | 4 ++-- libstdc++-v3/src/libbacktrace/Makefile.in | 4 ++-- 2 files changed, 4 insertions(

[RFC 0/2] libbacktrace: add FDPIC support

2024-05-26 Thread Max Filippov
bc. Adding -funwind-tables to the libstdc++ version of libbacktrace fixed that. Which makes me wonder how it works for other architectures? Max Filippov (2): libbacktrace: add FDPIC support libstdc++-v3/src/libbacktrace: add -funwind-tables libbacktrace/dwarf.c

[RFC 1/2] libbacktrace: add FDPIC support

2024-05-26 Thread Max Filippov
Instead of a single base address FDPIC ELF files use load map: a structure with an array of mappings for individual segments. Change libbacktrace functions and structures to support that. libbacktrace/ PR libbacktrace/114941 * dwarf.c: Include or if available. (struct d

Re: [RFC 0/2] libbacktrace: add FDPIC support

2024-05-27 Thread Max Filippov
See PR libstdc++/111641 for details. There's a patch in > there, too. Oh, cool, thanks for the pointer Rainer. So patch 2 of this series can be disregarded. -- Thanks. -- Max

Re: [PATCH 1/2] xtensa: Use REG_P(), MEM_P(), etc. instead of comparing GET_CODE()

2024-05-30 Thread Max Filippov
ig/xtensa/xtensa.md | 4 +- > 3 files changed, 51 insertions(+), 53 deletions(-) Regtested for target=xtensa-linux-uclibc, no new regressions. Committed to master. For some reason neither git am nor patch -p1 could apply this patch, so I did that manually. -- Thanks. -- Max

Re: [PATCH 2/2] xtensa: Use epilogue_completed rather than cfun->machine->epilogue_done

2024-05-30 Thread Max Filippov
h | 1 - > gcc/config/xtensa/xtensa.cc | 14 -- > gcc/config/xtensa/xtensa.md | 5 - > 3 files changed, 4 insertions(+), 16 deletions(-) Regtested for target=xtensa-linux-uclibc, no new regressions. Committed to master. -- Thanks. -- Max

Re: [PATCH 1/2] xtensa: Simplify several MD templates

2024-05-31 Thread Max Filippov
(-) Regtested for target=xtensa-linux-uclibc, no new regressions. Committed to master. Suwa-san, something has changed in your mail setup apparently: every patch context line now gets an extra space in the beginning. Could you please fix that? -- Thanks. -- Max

Re: [PATCH 2/2] xtensa: Prepend "(use A0_REG)" to sibling call CALL_INSN_FUNCTION_USAGE instead of emitting it as insn at the end of epilogue

2024-05-31 Thread Max Filippov
.h | 4 ++-- > gcc/config/xtensa/xtensa.cc | 16 ++-- > gcc/config/xtensa/xtensa.md | 13 +++-- > 3 files changed, 19 insertions(+), 14 deletions(-) Regtested for target=xtensa-linux-uclibc, no new regressions. Committed to master. -- Thanks. -- Max

Re: [RFC 1/2] libbacktrace: add FDPIC support

2024-06-11 Thread Max Filippov
On Sun, May 26, 2024 at 11:50 PM Max Filippov wrote: > > Instead of a single base address FDPIC ELF files use load map: a > structure with an array of mappings for individual segments. Change > libbacktrace functions and structures to support that. Ping? > libbacktrace/

Re: [PATCH] xtensa: constantsynth: Reforge to fix some non-fatal issues

2024-06-17 Thread Max Filippov
./gt-ipa-prop.h:39 0xc99b58 gt_ggc_mx(ipa_return_value_summary*&) ./gt-ipa-prop.h:62 -- Thanks. -- Max

Re: [PATCH v2] xtensa: constantsynth: Reforge to fix some non-fatal issues

2024-06-19 Thread Max Filippov
s mentioned above, > and add new patterns for when TARGET_AUTO_LITPOOLS is enabled. > --- > gcc/config/xtensa/xtensa-protos.h | 2 +- > gcc/config/xtensa/xtensa.cc | 75 --- > gcc/config/xtensa/xtensa.md | 56 ++- > 3 files changed, 103 insertions(+), 30 deletions(-) Regtested for target=xtensa-linux-uclibc, no new regressions. Committed to master. -- Thanks. -- Max

Re: [PATCH] xtensa: Eliminate double MEMW insertions for volatile memory

2024-06-19 Thread Max Filippov
Regtested for target=xtensa-linux-uclibc, no new regressions. Committed to master. -- Thanks. -- Max

[COMMITTED] gcc: xtensa: disable late-combine by default

2024-07-29 Thread Max Filippov
gcc/ * config/xtensa/xtensa.cc (xtensa_option_override_after_change): New function. (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define as xtensa_option_override_after_change. (xtensa_option_override): Call xtensa_option_override_after_change. --- gcc/con

Re: [PATCH v2 2/3] xtensa: Make use of std::swap where appropriate

2024-07-29 Thread Max Filippov
tensa-linux-uclibc, no new regressions. Committed to master -- Thanks. -- Max

Re: [PATCH 3/3] xtensa: Make use of scaled [U]FLOAT/TRUNC.S instructions

2024-07-29 Thread Max Filippov
(floatsisf2): Change from "floatsisf2". > (*floatsisf2_scaled): New insn definition. > --- > gcc/config/xtensa/predicates.md | 20 > gcc/config/xtensa/xtensa.md | 58 ++--- > 2 files changed, 66 insertions(+), 12 deletions(-) Regtested for target=xtensa-linux-uclibc, no new regressions. Committed to master -- Thanks. -- Max

Re: [PATCH v2 1/3] xtensa: Resurrect LEAF_REGISTERS and LEAF_REG_REMAP

2024-07-29 Thread Max Filippov
> +extern const char xtensa_leaf_regs[FIRST_PSEUDO_REGISTER]; > +#define LEAF_REGISTERS xtensa_leaf_regs > + > +/* For Xtensa, no remapping is necessary, but this macro must be > + defined if LEAF_REGISTERS is defined. */ > +#define LEAF_REG_REMAP(REGNO) ((int) (REGNO)) > + > /* Internal macros to classify a register number. */ > > /* 16 address registers + fake registers */ > -- > 2.39.2 -- Thanks. -- Max

Re: [PATCH] xtensa: Fix the regression introduce by abe81aa19f250516fd57f76cad9c0920cce221bc

2024-07-29 Thread Max Filippov
A0_REG)' after calling > xtensa_expand_epilogue. > --- > gcc/config/xtensa/xtensa-protos.h | 2 +- > gcc/config/xtensa/xtensa.cc | 10 +- > gcc/config/xtensa/xtensa.md | 9 + > 3 files changed, 7 insertions(+), 14 deletions(-) Regtested for target=xtensa-linux-uclibc, no new regressions. Committed to master -- Thanks. -- Max

Re: [PATCH 1/2] xtensa: Fix suboptimal loading of pooled constant value into hardware single-precision FP register

2024-07-29 Thread Max Filippov
rder alternative that corresponds to L32R machine instruction, > and prefix alternatives that correspond to LSI/SSI instructions > with the constraint character '^' so that they are disparaged by > reload/LRA. Regtested for target=xtensa-linux-uclibc, no new regressions. Committed to master -- Thanks. -- Max

Re: [PATCH 2/2] xtensa: Add missing speed cost for TYPE_FARITH in TARGET_INSN_COST

2024-07-29 Thread Max Filippov
d a case statement for TYPE_FARITH. Regtested for target=xtensa-linux-uclibc, no new regressions. Committed to master -- Thanks. -- Max

[PATCH] xtensa: fix libgcc build with --text-section-literals

2016-02-16 Thread Max Filippov
Functions __muldf3_aux, __divdf3_aux, __mulsf3_aux and __divsf3_aux don't start with leaf_entry, so they need explicit .literal_position, otherwise libgcc build fails in the presence of --text-section-literals. 2016-02-17 Max Filippov libgcc/ * config/xtensa/ieee754-df.S (__muldf

Re: [PATCH] xtensa: fix libgcc build with --text-section-literals

2016-02-17 Thread Max Filippov
On Wed, Feb 17, 2016 at 10:59 PM, augustine.sterl...@gmail.com wrote: > On Tue, Feb 16, 2016 at 4:35 PM, Max Filippov wrote: >> Functions __muldf3_aux, __divdf3_aux, __mulsf3_aux and __divsf3_aux >> don't start with leaf_entry, so they need explicit .literal_position, >&

Re: [PATCH] Postpone __LINE__ evaluation to the end of #line directives

2013-11-27 Thread Max Woodbury
From 6c95593f684c120a0ea7ef6178401283f63250b7 Mon Sep 17 00:00:00 2001 From: Max TenEyck Woodbury Date: Sun, 24 Nov 2013 09:48:09 -0500 Subject: [PATCH] Postpone __LINE__ evaluation to the end of #line directives To: gcc-patches@gcc.gnu.org Copyright 2013 assigned to the Free Software

Re: [PATCH] Postpone __LINE__ evaluation to the end of #line directives

2013-11-27 Thread Max Woodbury
On 11/27/2013 05:46 AM, Marek Polacek wrote:> On Wed, Nov 27, 2013 at 05:29:22AM -0500, mtewoodb...@gmail.com wrote: >> From: Max TenEyck Woodbury > > This patch is badly missing a description. You also want to mention > the PR number, if this fixes a bug. I guess this is to

Re: [PATCH] Postpone __LINE__ evaluation to the end of #line directives

2013-11-27 Thread Max Woodbury
On 11/27/2013 04:10 PM, Joseph S. Myers wrote: On further consideration, I'm not convinced there's a bug here at all; I don't think it's sufficiently defined in the standard what the current token is for the purposes of line numbering when __LINE__ gets expanded to be able to say that one or the

Fwd: Re: [PATCH] Postpone __LINE__ evaluation to the end of #line directives

2013-11-28 Thread Max Woodbury
Original Message Subject: Re: [PATCH] Postpone __LINE__ evaluation to the end of #line directives Date: Thu, 28 Nov 2013 17:32:41 -0500 From: Max Woodbury To: Joseph S. Myers On 11/28/2013 11:34 AM, Joseph S. Myers wrote: On Wed, 27 Nov 2013, Max Woodbury wrote: There

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

2015-09-15 Thread Max Filippov
On Tue, Sep 15, 2015 at 9:21 PM, augustine.sterl...@gmail.com wrote: > On Tue, Sep 15, 2015 at 3:00 AM, Max Filippov wrote: >> 2015-09-15 Max Filippov >> gcc/ >> * config/xtensa/xtensa.c (xtensa_call_tls_desc): Use a10 or a2 >> to pass TLS call arg

[PATCH] xtensa: add uclinux support

2015-09-30 Thread Max Filippov
2015-09-30 Max Filippov gcc/ * config.gcc (xtensa*-*-uclinux*): New configuration. * config/xtensa/uclinux.h: New file. * config/xtensa/uclinux.opt: New file. libgcc/ * config.host (xtensa*-*-uclinux*): New configuration. --- gcc/config.gcc| 5

Re: [PATCH] xtensa: add uclinux support

2015-10-03 Thread Max Filippov
On Sat, Oct 3, 2015 at 6:19 PM, augustine.sterl...@gmail.com wrote: > On Wed, Sep 30, 2015 at 8:23 AM, Max Filippov wrote: >> 2015-09-30 Max Filippov >> gcc/ >> * config.gcc (xtensa*-*-uclinux*): New configuration. >> * config/xtensa/uclinux.h: Ne

blinds and shades

2020-03-26 Thread max xie
Hi My Friend, Hope you everything is well. Now the Coronavirus has spread very seriously, please take care, If you need other support please let us know, thanks . Our factory still working, If you need any blinds and shades we will send the goods ASAP. With best regards, Max Xie Chief

[PATCH] xtensa: fix PR target/91880

2019-09-24 Thread Max Filippov
Xtensa hwloop_optimize segfaults when zero overhead loop is about to be inserted as the first instruction of the function. Insert zero overhead loop instruction into new basic block before the loop when basic block that precedes the loop is empty. 2019-09-24 Max Filippov gcc/ * config

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

2019-09-26 Thread Max Filippov
On Thu, Sep 26, 2019 at 1:42 PM augustine.sterl...@gmail.com wrote: > > On Tue, Sep 24, 2019 at 5:41 PM Max Filippov wrote: > > > > Xtensa hwloop_optimize segfaults when zero overhead loop is about to be > > inserted as the first instruction of the function. >

[PATCH] gcc: xtensa: fix NAND code in xtensa_expand_atomic

2018-09-04 Thread Max Filippov
NAND is ~(a1 & a2), but xtensa_expand_atomic does ~a1 & a2. That fixes libatomic tests atomic-op-{1,2}. gcc/ 2018-09-04 Max Filippov * config/xtensa/xtensa.c (xtensa_expand_atomic): Reorder AND and XOR operations in NAND case. --- gcc/config/xtensa/xtensa.c | 6 +++---

[PATCH v2] gcc: xtensa: fix NAND code in xtensa_expand_atomic

2018-09-04 Thread Max Filippov
NAND is ~(a1 & a2), but xtensa_expand_atomic does ~a1 & a2. That fixes libatomic tests atomic-op-{1,2}. gcc/ 2018-09-04 Max Filippov * config/xtensa/xtensa.c (xtensa_expand_atomic): Reorder AND and XOR operations in NAND case. --- Changes v1->v2: - put final inver

Re: [PATCH v2] gcc: xtensa: fix NAND code in xtensa_expand_atomic

2018-09-04 Thread Max Filippov
On Tue, Sep 4, 2018 at 10:35 AM, augustine.sterl...@gmail.com wrote: > On Tue, Sep 4, 2018 at 9:42 AM Max Filippov wrote: >> >> NAND is ~(a1 & a2), but xtensa_expand_atomic does ~a1 & a2. >> That fixes libatomic tests atomic-op-{1,2}. >>

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

2017-06-14 Thread Max Filippov
On Thu, May 25, 2017 at 11:15 AM, 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 >&

[PATCH] gcc: xtensa: enable address sanitizer

2017-12-04 Thread Max Filippov
gcc/ 2017-12-04 Max Filippov * config/xtensa/xtensa.c (xtensa_asan_shadow_offset): New function. (TARGET_ASAN_SHADOW_OFFSET): New macro definition. * config/xtensa/xtensa.h (FRAME_GROWS_DOWNWARD): Set to 1 if ASAN is enabled. --- gcc/config/xtensa

Re: [PATCH] gcc: xtensa: enable address sanitizer

2017-12-04 Thread Max Filippov
On Mon, Dec 4, 2017 at 1:31 PM, Jakub Jelinek wrote: > On Mon, Dec 04, 2017 at 01:28:53PM -0800, Max Filippov wrote: >> gcc/ >> 2017-12-04 Max Filippov >> >> * config/xtensa/xtensa.c (xtensa_asan_shadow_offset): New >> function. >>

Re: [PATCH] gcc: xtensa: enable address sanitizer

2017-12-05 Thread Max Filippov
On Mon, Dec 4, 2017 at 9:37 PM, augustine.sterl...@gmail.com wrote: > On Mon, Dec 4, 2017 at 1:28 PM, Max Filippov wrote: >> gcc/ >> 2017-12-04 Max Filippov >> >> * config/xtensa/xtensa.c (xtensa_asan_shadow_offset): New >> function. >>

[PATCH] xtensa: fix PR target/65416

2018-06-18 Thread Max Filippov
on movsp. Implement allocate_stack pattern for windowed ABI configuration and insert an instruction that prevents reordering of frame memory access and stack pointer update. gcc/ 2018-06-17 Max Filippov * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec constant

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

2018-06-19 Thread Max Filippov
On Tue, Jun 19, 2018 at 10:11 AM, augustine.sterl...@gmail.com wrote: > On Mon, Jun 18, 2018 at 3:10 PM, Max Filippov wrote: >> >> gcc/ >> 2018-06-17 Max Filippov >> >> * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec >>

[PATCH] libgcc: xtensa: fix NaN return from add/sub/mul/div helpers

2018-01-23 Thread Max Filippov
libgcc/ 2018-01-22 Max Filippov * config/xtensa/ieee754-df.S (__addsf3, __subsf3, __mulsf3) (__divsf3): Make NaN return value quiet. * config/xtensa/ieee754-sf.S (__adddf3, __subdf3, __muldf3) (__divdf3): Make NaN return value quiet. --- libgcc/config/xtensa

Re: [PATCH] libgcc: xtensa: fix NaN return from add/sub/mul/div helpers

2018-01-23 Thread Max Filippov
On Tue, Jan 23, 2018 at 1:07 PM, augustine.sterl...@gmail.com wrote: > On Tue, Jan 23, 2018 at 9:55 AM, Max Filippov wrote: >> libgcc/ >> 2018-01-22 Max Filippov >> >> * config/xtensa/ieee754-df.S (__addsf3, __subsf3, __mulsf3) >> (__div

[PATCH] libgcc: xtensa: fix build with -mtext-section-literals

2018-01-30 Thread Max Filippov
libgcc/ 2018-01-31 Max Filippov * config/xtensa/ieee754-df.S (__adddf3_aux): Add .literal_position directive. * config/xtensa/ieee754-sf.S (__addsf3_aux): Likewise. --- libgcc/config/xtensa/ieee754-df.S | 1 + libgcc/config/xtensa/ieee754-sf.S | 1 + 2 files changed, 2

Re: [PATCH] libgcc: xtensa: fix build with -mtext-section-literals

2018-01-31 Thread Max Filippov
On Wed, Jan 31, 2018 at 11:11 AM, augustine.sterl...@gmail.com wrote: > On Tue, Jan 30, 2018 at 8:02 PM, Max Filippov wrote: >> >> libgcc/ >> 2018-01-31 Max Filippov >> >> * config/xtensa/ieee754-df.S (__adddf3_aux): Add >> .literal_

Re: [PATCH] libgcc: xtensa: fix build with -mtext-section-literals

2018-02-01 Thread Max Filippov
Hi Sterling, On Wed, Jan 31, 2018 at 11:17 AM, Max Filippov wrote: > On Wed, Jan 31, 2018 at 11:11 AM, augustine.sterl...@gmail.com > wrote: >> On Tue, Jan 30, 2018 at 8:02 PM, Max Filippov wrote: >>> >>> libgcc/ >>> 2018-01-31 Max Filippov >&

Re: [PATCH] libgcc: xtensa: fix build with -mtext-section-literals

2018-02-07 Thread Max Filippov
On Thu, Feb 1, 2018 at 9:12 AM, Max Filippov wrote: > On Wed, Jan 31, 2018 at 11:17 AM, Max Filippov wrote: >> On Wed, Jan 31, 2018 at 11:11 AM, augustine.sterl...@gmail.com >> wrote: >>> On Tue, Jan 30, 2018 at 8:02 PM, Max Filippov wrote: >>>> >&g

Re: [PATCH] libgcc: xtensa: fix build with -mtext-section-literals

2018-02-20 Thread Max Filippov
On Wed, Feb 7, 2018 at 2:10 PM, Max Filippov wrote: > On Thu, Feb 1, 2018 at 9:12 AM, Max Filippov wrote: >> On Wed, Jan 31, 2018 at 11:17 AM, Max Filippov wrote: >>> On Wed, Jan 31, 2018 at 11:11 AM, augustine.sterl...@gmail.com >>> wrote: >>>> On Tue

[PATCH 2/2] xtensa: use pre- and postincrement FP load/store when available

2014-10-12 Thread Max Filippov
Earlier versions of xtensa FPU used to support preincrement FP load and store instructions (lsiu/ssiu). Recent FPU supports postincrement FP load and store instructions only (lsip/ssip). Use configuration macro to decide which version is available. 2014-10-10 Max Filippov gcc/ * config

[PATCH 0/2] xtensa: fix floating-point parts of machine description

2014-10-12 Thread Max Filippov
modern xtensa cores with FPU. Tested on xtensa-linux-uclibc. Max Filippov (2): xtensa: drop unimplemented floating point operations xtensa: use pre- and postincrement FP load/store when available gcc/config/xtensa/xtensa.h | 4 +++ gcc/config/xtensa/xtensa.md | 80

[PATCH 1/2] xtensa: drop unimplemented floating point operations

2014-10-12 Thread Max Filippov
xtensa ISA never implemented FP division, reciprocal, square root and inverse square root as single opcode. Remove patterns that can emit them. 2014-10-09 Max Filippov gcc/ * config/xtensa/xtensa.md (divsf3, *recipsf2, sqrtsf2, *rsqrtsf2): remove. --- gcc/config/xtensa/xtensa.md | 44

Re: [PATCH 0/2] xtensa: fix floating-point parts of machine description

2014-10-13 Thread Max Filippov
On Mon, Oct 13, 2014 at 8:03 PM, augustine.sterl...@gmail.com wrote: > On Sun, Oct 12, 2014 at 3:46 PM, Max Filippov wrote: >> Hi Sterling, >> >> this series fixes two bugs in xtensa.md: > > HI Max, thanks for this. I don't see a patch though. It's a c

Re: [PATCH 2/2] xtensa: use pre- and postincrement FP load/store when available

2014-10-13 Thread Max Filippov
On Mon, Oct 13, 2014 at 8:04 PM, augustine.sterl...@gmail.com wrote: > On Sun, Oct 12, 2014 at 3:46 PM, Max Filippov wrote: >> 2014-10-10 Max Filippov >> >> gcc/ >> * config/xtensa/xtensa.h (TARGET_HARD_FLOAT_POSTINC): new macro. >> * config/xte

Re: [PATCH 1/2] xtensa: drop unimplemented floating point operations

2014-10-14 Thread Max Filippov
On Mon, Oct 13, 2014 at 8:05 PM, augustine.sterl...@gmail.com wrote: > On Sun, Oct 12, 2014 at 3:46 PM, Max Filippov wrote: >> xtensa ISA never implemented FP division, reciprocal, square root and >> inverse square root as single opcode. Remove patterns that can emit >> t

Re: [PATCH 2/2] xtensa: use pre- and postincrement FP load/store when available

2014-10-14 Thread Max Filippov
On Mon, Oct 13, 2014 at 8:04 PM, augustine.sterl...@gmail.com wrote: > On Sun, Oct 12, 2014 at 3:46 PM, Max Filippov wrote: >> 2014-10-10 Max Filippov >> >> gcc/ >> * config/xtensa/xtensa.h (TARGET_HARD_FLOAT_POSTINC): new macro. >> * config/xte

[committed] MAINTAINERS: add myself to write-after-approval list.

2014-10-14 Thread Max Filippov
2014-10-15 Max Filippov * MAINTAINERS (write-after-approval): Add myself. Index: MAINTAINERS === --- MAINTAINERS (revision 216231) +++ MAINTAINERS (revision 216232) @@ -380,6 +380,7 @@ Chris Fairles

[PATCH] Fix PR target/65730

2015-05-19 Thread Max Filippov
2015-05-20 Max Filippov gcc/ * config/xtensa/xtensa.c (init_alignment_context): Replace MULT by BITS_PER_UNIT with ASHIFT by exact_log2 (BITS_PER_UNIT). --- gcc/config/xtensa/xtensa.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gcc/config/xtensa

Re: [PATCH] Fix PR target/65730

2015-05-20 Thread Max Filippov
On Wed, May 20, 2015 at 7:36 PM, augustine.sterl...@gmail.com wrote: > On Tue, May 19, 2015 at 8:31 PM, Max Filippov wrote: >> 2015-05-20 Max Filippov >> gcc/ >> * config/xtensa/xtensa.c (init_alignment_context): Replace MULT >> by BITS_PER_UNI

Re: [PATCH] xtensa: align data naturally when optimizing for size

2015-02-23 Thread Max Filippov
On Tue, Feb 24, 2015 at 2:30 AM, augustine.sterl...@gmail.com wrote: > On Sat, Feb 21, 2015 at 4:19 PM, Max Filippov wrote: >> >> gcc for xtensa always aligns data at least to a word boundary, even when >> it has smaller natural alignment. This results in unexpectedly high

Re: [PATCH] gcc/reload.c: Initialize several arrays before use them in find_reloads()

2015-02-24 Thread Max Filippov
bugzilla actually produces code with loop instruction. -- Thanks. -- Max

Re: [PATCH] gcc/reload.c: Initialize several arrays before use them in find_reloads()

2015-02-24 Thread Max Filippov
Sterling, On Wed, Feb 25, 2015 at 2:36 AM, augustine.sterl...@gmail.com wrote: > On Tue, Feb 24, 2015 at 2:05 PM, Max Filippov wrote: >> On Tue, Feb 24, 2015 at 6:54 PM, Jeff Law wrote: >>> You can tackle them in any order you wish. However, I suspect fixing the >>

[RFC 0/2] xtensa: add call0 ABI support

2015-02-28 Thread Max Filippov
Hello, this series adds call0 ABI support for xtensa. Code generation part is well tested, but I'm not 100% sure about the exception handling part. Please review. Max Filippov (2): Turn RETURN_ADDR_IN_PREVIOUS_FRAME into C expression Implement call0 ABI for xtensa gcc/built

[RFC 1/2] Turn RETURN_ADDR_IN_PREVIOUS_FRAME into C expression

2015-02-28 Thread Max Filippov
This allows a target to support both windowed and non-windowed ABI. 2015-02-28 Max Filippov gcc/ * builtins.c (expand_builtin_return_addr): Add RETURN_ADDR_IN_PREVIOUS_FRAME to 'if' condition. * config/sparc/sparc.h (RETURN_ADDR_IN_PREVIOUS_FRAM

[RFC 2/2] Implement call0 ABI for xtensa

2015-02-28 Thread Max Filippov
call0 is an ABI that doesn't use register windows. 2015-02-28 Max Filippov gcc/ * config/xtensa/constraints.md ("a" constraint): Include stack pointer in case of call0 ABI. ("q" constraint): Make empty in case of call0 ABI. ("

Re: [RFC 1/2] Turn RETURN_ADDR_IN_PREVIOUS_FRAME into C expression

2015-02-28 Thread Max Filippov
On Sun, Mar 1, 2015 at 8:34 AM, augustine.sterl...@gmail.com wrote: > On Sat, Feb 28, 2015 at 10:14 AM, Max Filippov wrote: >> This allows a target to support both windowed and non-windowed ABI. >> >> 2015-02-28 Max Filippov >> >> gcc/ >> * built

Re: [RFC 1/2] Turn RETURN_ADDR_IN_PREVIOUS_FRAME into C expression

2015-02-28 Thread Max Filippov
Richard, David, Eric, could you please take a look and possibly approve the below changes for sparc? On Sat, Feb 28, 2015 at 9:14 PM, Max Filippov wrote: > This allows a target to support both windowed and non-windowed ABI. > > 2015-02-28 Max Filippov > > gcc/ >

Re: [RFC 1/2] Turn RETURN_ADDR_IN_PREVIOUS_FRAME into C expression

2015-03-01 Thread Max Filippov
On Mon, Mar 2, 2015 at 1:07 AM, Joseph Myers wrote: > > On Sat, 28 Feb 2015, Max Filippov wrote: > > > This allows a target to support both windowed and non-windowed ABI. > > > > 2015-02-28 Max Filippov > > > > gcc/ > > *

[PATCH] Turn RETURN_ADDR_IN_PREVIOUS_FRAME into C expression

2015-03-02 Thread Max Filippov
This allows a target to support both windowed and non-windowed ABI. 2015-03-03 Max Filippov gcc/ * builtins.c (expand_builtin_return_addr): Add RETURN_ADDR_IN_PREVIOUS_FRAME to 'if' condition, remove surrounding #ifdef. * config/spa

Re: [PATCH] Turn RETURN_ADDR_IN_PREVIOUS_FRAME into C expression

2015-03-03 Thread Max Filippov
On Tue, Mar 3, 2015 at 5:51 PM, Richard Henderson wrote: > On 03/02/2015 10:42 PM, Max Filippov wrote: >> gcc/ >> * builtins.c (expand_builtin_return_addr): Add >> RETURN_ADDR_IN_PREVIOUS_FRAME to 'if' condition, remove >> surrounding #i

Re: [PATCH] Turn RETURN_ADDR_IN_PREVIOUS_FRAME into C expression

2015-03-03 Thread Max Filippov
On Tue, Mar 3, 2015 at 6:52 PM, H.J. Lu wrote: > On Tue, Mar 3, 2015 at 7:05 AM, Max Filippov wrote: >> On Tue, Mar 3, 2015 at 5:51 PM, Richard Henderson wrote: >>> On 03/02/2015 10:42 PM, Max Filippov wrote: >>>> gcc/ >>>> * bu

Re: [RFC 2/2] Implement call0 ABI for xtensa

2015-03-03 Thread Max Filippov
On Tue, Mar 3, 2015 at 7:13 PM, augustine.sterl...@gmail.com wrote: > On Sat, Feb 28, 2015 at 10:14 AM, Max Filippov wrote: >> call0 is an ABI that doesn't use register windows. > > This is OK for xtensa. Applied to trunk. Thanks! -- Max

[PATCH] xtensa: implement trap pattern

2015-06-09 Thread Max Filippov
gcc/ * config/xtensa/xtensa.h (TARGET_DEBUG): New definition. * config/xtensa/xtensa.md (define_attr "type"): New type "trap". (define_insn "trap"): New definition. --- gcc/config/xtensa/xtensa.h | 1 + gcc/config/xtensa/xtensa.md | 15 ++- 2 files changed, 15

[PATCH v2] xtensa: implement trap pattern

2015-06-09 Thread Max Filippov
gcc/ * config/xtensa/xtensa.h (TARGET_DEBUG): New definition. * config/xtensa/xtensa.md (define_attr "type"): New type "trap". (define_insn "trap"): New definition. --- Changes v1->v2: - drop break.n, replace break 0, 0 with break 1, 15, coded breakpoint that transfers con

Re: [PATCH v2] xtensa: implement trap pattern

2015-06-10 Thread Max Filippov
On Wed, Jun 10, 2015 at 5:37 PM, augustine.sterl...@gmail.com wrote: > On Tue, Jun 9, 2015 at 3:14 PM, Max Filippov wrote: >> gcc/ >> * config/xtensa/xtensa.h (TARGET_DEBUG): New definition. >> * config/xtensa/xtensa.md (define_attr &q

[PATCH] xtensa: align data naturally when optimizing for size

2015-02-21 Thread Max Filippov
for size is enabled. 2015-02-22 Max Filippov gcc/ * config/xtensa/xtensa.h (CONSTANT_ALIGNMENT, DATA_ALIGNMENT): use natural alignment when optimizing for size. --- gcc/config/xtensa/xtensa.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gcc/config

Re: [PATCH] Fix PR84521

2019-06-18 Thread Max Filippov
wed ABI xtensa code are not supposed to work together. -- Thanks. -- Max

[PATCH] xtensa: fix PR target/90922

2019-06-18 Thread Max Filippov
-18 Max Filippov gcc/ * config/xtensa/xtensa.c (xtensa_expand_prologue): Add stack pointer adjustment for the case of no callee-saved registers and stack frame bigger than 128 bytes. --- gcc/config/xtensa/xtensa.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion

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

2019-06-18 Thread Max Filippov
On Tue, Jun 18, 2019 at 3:09 PM augustine.sterl...@gmail.com wrote: > > On Tue, Jun 18, 2019 at 2:27 PM Max Filippov wrote: > > > > Stack pointer adjustment code in prologue missed a case of no > > callee-saved registers and a stack frame size bigger than 128 byt

Re: [PATCH] Fix PR84521

2019-06-18 Thread Max Filippov
entry sp, 64 l32ra2, .LC1 memw l32i.n a2, a2, 0 memw s32i.n a2, sp, 20 s32i.n a7, sp, 0< l32ra2, .LC2 s32i.n a2, sp, 4 original version stored the sp there. -- Thanks. -- Max

Re: [PATCH] Fix PR84521

2019-06-18 Thread Max Filippov
_pointer_required > should do something like: > > if (cfun->machine->accesses_prev_frame || cfun->has_nonlocal_label) > return true; You're right, with this change things are back to normal. -- Thanks. -- Max

[PATCH] PR target/86814

2018-12-30 Thread Max Filippov
Xtensa architecture is not affected by speculation. gcc/ 2018-12-30 Max Filippov * config/xtensa/xtensa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to speculation_safe_value_not_needed. --- gcc/config/xtensa/xtensa.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a

Re: [PATCH] PR target/86814

2018-12-31 Thread Max Filippov
On Sun, Dec 30, 2018 at 8:06 PM augustine.sterl...@gmail.com wrote: > On Sun, Dec 30, 2018 at 1:06 AM Max Filippov wrote: > > Xtensa architecture is not affected by speculation. > > > > gcc/ > > 2018-12-30 Max Filippov > > >

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

2019-09-23 Thread Max Filippov
On Tue, Jun 18, 2019 at 3:23 PM Max Filippov wrote: > > On Tue, Jun 18, 2019 at 3:09 PM augustine.sterl...@gmail.com > wrote: > > > > On Tue, Jun 18, 2019 at 2:27 PM Max Filippov wrote: > > > > > > Stack pointer adjustment code in prologue missed a case o

[PATCH] gcc: xtensa: don't force PIC for uclinux target

2018-11-05 Thread Max Filippov
sa-uclinux. gcc/ 2018-11-04 Max Filippov * config/xtensa/uclinux.h (XTENSA_ALWAYS_PIC): Change to 0. --- gcc/config/xtensa/uclinux.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/config/xtensa/uclinux.h b/gcc/config/xtensa/uclinux.h index ba26187c8f7a..1c

[PATCH v2] gcc: xtensa: don't force PIC for uclinux target

2018-11-05 Thread Max Filippov
sa-uclinux. gcc/ 2018-11-04 Max Filippov * config/xtensa/uclinux.h (XTENSA_ALWAYS_PIC): Change to 0. --- Changes v1->v2: - fix up comment for the XTENSA_ALWAYS_PIC macro gcc/config/xtensa/uclinux.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/

Re: [PATCH v2] gcc: xtensa: don't force PIC for uclinux target

2018-11-05 Thread Max Filippov
On Mon, Nov 5, 2018 at 3:18 PM augustine.sterl...@gmail.com wrote: > > On Mon, Nov 5, 2018 at 11:07 AM Max Filippov wrote: >> >> xtensa-uclinux uses bFLT executable file format that cannot relocate >> fields representing offsets from data to code. C++ objects built

[PATCH] gcc: move assemble_start_function / assemble_end_function to output_mi_thunk

2019-05-14 Thread Max Filippov
-08 Max Filippov * cgraphunit.c (cgraph_node::expand_thunk): Remove assemble_start_function and assemble_end_function calls. * config/alpha/alpha.c (alpha_output_mi_thunk_osf): Call assemble_start_function and assemble_end_function. * config/arc/arc.c

  1   2   3   4   >