Re: [PATCH] Add -fgnu-retain/-fno-gnu-retain

2021-02-18 Thread Jozef Lawrynowicz
On Thu, Feb 18, 2021 at 03:38:46PM +0100, Jakub Jelinek via Gcc-patches wrote: > On Thu, Feb 18, 2021 at 02:22:35PM +0000, Jozef Lawrynowicz wrote: > > I think it is a enhancement, and true to the spirit of the attribute, > > for "used" to save a symbol from linker garbage

Re: [PATCH] Add -fgnu-retain/-fno-gnu-retain

2021-02-18 Thread Jozef Lawrynowicz
On Thu, Feb 18, 2021 at 01:08:54PM +0100, Jakub Jelinek via Gcc-patches wrote: > On Thu, Feb 18, 2021 at 12:00:59PM +0000, Jozef Lawrynowicz wrote: > > If we can add ".retain " to GAS, then I agree, current GCC > > SHF_GNU_RETAIN behavior should be removed. For GCC 12 w

Re: [PATCH] Add -fgnu-retain/-fno-gnu-retain

2021-02-18 Thread Jozef Lawrynowicz
On Thu, Feb 18, 2021 at 11:22:42PM +1030, Alan Modra via Binutils wrote: > On Wed, Feb 17, 2021 at 11:23:12AM +0000, Jozef Lawrynowicz wrote: > > In previous discussions, it seemed to me that there was general support > > for the "used" attribute implying SHF_GNU_RETAI

Re: [PATCH] Add -fgnu-retain/-fno-gnu-retain

2021-02-18 Thread Jozef Lawrynowicz
On Thu, Feb 18, 2021 at 11:19:50AM +0100, Richard Biener via Binutils wrote: > On Wed, Feb 17, 2021 at 12:25 PM Jozef Lawrynowicz > wrote: > > > > On Tue, Feb 16, 2021 at 05:45:47PM +0100, Jakub Jelinek via Gcc-patches > > wrote: > > > On Mon, Feb 15, 2021 at

Re: [PATCH] Add -fgnu-retain/-fno-gnu-retain

2021-02-17 Thread Jozef Lawrynowicz
On Tue, Feb 16, 2021 at 05:45:47PM +0100, Jakub Jelinek via Gcc-patches wrote: > On Mon, Feb 15, 2021 at 02:35:07PM -0800, H.J. Lu via Gcc-patches wrote: > > When building Linux kernel, ld in bninutils 2.36 with GCC 11 generates > > thousands of > > > > ld: warning: orphan section `.data.event_ini

[PATCH] configure: Extend SHF_GNU_RETAIN conftest to check for unsupported gold

2020-12-16 Thread Jozef Lawrynowicz
F_GNU_RETAIN enabled Successfully bootstrapped for x86_64-pc-linux-gnu. Ok to apply? >From af3000bbacc6d8ca57581c11790032b73ea944ac Mon Sep 17 00:00:00 2001 From: Jozef Lawrynowicz Date: Wed, 16 Dec 2020 18:33:54 + Subject: [PATCH] configure: Extend SHF_GNU_RETAIN conftest to check for unsupported g

Re: [committed][wwwdocs] gcc-11/changes: "used" attribute saves decls from linker garbage collection

2020-12-15 Thread Jozef Lawrynowicz
On Tue, Dec 15, 2020 at 12:48:47AM +0100, Gerald Pfeifer wrote: > On Mon, 7 Dec 2020, Jozef Lawrynowicz wrote: > > Committed as obvious. > > Thank you! > > + > +For ELF targets that support the GNU or FreeBSD OSABIs, the > +used attribute will now save t

[committed][wwwdocs] gcc-11/changes: "used" attribute saves decls from linker garbage collection

2020-12-07 Thread Jozef Lawrynowicz
eir source code to handle the fact that GCC can now place "used" decls in a new, unique section. Committed as obvious. >From 7c56c86ebe102849ec239f0c57e93988169d90f4 Mon Sep 17 00:00:00 2001 From: Jozef Lawrynowicz Date: Mon, 7 Dec 2020 14:41:13 + Subject: [PATCH] gcc-11/changes:

[committed] doc: "used" attribute saves decls from linker garbage collection

2020-12-07 Thread Jozef Lawrynowicz
4da7c396d Mon Sep 17 00:00:00 2001 From: Jozef Lawrynowicz Date: Mon, 7 Dec 2020 14:26:46 + Subject: [PATCH] doc: "used" attribute saves decls from linker garbage collection gcc/ChangeLog: * doc/extend.texi (used function attribute): Document saving the declarat

Re: [PATCH 0/2] Switch to a new section if the SECTION_RETAIN bit doesn't match

2020-12-04 Thread Jozef Lawrynowicz
On Fri, Dec 04, 2020 at 05:16:38AM -0800, H.J. Lu via Gcc-patches wrote: > On Fri, Dec 4, 2020 at 4:17 AM Jozef Lawrynowicz > wrote: > > > > On Thu, Dec 03, 2020 at 04:06:50PM -0800, H.J. Lu via Gcc-patches wrote: > > > When SECTION_RETAIN is used, definitions mar

Re: [PATCH 0/2] Switch to a new section if the SECTION_RETAIN bit doesn't match

2020-12-04 Thread Jozef Lawrynowicz
On Thu, Dec 03, 2020 at 04:06:50PM -0800, H.J. Lu via Gcc-patches wrote: > When SECTION_RETAIN is used, definitions marked with used attribute and > unmarked definitions are placed in the same section. Instead of issue > an error: > > [hjl@gnu-cfl-2 gcc]$ /usr/gcc-11.0.0-x32/bin/gcc -S c.c > -fd

Re: [PATCH 1/2] Switch to a new section if the SECTION_RETAIN bit doesn't match

2020-12-04 Thread Jozef Lawrynowicz
Hi H.J., On Thu, Dec 03, 2020 at 04:06:51PM -0800, H.J. Lu via Gcc-patches wrote: > When definitions marked with used attribute and unmarked definitions are > placed in the same section, switch to a new section if the SECTION_RETAIN > bit doesn't match. GAS doesn't create separate sections for

[committed] MSP430: Remove target-specific handling of the "persistent" attribute

2020-11-23 Thread Jozef Lawrynowicz
The "persistent" attribute is now handled generically, and does not need specific support in the MSP430 back end. Successfully built and regtested C/C++ testsuites for msp430-elf. Committed as obvious. >From 77ee207e17d02e4aec502c6aedd9b0ba36a08de3 Mon Sep 17 00:00:00 200

Re: [PATCH 0/2] Improve MSP430 hardware multiply support

2020-11-17 Thread Jozef Lawrynowicz
On Mon, Nov 16, 2020 at 06:36:17PM -0700, Jeff Law via Gcc-patches wrote: > > > On 11/15/20 2:14 PM, Jozef Lawrynowicz wrote: > > The attached patch series improves MSP430 hardware multiply support, by > > improving code generation when setting up the 16-bit and 32-bit

[committed] MSP430: Fix inconsistent naming of hwmult libfuncs

2020-11-15 Thread Jozef Lawrynowicz
0-elf. Committed as obvious. >From c746fc40f4ec8cfc1092efd49d567751858d2099 Mon Sep 17 00:00:00 2001 From: Jozef Lawrynowicz Date: Sun, 15 Nov 2020 21:03:06 + Subject: [PATCH] MSP430: Fix inconsistent naming of hwmult libfuncs The naming scheme used by GCC to reference MSP430 hardware multip

[committed] MSP430: Define function to check 16-bit hwmult support

2020-11-15 Thread Jozef Lawrynowicz
001 From: Jozef Lawrynowicz Date: Sun, 15 Nov 2020 21:02:58 + Subject: [PATCH] MSP430: Define function to check 16-bit hwmult support gcc/ChangeLog: * config/msp430/msp430.c (msp430_use_16bit_hwmult): New. (use_32bit_hwmult): Rename to.. (msp430_use_32bit_hwmult): ..t

[PATCH 3/3] Implement the "persistent" attribute

2020-11-15 Thread Jozef Lawrynowicz
rocessor resets. Successfully regtested for arm-none-eabi. Ok for trunk? >From c67b1bb6f46a69916c7de74617f4301b95c894d8 Mon Sep 17 00:00:00 2001 From: Jozef Lawrynowicz Date: Sun, 15 Nov 2020 21:44:10 + Subject: [PATCH 3/3] Implement the "persistent" attribute The "pers

[PATCH 2/3] cp/decl.c: Set DECL_INITIAL before attribute processing

2020-11-15 Thread Jozef Lawrynowicz
e handlers. DECL_INITIAL must be restored to it's initial value after attribute validation is performed, so as to not interfere with later decl processing. Successfully regtested for arm-none-eabi. Ok for trunk? >From f87d3c3aa131cadeaa2f32c9a36609b4dd42db96 Mon Sep 17 00:00:00 2001 From: Jozef

[PATCH V2 0/3] Fix "noinit" attr, implement "persistent" attr

2020-11-15 Thread Jozef Lawrynowicz
quot;noinit" and "persistent" attributes. The handling of the "noinit" and "persistent" attributes does not interfere with it. msp430-elf "persistent" attribute behaviour needs changing if this patch is approved, I have a patch ready to do that. Successfu

[PATCH 1/3] Fix "noinit" attribute being ignored for -O0 and -fdata-sections

2020-11-15 Thread Jozef Lawrynowicz
for trunk? >From d501b36fc92f1506427836ded69997cc576beda4 Mon Sep 17 00:00:00 2001 From: Jozef Lawrynowicz Date: Sun, 15 Nov 2020 21:43:22 + Subject: [PATCH 1/3] Fix "noinit" attribute being ignored for -O0 and -fdata-sections Variables with the "noinit" attribute ar

[PATCH 2/2] MSP430: Add 64-bit hardware multiply support

2020-11-15 Thread Jozef Lawrynowicz
code-region=either/-mdata-region=either/-mhwmult=none Ok for trunk? >From cb1ea86822cc8c6b0183afd06da42e320034dc43 Mon Sep 17 00:00:00 2001 From: Jozef Lawrynowicz Date: Sun, 15 Nov 2020 21:03:14 + Subject: [PATCH 2/2] MSP430: Add 64-bit hardware multiply support Hardware multipliers that sup

[PATCH 1/2] MSP430: Add mulhi, mulsi and {u,}mulsidi3 expanders

2020-11-15 Thread Jozef Lawrynowicz
/-mdata-region=either/-mhwmult=none Ok for trunk? >From 2f9bbb5dde866627c0dc321ec102ba3ef73d591c Mon Sep 17 00:00:00 2001 From: Jozef Lawrynowicz Date: Sun, 15 Nov 2020 21:03:10 + Subject: [PATCH 1/2] MSP430: Add mulhi, mulsi and {u,}mulsidi3 expanders GCC generates better code w

[PATCH 0/2] Improve MSP430 hardware multiply support

2020-11-15 Thread Jozef Lawrynowicz
msp430-sim/-mlarge/-mcode-region=either/-mdata-region=either/-mhwmult=f5series msp430-sim/-mlarge/-mcode-region=either/-mdata-region=either/-mhwmult=none Ok for trunk? Jozef Lawrynowicz (2): MSP430: Add mulhi, mulsi and {u,}mulsidi3 expanders MSP430: Add 64-bit hardware multiply

Re: [PATCH] Use SHF_GNU_RETAIN to preserve symbol definitions

2020-11-13 Thread Jozef Lawrynowicz
uot;decl != NULL_TREE". We should also test that "used" with the "section" attribute applies the "R" flag. Please apply the attached patch if this gets approved. These new tests pass with arm-none-eabi and x86_64-pc-linux-gnu. Thanks, Jozef commit cf8e26deb43

ping x2 [PATCH 0/2] "noinit" and "persistent" attributes

2020-11-11 Thread Jozef Lawrynowicz
ping x2 for below On Wed, Nov 04, 2020 at 01:03:33PM +, Jozef Lawrynowicz wrote: > Ping for below > https://gcc.gnu.org/pipermail/gcc-patches/2020-October/557184.html > > On Tue, Oct 27, 2020 at 11:40:33AM +, Jozef Lawrynowicz wrote: > > This patch series fixes behav

Re: [PATCH] "used" attribute saves decl from linker garbage collection

2020-11-10 Thread Jozef Lawrynowicz
On Mon, Nov 09, 2020 at 12:31:09PM -0800, H.J. Lu via Gcc-patches wrote: > On Mon, Nov 9, 2020 at 11:56 AM Jozef Lawrynowicz > wrote: > > > > On Mon, Nov 09, 2020 at 10:36:07AM -0800, H.J. Lu via Gcc-patches wrote: > > > On Mon, Nov 9, 2020 at 9:41 AM Joz

Re: [PATCH] "used" attribute saves decl from linker garbage collection

2020-11-09 Thread Jozef Lawrynowicz
On Mon, Nov 09, 2020 at 10:36:07AM -0800, H.J. Lu via Gcc-patches wrote: > On Mon, Nov 9, 2020 at 9:41 AM Jozef Lawrynowicz > wrote: > > > > On Fri, Nov 06, 2020 at 04:39:33PM -0800, H.J. Lu via Gcc-patches wrote: > > > On Fri, Nov 6, 2020 at 4:17 PM Jeff Law wrote: &g

Re: [PATCH] "used" attribute saves decl from linker garbage collection

2020-11-09 Thread Jozef Lawrynowicz
11/6/20 4:45 PM, H.J. Lu wrote: > > >>> On Fri, Nov 6, 2020 at 3:37 PM Jeff Law wrote: > > >>>> On 11/6/20 4:29 PM, H.J. Lu wrote: > > >>>>> On Fri, Nov 6, 2020 at 3:22 PM Jeff Law wrote: > > >>>>>> On 11/5/20 7:34 AM, H.J.

Re: [PATCH] c++: Tweaks for value_dependent_expression_p.

2020-11-07 Thread Jozef Lawrynowicz
On Fri, Oct 30, 2020 at 02:36:00AM +, Marek Polacek via Gcc-patches wrote: > We may not call value_dependent_expression_p on expressions that are > not potential constant expressions, otherwise value_d could crash, > as I saw recently (in C++98). So beef up the checking in i_d_e_p. > > This r

Re: ping x2 [PATCH 0/5] MSP430: Implement macros to describe relative costs of operations

2020-11-06 Thread Jozef Lawrynowicz
On Fri, Nov 06, 2020 at 01:53:19PM -0700, Jeff Law via Gcc-patches wrote: > > On 9/15/20 2:30 PM, Jozef Lawrynowicz wrote: > > Ping x2 for below. > > > > On Fri, Aug 07, 2020 at 12:02:59PM +0100, Jozef Lawrynowicz wrote: > >> Pinging for this series of patches.

ping x4 [PATCH 0/5] MSP430: Implement macros to describe relative costs of operations

2020-11-06 Thread Jozef Lawrynowicz
4th ping for below. Patches are attached, OP linked here: https://gcc.gnu.org/pipermail/gcc-patches/2020-July/550542.html Thanks, Jozef On Wed, Oct 14, 2020 at 04:31:30PM +0100, Jozef Lawrynowicz wrote: > 3rd ping for below. > > On Tue, Sep 15, 2020 at 09:30:22PM +0100, Jozef Lawrynow

Re: [PATCH] "used" attribute saves decl from linker garbage collection

2020-11-05 Thread Jozef Lawrynowicz
On Thu, Nov 05, 2020 at 06:21:21AM -0500, Hans-Peter Nilsson wrote: > On Wed, 4 Nov 2020, H.J. Lu wrote: > > .retain is ill-defined. For example, > > > > [hjl@gnu-cfl-2 gcc]$ cat /tmp/x.c > > static int xyzzy __attribute__((__used__)); > > [hjl@gnu-cfl-2 gcc]$ ./xgcc -B./ -S /tmp/x.c -fcommon > >

Re: [PATCH] "used" attribute saves decl from linker garbage collection

2020-11-05 Thread Jozef Lawrynowicz
On Wed, Nov 04, 2020 at 03:58:56PM -0800, H.J. Lu wrote: > On Wed, Nov 4, 2020 at 3:00 PM Hans-Peter Nilsson wrote: > > > > On Wed, 4 Nov 2020, H.J. Lu wrote: > > > On Wed, Nov 4, 2020 at 1:56 PM Hans-Peter Nilsson > > > wrote: > > > > On Wed, 4 Nov 2020, H.J. Lu wrote: > > > > > > > > > On Wed,

Re: [PATCH] "used" attribute saves decl from linker garbage collection

2020-11-04 Thread Jozef Lawrynowicz
On Wed, Nov 04, 2020 at 05:47:28AM -0800, H.J. Lu wrote: > On Tue, Nov 3, 2020 at 2:11 PM H.J. Lu wrote: > > > > On Tue, Nov 3, 2020 at 1:57 PM Jozef Lawrynowicz > > wrote: > > > > > > On Tue, Nov 03, 2020 at 01:09:43PM -0800, H.J. Lu via Gcc-patches wrote:

ping [PATCH 0/2] arm: "noinit" and "persistent" attributes

2020-11-04 Thread Jozef Lawrynowicz
Ping for below https://gcc.gnu.org/pipermail/gcc-patches/2020-October/557184.html On Tue, Oct 27, 2020 at 11:40:33AM +, Jozef Lawrynowicz wrote: > This patch series fixes behavior related to the "noinit" attribute, and > makes the MSP430 "persistent" attribute gene

Re: [PATCH] "used" attribute saves decl from linker garbage collection

2020-11-03 Thread Jozef Lawrynowicz
On Tue, Nov 03, 2020 at 01:09:43PM -0800, H.J. Lu via Gcc-patches wrote: > On Tue, Nov 3, 2020 at 1:00 PM H.J. Lu wrote: > > > > On Tue, Nov 3, 2020 at 12:46 PM Jozef Lawrynowicz > > wrote: > > > > > > On Tue, Nov 03, 2020 at 11:58:04AM -0800, H.J. Lu via G

Re: [PATCH] "used" attribute saves decl from linker garbage collection

2020-11-03 Thread Jozef Lawrynowicz
On Tue, Nov 03, 2020 at 11:58:04AM -0800, H.J. Lu via Gcc-patches wrote: > On Tue, Nov 3, 2020 at 10:22 AM Jozef Lawrynowicz > wrote: > > > > On Tue, Nov 03, 2020 at 09:57:58AM -0800, H.J. Lu via Gcc-patches wrote: > > > On Tue, Nov 3, 2020 at 9:41 AM Joz

Re: [PATCH] "used" attribute saves decl from linker garbage collection

2020-11-03 Thread Jozef Lawrynowicz
On Tue, Nov 03, 2020 at 09:57:58AM -0800, H.J. Lu via Gcc-patches wrote: > On Tue, Nov 3, 2020 at 9:41 AM Jozef Lawrynowicz > wrote: > > > > The attached patch implements TARGET_ASM_MARK_DECL_PRESERVED for ELF GNU > > OSABI targets, so that declarations that have the &quo

[PATCH] "used" attribute saves decl from linker garbage collection

2020-11-03 Thread Jozef Lawrynowicz
k for trunk? Thanks, Jozef >From 0827e28480b7edd07cda4f938bdd14b1cbdf1fa2 Mon Sep 17 00:00:00 2001 From: Jozef Lawrynowicz Date: Thu, 29 Oct 2020 21:00:07 + Subject: [PATCH] Implement TARGET_MARK_DECL_PRESERVED for ELF GNU OSABI targets The GAS .retain directive will apply the SHF_GNU_RET

Re: [RFC] Add support for the "retain" attribute utilizing SHF_GNU_RETAIN

2020-10-30 Thread Jozef Lawrynowicz
On Mon, Oct 26, 2020 at 07:08:06PM +, Pedro Alves via Gcc-patches wrote: > On 10/6/20 12:10 PM, Jozef Lawrynowicz wrote: > > > Should "used" apply SHF_GNU_RETAIN? > > === > > Another talking point is whether the existing &qu

[PATCH 2/2] Implement the "persistent" attribute

2020-10-27 Thread Jozef Lawrynowicz
rocessor resets. Successfully bootstrapped/regtested x86_64-pc-linux-gnu and regtested for arm-none-eabi. Ok for trunk? >From ccd84e8c8b1ce5e2b496d5a550b24dbdae617327 Mon Sep 17 00:00:00 2001 From: Jozef Lawrynowicz Date: Mon, 26 Oct 2020 17:00:31 + Subject: [PATCH 2/2] Implement the "

[PATCH 1/2] Fix "noinit" attribute being ignored for -O0 and -fdata-sections

2020-10-27 Thread Jozef Lawrynowicz
ux-gnu and regtested for arm-none-eabi. Ok for trunk? >From 965de1985a21ef449d1b1477be566efcf3405f7e Mon Sep 17 00:00:00 2001 From: Jozef Lawrynowicz Date: Mon, 26 Oct 2020 14:11:08 + Subject: [PATCH 1/2] Fix "noinit" attribute being ignored for -O0 and -fdata-sections Var

[PATCH 0/2] arm: "noinit" and "persistent" attributes

2020-10-27 Thread Jozef Lawrynowicz
istent" attributes does not interfere with it. Successfully bootstrapped/regtested x86_64-pc-linux-gnu and regtested for arm-none-eabi. Ok for trunk? Jozef Lawrynowicz (2): Fix "noinit" attribute being ignored for -O0 and -fdata-sections Implement the &quo

Re: [RFC] Add support for the "retain" attribute utilizing SHF_GNU_RETAIN

2020-10-26 Thread Jozef Lawrynowicz
On Mon, Oct 26, 2020 at 07:08:06PM +, Pedro Alves via Gcc-patches wrote: > On 10/6/20 12:10 PM, Jozef Lawrynowicz wrote: > > > Should "used" apply SHF_GNU_RETAIN? > > === > > Another talking point is whether the existing &qu

Re: [PATCH] cp/decl.c: Set DECL_INITIAL before attribute processing

2020-10-26 Thread Jozef Lawrynowicz
On Mon, Oct 26, 2020 at 01:30:29PM +, Jozef Lawrynowicz wrote: > Attribute handlers may want to examine DECL_INITIAL for a decl, to > validate the attribute being applied. For C++, DECL_INITIAL is currently > not set until cp_finish_decl, by which time attribute validation has >

[PATCH] cp/decl.c: Set DECL_INITIAL before attribute processing

2020-10-26 Thread Jozef Lawrynowicz
or trunk? >From 6fbb18ab081069fb2730360f9e09425b9b1f6a7d Mon Sep 17 00:00:00 2001 From: Jozef Lawrynowicz Date: Tue, 20 Oct 2020 14:03:42 +0100 Subject: [PATCH] cp/decl.c: Set DECL_INITIAL before attribute processing Attribute handlers may want to examine DECL_INITIAL for a decl, to validate the attribute being applied. For

[PATCH] Implement the "retain" attribute

2020-10-22 Thread Jozef Lawrynowicz
one-eabi. Ok for trunk? Thanks, Jozef >From 82c4f86cde2155dd8b89ba01a2da88761586787b Mon Sep 17 00:00:00 2001 From: Jozef Lawrynowicz Date: Thu, 22 Oct 2020 14:23:40 +0100 Subject: [PATCH] Implement the "retain" attribute The "retain" attribute is used to protect the f

[committed] MSP430: Support a memory operand for op1 of andneghi3

2020-10-20 Thread Jozef Lawrynowicz
The attached patch fixes an ICE caused by an unrecognizeable insn generated when compiling gcc.c-torture/execute/pr97386-1.c at -O0 for msp430-elf. Successfully regtested on trunk and committed as obvious. >From 8c3846e80210ba437644b5b91d9bd9c564ca565a Mon Sep 17 00:00:00 2001 From: Jo

ping x3 [PATCH 0/5] MSP430: Implement macros to describe relative costs of operations

2020-10-14 Thread Jozef Lawrynowicz
3rd ping for below. On Tue, Sep 15, 2020 at 09:30:22PM +0100, Jozef Lawrynowicz wrote: > Ping x2 for below. > > On Fri, Aug 07, 2020 at 12:02:59PM +0100, Jozef Lawrynowicz wrote: > > Pinging for this series of patches. > > Attached all patches to this mail with the ammen

[RFC] Add support for the "retain" attribute utilizing SHF_GNU_RETAIN

2020-10-06 Thread Jozef Lawrynowicz
ical challenges for implementing it with this method can be solved. I've attached 3 patches for reference: - Binutils handling of SHF_GNU_RETAIN in binutils-SHF_GNU_RETAIN.patch - New "retain" GCC attribute in gcc-retain-attribute.patch - "used" applies SHF_GNU_RETAIN

[PATCH] MSP430: Add 'd', 'e', 'f' and 'g' asm operand modifiers

2020-09-10 Thread Jozef Lawrynowicz
>From c48ad2ae243a101afe8d021e847c56a482a60f20 Mon Sep 17 00:00:00 2001 From: Jozef Lawrynowicz Date: Wed, 9 Sep 2020 13:06:46 +0100 Subject: [PATCH] MSP430: Add 'd', 'e', 'f' and 'g' asm operand modifiers The new operand modifiers can be used to select

[PATCH] MSP430: Fix CFA generation during function epilogues

2020-09-09 Thread Jozef Lawrynowicz
rom 272b38a374eddf7327a61ff9b1730f0a2dd40233 Mon Sep 17 00:00:00 2001 From: Jozef Lawrynowicz Date: Mon, 7 Sep 2020 20:34:40 +0100 Subject: [PATCH] MSP430: Fix CFA generation during function epilogues There is no CFA information generated for instructions which manipulate the stack during function epilogues. This means a debugger can

[committed] MSP430: Fix detection of assembler support for .mspabi_attribute

2020-09-08 Thread Jozef Lawrynowicz
ixes the object attribute tests when GAS hasn't been built using a unified source tree alongside GCC. Committed as obvious. >From b75863a88ececd4fcce9e3b35df8d91b82cf4fc5 Mon Sep 17 00:00:00 2001 From: Jozef Lawrynowicz Date: Tue, 8 Sep 2020 11:31:02 +0100 Subject: [PATCH] MSP430: Fix

[committed] MSP430: Use enums to handle -mcpu= values

2020-09-08 Thread Jozef Lawrynowicz
. Committed as obvious. >From cd2d3822ca0f2f743601cc9d048d51f6d326f6a2 Mon Sep 17 00:00:00 2001 From: Jozef Lawrynowicz Date: Tue, 8 Sep 2020 10:10:17 +0100 Subject: [PATCH] MSP430: Use enums to handle -mcpu= values The -mcpu= option accepts only a handful of string values. Using enums instead

Re: [PATCH] doc: Update documentation on MODE_PARTIAL_INT subregs

2020-09-07 Thread Jozef Lawrynowicz
On Mon, Sep 07, 2020 at 01:55:59PM +0100, Richard Sandiford wrote: > Jozef Lawrynowicz writes: > > In d8487c949ad5 (~GCC 4.9.0), MODE_PARTIAL_INT modes were changed from > > having an unknown number of undefined bits, to having a known number of > > undefined bits, however

[committed] MSP430: Don't override default ISA when MCU name is unrecognized

2020-09-07 Thread Jozef Lawrynowicz
430X is the default ISA under normal operation, so even when the MCU name passed to -mmcu= is unrecognized, it should not be overriden. Committed as obvious. >From 7f87e446691f1debfe2671a40f8738bd5e128832 Mon Sep 17 00:00:00 2001 From: Jozef Lawrynowicz Date: Mon, 7 Sep 2020 17:35:04 +0

[committed] MSP430: Fix -mlarge documentation to indicate size_t is a 20-bit type

2020-09-02 Thread Jozef Lawrynowicz
Minor documentation fix, committed as obvious. >From 0edc2c1a2445dffc7b839d833263c78f7cab01dc Mon Sep 17 00:00:00 2001 From: Jozef Lawrynowicz Date: Wed, 2 Sep 2020 16:34:43 +0100 Subject: [PATCH] MSP430: Fix -mlarge documentation to indicate size_t is a 20-bit type gcc/Change

[committed] MSP430: Skip gcc.dg/pr55940.c in the small memory model

2020-09-02 Thread Jozef Lawrynowicz
to be unexpectedly less than 0x2000, which breaks the test. Committed as obvious. >From d45a6c7099a346153e970476688be5bd6a016cef Mon Sep 17 00:00:00 2001 From: Jozef Lawrynowicz Date: Wed, 2 Sep 2020 13:42:39 +0100 Subject: [PATCH] MSP430: Skip gcc.dg/pr55940.c in the small memory model In

[PATCH] doc: Update documentation on MODE_PARTIAL_INT subregs

2020-08-31 Thread Jozef Lawrynowicz
updates that portion of the GCC internals documentation. Ok for trunk? >From e195dce328b272cd413ca7c659b800170eb60f2c Mon Sep 17 00:00:00 2001 From: Jozef Lawrynowicz Date: Mon, 31 Aug 2020 17:26:31 +0100 Subject: [PATCH] doc: Update documentation on MODE_PARTIAL_INT subregs In d8487c949

Re: [PATCH] Implement P0966 std::string::reserve should not shrink

2020-08-10 Thread Jozef Lawrynowicz
Hi, On Thu, Aug 06, 2020 at 06:48:36PM +, Jonathan Wakely via Gcc-patches wrote: > > I've now pushed that combined patch to master. In libstdc++-v3/include/bits/basic_string.tcc around line 1190, there's a missing "#if __cpp_exceptions" test for the try/catch block that was added by this pat

ping [PATCH 0/5] MSP430: Implement macros to describe relative costs of operations

2020-08-07 Thread Jozef Lawrynowicz
applied. https://gcc.gnu.org/pipermail/gcc-patches/2020-July/550396.html Thanks, Jozef On Thu, Jul 23, 2020 at 04:43:56PM +0100, Jozef Lawrynowicz wrote: > The following series of patches for MSP430 implement some of the target > macros used to determine the relative costs of operations. > > T

ping [PATCH 3/3] MSP430: Simplify and extend shift instruction patterns

2020-08-07 Thread Jozef Lawrynowicz
Pinging for this patch. Thanks, Jozef On Tue, Jul 21, 2020 at 07:29:53PM +0100, Jozef Lawrynowicz wrote: > The implementation of define_expand and define_insn patterns to handle > shifts in the MSP430 backend is inconsistent, resulting in missed > opportunities to make best u

[committed] MSP430: Don't pass redundant -md option to the assembler

2020-08-03 Thread Jozef Lawrynowicz
mmitted as obvious. >From cc8c0049749736cdd88bc9c90f5df3961b97c67c Mon Sep 17 00:00:00 2001 From: Jozef Lawrynowicz Date: Mon, 3 Aug 2020 15:54:52 +0100 Subject: [PATCH] MSP430: Don't pass redundant -md option to the assembler The MSP430 GAS option "-md" is supposed to indicate that

Re: [PATCH 4/5] MSP430: Implement TARGET_INSN_COST

2020-07-24 Thread Jozef Lawrynowicz
Hi Segher, Thanks for having a look at the patch. On Thu, Jul 23, 2020 at 01:34:22PM -0500, Segher Boessenkool wrote: > Hi! > > On Thu, Jul 23, 2020 at 04:56:14PM +0100, Jozef Lawrynowicz wrote: > > +static int > > +msp430_insn_cost (rtx_insn *insn, bool s

[PATCH 5/5] MSP430: Skip index-1.c test

2020-07-23 Thread Jozef Lawrynowicz
dbb10b774f66be920e Mon Sep 17 00:00:00 2001 From: Jozef Lawrynowicz Date: Thu, 16 Jul 2020 11:35:25 +0100 Subject: [PATCH 5/5] MSP430: Skip index-1.c test To access the "n - 10"th element of "a" in this test, GCC will generate the following code for msp430-elf with -mc

[PATCH 4/5] MSP430: Implement TARGET_INSN_COST

2020-07-23 Thread Jozef Lawrynowicz
The length of an insn can be used to calculate its cost, when optimizing for size. When optimizing for speed, this is a good estimate, since the cycle cost of an MSP430 instruction increases with its length. >From e4c5f9c3f567489f89b41a0d96e321acb5d18152 Mon Sep 17 00:00:00 2001 From: Jo

[PATCH 3/5] MSP430: Add defaulting to the insn length attribute

2020-07-23 Thread Jozef Lawrynowicz
quot;extension" attribute definitions can then be used to calculate the total length of the instruction by using the value of the "type" attribute to examine the operands. >From 0e39cc3f13c604df1225d3c1eef6b05e629c184b Mon Sep 17 00:00:00 2001 From: Jozef Lawrynowicz Date: Thu, 1

[PATCH 2/5] MSP430: Implement TARGET_RTX_COSTS

2020-07-23 Thread Jozef Lawrynowicz
be accurately calculated, it is estimated and disparaged relative to the cost of a single instruction. >From f5cbd8967d9c64a4ea6eb9fb8846b4361e16e396 Mon Sep 17 00:00:00 2001 From: Jozef Lawrynowicz Date: Thu, 16 Jul 2020 11:28:59 +0100 Subject: [PATCH 2/5] MSP430: Implement TARGET_RTX_CO

[PATCH 1/5] MSP430: Implement TARGET_MEMORY_MOVE_COST

2020-07-23 Thread Jozef Lawrynowicz
The cycle and size cost of a MOV instruction in different addressing modes can be used to calculate the TARGET_MEMORY_MOVE_COST relative to TARGET_REGISTER_MOVE_COST. >From c801a2851d47601218578c411854de9540486335 Mon Sep 17 00:00:00 2001 From: Jozef Lawrynowicz Date: Thu, 16 Jul 2020 11:28

[PATCH 0/5] MSP430: Implement macros to describe relative costs of operations

2020-07-23 Thread Jozef Lawrynowicz
37 Successfully regtested on trunk for msp430-elf, ok to apply? Jozef Lawrynowicz (5): MSP430: Implement TARGET_MEMORY_MOVE_COST MSP430: Implement TARGET_RTX_COSTS MSP430: Add defaulting to the insn length attribute MSP430: Implement TARGET_INSN_COST MSP430: Skip index-1.c test gcc/

Re: [PATCH 1/3] expr: Allow scalar_int_mode target mode when converting a constant

2020-07-22 Thread Jozef Lawrynowicz
On Wed, Jul 22, 2020 at 09:33:47AM +0100, Richard Sandiford wrote: > Jozef Lawrynowicz writes: > > is_int_mode does not allow MODE_PARTIAL_INT modes, so convert_modes was > > not allowing a constant value to be converted to a MODE_PARTIAL_INT for > > use as operand 2 in patt

[PATCH 3/3] MSP430: Simplify and extend shift instruction patterns

2020-07-21 Thread Jozef Lawrynowicz
, ok to apply? >From a3c62c448c7f359bad85c86c35f712ca1fccf219 Mon Sep 17 00:00:00 2001 From: Jozef Lawrynowicz Date: Wed, 15 Jul 2020 11:43:36 +0100 Subject: [PATCH 3/3] MSP430: Simplify and extend shift instruction patterns The implementation of define_expand and define_insn patterns to handle shifts i

[PATCH 2/3] expmed: Fix possible use of NULL_RTX return value from emit_store_flag

2020-07-21 Thread Jozef Lawrynowicz
:00:00 2001 From: Jozef Lawrynowicz Date: Wed, 15 Jul 2020 11:19:31 +0100 Subject: [PATCH 2/3] expmed: Fix possible use of NULL_RTX return value from emit_store_flag MSP430 does not support have any store-flag instructions, so emit_store_flag can return NULL_RTX. Catch the NULL_RTX

[PATCH 1/3] expr: Allow scalar_int_mode target mode when converting a constant

2020-07-21 Thread Jozef Lawrynowicz
operand without any copying. Successfully regtested on trunk for x86_64-pc-linux-gnu and msp430-elf. Ok to apply? >From 485feafad6ef0966ff0e1d2ae383cd2b6dbc5c96 Mon Sep 17 00:00:00 2001 From: Jozef Lawrynowicz Date: Wed, 15 Jul 2020 11:19:16 +0100 Subject: [PATCH 1/3] expr: Allow scalar_int_m

[PATCH 0/3] MSP430: Improve code-generation for shift instructions

2020-07-21 Thread Jozef Lawrynowicz
. Ok to apply? Jozef Lawrynowicz (3): expr: Allow scalar_int_mode target mode when converting a constant expmed: Fix possible use of NULL_RTX return value from emit_store_flag MSP430: Simplify and extend shift instruction patterns gcc/config/msp430/constraints.md | 10 +- gcc

[committed] MSP430: Remove do_no_relax_short_jumps

2020-07-21 Thread Jozef Lawrynowicz
mmitted as obvious. >From b4ca70a3faa5ebc1f9fb4600583d0986f1bc7133 Mon Sep 17 00:00:00 2001 From: Jozef Lawrynowicz Date: Tue, 21 Jul 2020 17:24:04 +0100 Subject: [PATCH] MSP430: Remove do_no_relax_short_jumps This is an old cludge from from when the Binutils linker could not relax BR to JMP and vi

[committed] MSP430: Define extendqipsi2

2020-07-21 Thread Jozef Lawrynowicz
rom aa360dd1c882b943066ba088861c0bfac9df930d Mon Sep 17 00:00:00 2001 From: Jozef Lawrynowicz Date: Tue, 21 Jul 2020 17:24:03 +0100 Subject: [PATCH] MSP430: Define extendqipsi2 The SXT instruction extends the sign of the low byte of the operand through the entire PSImode register. SXTX.A can be u

[committed] MSP430: Define NO_FUNCTION_CSE

2020-07-21 Thread Jozef Lawrynowicz
as obvious. Successfully regtested on trunk for msp430-elf. >From 111afded7fdf46ce14972aa8a72c26c9a180ab70 Mon Sep 17 00:00:00 2001 From: Jozef Lawrynowicz Date: Tue, 21 Jul 2020 17:24:03 +0100 Subject: [PATCH] MSP430: Define NO_FUNCTION_CSE Calling a constant function address costs the same num

Re: [PATCH] TESTSUITE: Fix tests for 16-bit targets

2020-05-20 Thread Jozef Lawrynowicz
On Wed, May 20, 2020 at 03:37:30PM +0200, Christophe Lyon via Gcc-patches wrote: > Hi, > > > > On Mon, 18 May 2020 at 14:42, Jozef Lawrynowicz > wrote: > > > > On Fri, May 15, 2020 at 10:48:56PM +, Joseph Myers wrote: > > > On Fri, 15 May 2020, Joz

Re: [PATCH] TESTSUITE: Fix tests for 16-bit targets

2020-05-18 Thread Jozef Lawrynowicz
On Fri, May 15, 2020 at 10:48:56PM +, Joseph Myers wrote: > On Fri, 15 May 2020, Jozef Lawrynowicz wrote: > > > The attached patch fixes many GCC and G++ tests for 16-bit targets. These > > targets can have the following properties: > > - "int", "si

[PATCH] TESTSUITE: Fix tests for 16-bit targets

2020-05-15 Thread Jozef Lawrynowicz
these line number changes to appear on the stable branch. Jozef >From 7696941c75cf7d0cfbfb25dfd9c239e28314f570 Mon Sep 17 00:00:00 2001 From: Jozef Lawrynowicz Date: Tue, 12 May 2020 14:27:41 +0100 Subject: [PATCH] TESTSUITE: Fix tests for 16-bit targets gcc/ChangeLog: 2020-0

[committed] MSP430: Define ASM_OUTPUT_ALIGNED_DECL_LOCAL

2020-05-12 Thread Jozef Lawrynowicz
always reset to its initial value, causing the test to loop forever and eventually timeout. Successfully regtested for msp430-elf in the default, -mcpu=msp430 and -mlarge configurations. Committed as obvious. >From e8fb1a3892f4e2f8268ac2649776a7bd0a967643 Mon Sep 17 00:00:00 2001 From: Jozef

[committed] MSP430: Allow .bss section to be created in region-attribute-misuse test

2020-05-12 Thread Jozef Lawrynowicz
rom: Jozef Lawrynowicz Date: Mon, 11 May 2020 16:58:11 +0100 Subject: [PATCH] MSP430: Allow .bss section to be created in region-attribute-misuse test 2020-05-12 Jozef Lawrynowicz * gcc.target/msp430/region-attribute-misuse.c: Allow a .bss section to be created. --- gcc/testsuite/Change

[COMMITTED] MSP430: Don't add offsets to addresses when emitting asm for post_inc

2020-04-13 Thread Jozef Lawrynowicz
mmitted the attached patch as obvious. >From 04637536a6b69c6bf7e22e2ccd5ff3bfc4892394 Mon Sep 17 00:00:00 2001 From: Jozef Lawrynowicz Date: Fri, 10 Apr 2020 17:31:33 +0100 Subject: [PATCH] MSP430: Dont add offsets to addresses when emitting asm for post_inc Some insns, which operate on

[COMMITTED] MSP430: Fix memory offsets used by %C and %D asm output operand modifiers

2020-04-13 Thread Jozef Lawrynowicz
as obvious. From 14f27ee6c97c585018882ac8f1f5f2d64618ba66 Mon Sep 17 00:00:00 2001 From: Jozef Lawrynowicz Date: Mon, 13 Apr 2020 10:28:01 +0100 Subject: [PATCH] MSP430: Fix memory offsets used by %C and %D asm output operand modifiers The %C and %D operand modifiers are supposed to access the 3rd

[COMMITTED] MSP430: Indiciate that the epilogue_helper insn does not fallthru

2020-04-09 Thread Jozef Lawrynowicz
rtl_verify_fallthru. Successfully regtested for msp430-elf in the default, -mcpu=msp430 and -mlarge configurations. Committed as obvious. >From 07432a807ede1c629f0f52aa5f8bf00012929e88 Mon Sep 17 00:00:00 2001 From: Jozef Lawrynowicz Date: Thu, 9 Apr 2020 20:52:20 +0100 Subject: [PATCH] MSP430: Indici

Re: [PATCH v2][MSP430] Add msp430-elfbare target

2019-12-11 Thread Jozef Lawrynowicz
On Wed, 11 Dec 2019 12:19:41 + Jozef Lawrynowicz wrote: > On Mon, 9 Dec 2019 15:28:25 + > Jozef Lawrynowicz wrote: > > > On Sat, 07 Dec 2019 11:40:33 -0700 > > Jeff Law wrote: > > > > > On Fri, 2019-11-29 at 21:00 +, Jozef Lawrynowicz w

Re: [PATCH v2][MSP430] Add msp430-elfbare target

2019-12-11 Thread Jozef Lawrynowicz
On Mon, 9 Dec 2019 15:28:25 + Jozef Lawrynowicz wrote: > On Sat, 07 Dec 2019 11:40:33 -0700 > Jeff Law wrote: > > > On Fri, 2019-11-29 at 21:00 +, Jozef Lawrynowicz wrote: > > > The attached patch consolidates some configuration tweaks I > > &

Re: [PATCH 3/3] libgcc: Implement TARGET_LIBGCC_REMOVE_DSO_HANDLE

2019-12-11 Thread Jozef Lawrynowicz
On Mon, 9 Dec 2019 13:05:22 + Jozef Lawrynowicz wrote: > On Sat, 07 Dec 2019 11:27:54 -0700 > Jeff Law wrote: > > > On Wed, 2019-11-06 at 16:19 +, Jozef Lawrynowicz wrote: > > > From 7bc0971d2936ebe71e7b7d3d805cf1bbf9f9f5af Mon Sep 17 00:00:00 2001 >

Re: [PATCH v2][MSP430] Add msp430-elfbare target

2019-12-09 Thread Jozef Lawrynowicz
On Sat, 07 Dec 2019 11:40:33 -0700 Jeff Law wrote: > On Fri, 2019-11-29 at 21:00 +0000, Jozef Lawrynowicz wrote: > > The attached patch consolidates some configuration tweaks I > > previously submitted > > as modifications to the msp430-elf target into a new target calle

Re: [PATCH 3/3] libgcc: Implement TARGET_LIBGCC_REMOVE_DSO_HANDLE

2019-12-09 Thread Jozef Lawrynowicz
On Sat, 07 Dec 2019 11:27:54 -0700 Jeff Law wrote: > On Wed, 2019-11-06 at 16:19 +0000, Jozef Lawrynowicz wrote: > > From 7bc0971d2936ebe71e7b7d3d805cf1bbf9f9f5af Mon Sep 17 00:00:00 2001 > > From: Jozef Lawrynowicz > > Date: Mon, 4 Nov 2019 17:38:13 + > >

Re: [PATCH 2/3] libgcc: Dont define __do_global_dtors_aux if it will be empty

2019-12-09 Thread Jozef Lawrynowicz
> Makefile:1038: recipe for target 'crtbeginT.o' failed > > Cheers, > > Tobias Sorry, I need to change that to defined(USE_EH_FRAME_REGISTRY). Committing shortly. Thanks, Jozef > > On 11/6/19 5:17 PM, Jozef Lawrynowicz wrote: > > __do_global_dtors_aux in crtstuf

Re: [COMMITTED][MSP430] Fix postinc addressing mode being used for dst operand of CMP insns

2019-12-05 Thread Jozef Lawrynowicz
On Thu, 5 Dec 2019 08:41:48 -0700 Jeff Law wrote: > On 12/5/19 4:32 AM, Jozef Lawrynowicz wrote: > > MSP430 RTL patterns for conditional branch instructions allow the post > > increment addressing mode to be used for the "dest" operand of CMP > > instruct

[COMMITTED][MSP430] Fix postinc addressing mode being used for dst operand of CMP insns

2019-12-05 Thread Jozef Lawrynowicz
ode being used for dst op of CMP insns 2019-12-05 Jozef Lawrynowicz * config/msp430/msp430.md (cbranch4): Use msp430_general_dst_nonv_operand instead of nonimmediate_operand for dest operand of CMP instruction. (cbranchpsi4_real): Likewise. (cbranchqi4_real): Likewise. (cbranchhi4_

[PATCH v2][MSP430] Add msp430-elfbare target

2019-11-29 Thread Jozef Lawrynowicz
ml P.P.S. This requires some minor configury tweaks to Newlib and GDB of the form: - msp430*-*-elf) + msp430-*-elf*) I'll apply these changes if the patch is accepted. >From cff4611855d838315e793d45256de5fc8eeefafe Mon Sep 17 00:00:00 2001 From: Jozef Lawrynowicz Date: Mon, 25 Nov 2019

[PATCH v2][MSP430] -Add fno-exceptions multilib

2019-11-27 Thread Jozef Lawrynowicz
, but nothing unexpected. Ok to apply? >From b74f34e5ae7f649296f7f6bcce35b75c34a2b0fd Mon Sep 17 00:00:00 2001 From: Jozef Lawrynowicz Date: Mon, 25 Nov 2019 12:07:24 + Subject: [PATCH] MSP430: Add fno-exceptions multilib ChangeLog: 2019-11-27 Jozef Lawrynowicz * config-ml.in: Support --di

Re: [PATCH 2/4] MSP430: Disable exception handling by default for C++

2019-11-27 Thread Jozef Lawrynowicz
On Tue, 12 Nov 2019 21:08:48 + Richard Sandiford wrote: > Jozef Lawrynowicz writes: > > diff --git a/gcc/testsuite/lib/gcc-dg.exp b/gcc/testsuite/lib/gcc-dg.exp > > index 1df645e283c..1ce449cb935 100644 > > --- a/gcc/testsuite/lib/gcc-dg.exp > > +++ b/g

Re: [PATCH 1/4] MSP430: Disable TM clone registry by default

2019-11-24 Thread Jozef Lawrynowicz
On Sun, 24 Nov 2019 10:10:51 -0700 Jeff Law wrote: > On 11/24/19 7:20 AM, Jozef Lawrynowicz wrote: > > On Sun, 17 Nov 2019 12:11:23 -0700 > > Jeff Law wrote: > > > >> On 11/7/19 2:34 PM, Jozef Lawrynowicz wrote: > >>> Given that MSP430 is a resou

Re: [PATCH 4/4] MSP430: Deprecate -minrt option

2019-11-24 Thread Jozef Lawrynowicz
On Sun, 17 Nov 2019 14:00:58 -0700 Jeff Law wrote: > On 11/7/19 2:41 PM, Jozef Lawrynowicz wrote: > > Support for the MSP430 -minrt option has been removed from Newlib, since > > all the > > associated behaviour is now dynamic. Initialization code run before main is >

Re: [PATCH 1/4] MSP430: Disable TM clone registry by default

2019-11-24 Thread Jozef Lawrynowicz
On Sun, 17 Nov 2019 12:11:23 -0700 Jeff Law wrote: > On 11/7/19 2:34 PM, Jozef Lawrynowicz wrote: > > Given that MSP430 is a resource constrained, embedded target disabling > > transactional memory by default is a good idea to save on code size in > > the runtime library.

  1   2   3   >