> Thanks. I made some minor stylistic adjustments and pushed the change
> to the trunk. Thanks!
That's awesome, thanks so much!
--
-keith
signature.asc
Description: PGP signature
rn
and set the result register to 0.
3. Emit 'setpsw c' and 'setpsw z' instructions when the len is not a
constant, in case it turns out to be zero at runtime.
4. Remove the two 'setpsw' instructions from rx_cmpstrn.
Signed-off-by: Keith Packard
---
gcc/con
> Were you able to actually trigger cases where operands[3] is a
> CONST_INT? Again, it's not entirely clear if that can actually happen
> given the operand predicates on the cmpstrnsi expander.
(sorry for the long delay; I'm just getting back to reviewing my pending
GCC patches)
Good call. N
A target using 16-bit ints won't have enough bits to hold the whole
flag_sanitize set. Be explicit about using uint32 for the attribute data.
Signed-off-by: Keith Packard
---
gcc/c-family/c-attribs.cc | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/gcc/c-fam
anch protection
support. Specifying another cpu or architecture always sets -marm and
-mfloat-abi and so those multilib configuration don't rely on the
defaults.
Signed-off-by: Keith Packard
---
gcc/config/arm/arm-mlib.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gcc/co
Override other optimization settings with any -Os or -Oz found in CC
or CFLAGS.
Signed-off-by: Keith Packard
---
libgcc/Makefile.in | 10 +++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/libgcc/Makefile.in b/libgcc/Makefile.in
index 0719fd0615d..a157e28cbb7 100644
--- a
This option adds a per-multilib variant that specifies -Os
instead of the default.
Signed-off-by: Keith Packard
---
config-ml.in | 2 +-
gcc/Makefile.in | 32 +++-
gcc/configure| 13 +
gcc/configure.ac | 7 +++
gcc/doc
le of
MULTILIB_DEFAULTS values that don't affect "normal" operation but
break things when -Os is added.
Keith Packard (3):
libgcc: Use -Os/-Oz from CC or CFLAGS
arm: Add missing multilib default values
gcc: Add --enable-multilib-space option
config-ml.in | 2
We can avoid the setpsw instructions when len is a known constant.
When len is zero, the insn result is zero. When len is non-zero,
the scmpu instructions will set the flags correctly.
Signed-off-by: Keith Packard
---
gcc/config/rx/rx.md | 19 ---
1 file changed, 16 insertions
> It's as reasonable as other methods such as turning it into a
> define_expand and emitting a conditional branch around the sequence when
> the count is zero.
Thanks much. I suspect the cost of the PSW setting instructions is far
less than a branch, so how about this version which emits them o
From: Jeff Law
Date: Sat, 15 Feb 2025 09:19:42 -0700
> It's as reasonable as other methods such as turning it into a
> define_expand and emitting a conditional branch around the sequence when
> the count is zero.
Yeah, it would be "better" to avoid those extra instructions when the
count is kn
The SCMPU instruction doesn't change the C and Z flags when the
incoming length is zero, which means the insn will produce a
value based upon the existing flag values.
As a quick kludge, adjust these flags to ensure a zero result in this
case.
Signed-off-by: Keith Packard
---
gcc/conf
The SCMPU instruction doesn't change the C and Z flags when the
incoming length is zero, which means the insn will produce a
value based upon the existing flag values.
As a quick kludge, adjust these flags to ensure a zero result in this
case.
Signed-off-by: Keith Packard
---
gcc/conf
> lm32 is currently scheduled to be deprecated as it hasn't been converted
> to use LRA instead of reload. Deprecation would happen with the gcc-15
> release and removal in gcc-16 if nobody steps forward to do the
> conversion.
I kinda wondered. Frankly, I treated this adventure as a way to le
Signed-off-by: Keith Packard
---
gcc/config/lm32/lm32.cc | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/gcc/config/lm32/lm32.cc b/gcc/config/lm32/lm32.cc
index 4445295fe2b..d78efc59da5 100644
--- a/gcc/config/lm32/lm32.cc
+++ b/gcc/config/lm32/lm32.cc
@@ -632,8 +632,7
Adjust the conditionals so that pretend_size is always computed, even
if no_rtl is set.
Signed-off-by: Keith Packard
---
gcc/config/lm32/lm32.cc | 16 +---
1 file changed, 9 insertions(+), 7 deletions(-)
diff --git a/gcc/config/lm32/lm32.cc b/gcc/config/lm32/lm32.cc
index
n the parameter
crosses over.
Signed-off-by: Keith Packard
---
gcc/config/lm32/lm32.cc | 266
1 file changed, 266 insertions(+)
diff --git a/gcc/config/lm32/lm32.cc b/gcc/config/lm32/lm32.cc
index b677953bb4c..15728969fad 100644
--- a/gcc/config/lm32/lm
The cumulative args value in setup_incoming_varargs points at
the last named parameter. We need to skip over that (if present) to
get to the first anonymous argument as we only want to include
those anonymous args in the saved register block.
Signed-off-by: Keith Packard
---
gcc/config/lm32
In doing picolibc testing for lm32, I discovered that varargs handling
had an issue when the set of anonymous arguments spanned register
arguments and stack arguments.
On lm32, FIRST_PARM_OFFSET is '4', meaning there are four bytes
between the stack top and the first non-register parameter. When
The first patch in this series selects picolibc as the default C
library when the target is *-picolibc-*. This configures the default
compiler specs for picolibc usage, including the addition of three
picolic-specific options.
The section patch in this series allows the default C library to be
exp
of printf linked
from the C library.
Signed-off-by: Keith Packard
---
gcc/config.gcc | 23 +++-
gcc/config/picolibc-spec.h | 53
gcc/config/picolibc.opt | 40 +++
gcc/config/picolibc.opt.urls
suitable include and library paths at build
time.
If an unknown --with-default-libc= value is provided, emit an error
and stop.
Signed-off-by: Keith Packard
---
gcc/config.gcc | 63 +++-
gcc/configure.ac | 4 +++
2 files changed, 56 insertions
st of patches now, so this "shouldn't" happen again. Now to
drive that list of patches to zero.
From 1a3e403603f5a687724c7e2f6625debc3d23d934 Mon Sep 17 00:00:00 2001
From: Keith Packard
Date: Sun, 29 Dec 2024 01:42:29 -0800
Subject: [PATCH] libgcc/m68k: Fixes for soft float
Fix __exte
From: Richard Sandiford
Date: Mon, 30 Dec 2024 12:18:40 +
> ...that could be handled by adding:
>
> && GET_MODE_INNER (from) != GET_MODE_INNER (to)
I'll let those of you who understand this code far better than I do
figure out whether that's the right plan. I figured that copying how it
w
e conversion. This is the same
as i386, so let's adapt the i386 version of can_change_mode_class. See
attached patch, which seems to fix the bug for me.
From 862467c578545a4a7ed83767df2a181e7d845bc6 Mon Sep 17 00:00:00 2001
From: Keith Packard
Date: Sat, 28 Dec 2024 23:38:31 -0800
Subject: [PAT
> Option names should be inside @option{}, e.g. @option{-O2}.
Thanks. Will be updated in the next version. I'll wait for some review
of the functional bits of this series.
--
-keith
signature.asc
Description: PGP signature
This is the third version of this patch series.
Changes from v2:
* Change the default value of the new --enable-multilib-space option to
disabled. I didn't catch this regression because I was only testing
with the new option enabled. The Linaro regression tests identified the
issue.
--
This option adds a per-multilib variant that specifies -Os
instead of the default.
Signed-off-by: Keith Packard
---
config-ml.in | 2 +-
gcc/Makefile.in | 32 +++-
gcc/configure| 13 +
gcc/configure.ac | 7 +++
gcc/doc
Override other optimization settings with any -Os or -Oz found in CC
or CFLAGS.
Signed-off-by: Keith Packard
---
libgcc/Makefile.in | 10 +++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/libgcc/Makefile.in b/libgcc/Makefile.in
index ffc45f21267..25710636938 100644
--- a
anch protection
support. Specifying another cpu or architecture always sets -marm and
-mfloat-abi and so those multilib configuration don't rely on the
defaults.
Signed-off-by: Keith Packard
---
gcc/config/arm/arm-mlib.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gcc/co
This option adds a per-multilib variant that specifies -Os
instead of the default.
Signed-off-by: Keith Packard
---
config-ml.in | 2 +-
gcc/Makefile.in | 32 +++-
gcc/configure| 13 +
gcc/configure.ac | 7 +++
gcc/doc
This is the second version of this patch series.
Changes from the previous versions:
* Add documentation for --enable-multilib-space configuration
option. Thanks to Joseph Myers for flagging this.
* Fixed targets using MULTILIB_OSDIRNAMES using '=' signs; instead of
simply adding a new '
anch protection
support. Specifying another cpu or architecture always sets -marm and
-mfloat-abi and so those multilib configuration don't rely on the
defaults.
Signed-off-by: Keith Packard
---
gcc/config/arm/arm-mlib.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gcc/co
Override other optimization settings with any -Os or -Oz found in CC
or CFLAGS.
Signed-off-by: Keith Packard
---
libgcc/Makefile.in | 10 +++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/libgcc/Makefile.in b/libgcc/Makefile.in
index ffc45f21267..25710636938 100644
--- a
> This should be documented in install.texi.
Right. Sorry I forgot that piece.
--
-keith
signature.asc
Description: PGP signature
Override other optimization settings with any -Os or -Oz found in CC
or CFLAGS.
libgcc/ChangeLog:
* Makefile.in: Use -Os or -Oz from CC or CFLAGS
Signed-off-by: Keith Packard
---
libgcc/Makefile.in | 10 +++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/libgcc
configuration, but adding it
globally allows it to be used with any existing target.
gcc/ChangeLog:
* Makefile.in: Expand multilib set when --enable-multilib-space
* configure.ac: Support --enable-multilib-space option
* configure: Regenerate
Signed-off-by: Keith Packard
---
gcc
When building toolchains for embedded development, some projects will
want to optimize for speed while others are much more concerned about
overall code size. We can do this using the existing GCC multilib
infrastructure, adding suitable speed and size variants as another
dimension of the multilib
> I pushed this to the trunk after fixing a few minor whitespace nits.
> You didn't mention the divdf change, but I'll assume that was just an
> oversight.
Yeah, a couple of minor fixes there that I forgot to mention in the log.
> I'm largely trusting your reputation on the fpgnulib changes.
values between formats.
Handle underflow and overflow when truncating.
Write a replacement for __fixxfsi so that it does not raise extra
exceptions during an extra conversion from long double to double.
Signed-off-by: Keith Packard
---
libgcc/config/m68k/fpgnulib.c | 161
suitable include and library paths at build
time.
If an unknown --with-default-libc= value is provided, emit an error
and stop.
Signed-off-by: Keith Packard
---
gcc/config.gcc | 48
gcc/configure.ac | 4
2 files changed, 44 insertions
emihosting capabilities. This would be used with
this option by specifying --oslib=semihost
Signed-off-by: Keith Packard
---
gcc/config.gcc | 7 +++
gcc/config/picolibc.h | 32
gcc/config/picolibc.opt | 26 ++
3 files c
with a new file,
gcc/config/picolibc.h which adjusts the LIB_SPEC, STARTFILE_SPEC
and ENDFILE_SPEC values. Suggested by Sebastian Huber.
Keith Packard (3):
Allow default libc to be specified to configure
Add newlib and picolibc as default C library choices
Add '--oslib=' o
Signed-off-by: Keith Packard
---
gcc/config.gcc | 11 ++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/gcc/config.gcc b/gcc/config.gcc
index 0679a76bebb..84bca8df615 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -661,7 +661,7 @@ case ${target} in
esac
# Common
I submitted the referenced patch to extend the 'getenv' .specs function
back in August and didn't see any response, so I wanted to provide a bit
more context to see if that would help people understand why I wrote
this.
Here's a link to that message:
https://gcc.gnu.org/pipermail/gcc-pat
suitable include and library paths at build
time.
If an unknown --with-default-libc= value is provided, emit an error
and stop.
Signed-off-by: Keith Packard
---
gcc/config.gcc | 46 ++
gcc/configure.ac | 4
2 files changed, 42 insertions(+), 8
emihosting capabilities. This would be used with
this option by specifying --oslib=semihost
This patch enables --oslib= on arm, nds32, riscv and sh.
Signed-off-by: Keith Packard
---
gcc/config.gcc| 6 ++
gcc/config/arm/elf.h | 5 +
gcc/config/nds32/elf.h| 4
that up for arm, nds32, riscv and sh targets.
This is the second version of these patches which address several
issues raised in review by Richard Sandiford.
Keith Packard (3):
Allow default libc to be specified to configure
Add newlib and picolibc as default C library choices
Add '--
Don't set the DEFAULT_LIBC variable for newlib configurations as that
is how it currently works for systems using newlib as the default.
Signed-off-by: Keith Packard
---
gcc/config.gcc | 13 -
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/gcc/config.gcc
Richard Sandiford writes:
Thanks much for reviewing this series. I really appreciate it.
> should there be a default case that raises an error for unrecognised
> libcs? Command-line checking for configure isn't very tight, but we
> do raise similar errors for things like invalid --enable-
Signed-off-by: Keith Packard
---
gcc/doc/invoke.texi | 18 +++---
gcc/gcc.cc | 10 +-
2 files changed, 20 insertions(+), 8 deletions(-)
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index 6131bfa7acf..669c28a609a 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/
Kito Cheng writes:
> I am thinking that maybe we should add
> -mlibc=[newlib|newlib-nano|picolibc|unknown] option to bare-matel
> toolchain, one reason is having an unify interface to select libc
> implementation between clang/LLVM, spec file is a GCC specific stuff,
> that cause very bad compati
Andrew Pinski writes:
(removing gcc@ as not appropriate for patch discussions)
Thanks for reviewing my patches; I appreciate the time you have taken to
think about this.
> Why do you need to change the specs to support picolibc? Why not have
> the library supply the specs file instead, like wha
that up for arm, nds32, riscv and sh targets.
Keith Packard (3):
Allow default libc to be specified to configure
Add newlib and picolibc as default C library choices
Add '--oslib=' option when default C library is picolibc
gcc/config.gcc
emihosting capabilities. This would be used with
this option by specifying --oslib=semihost
This patch enables --oslib= on arm, nds32, riscv and sh.
Signed-off-by: Keith Packard
---
gcc/config.gcc| 6 ++
gcc/config/arm/elf.h | 5 +
gcc/config/nds32/elf.h| 4
suitable include and library paths at build
time.
Signed-off-by: Keith Packard
---
gcc/config.gcc | 42 ++
gcc/configure.ac | 4
2 files changed, 38 insertions(+), 8 deletions(-)
diff --git a/gcc/config.gcc b/gcc/config.gcc
index 02f58970db0
Signed-off-by: Keith Packard
---
gcc/config.gcc | 8 +++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/gcc/config.gcc b/gcc/config.gcc
index f8b6da4f4e7..0aa4bd6c3dd 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -639,7 +639,7 @@ case ${target} in
esac
# Common C
Martin Sebor writes:
> Can this option be used in attribute optimize? If yes, what's
> the advantage of also providing an atttribute?
Compatibility with the clang attribute.
> It seems to me that as a matter of QOI, GCC should be able to
> disable the expansion of built-ins to calls to themsel
extended to support the
additional clang feature by extending the attribute parsing function
and creating a list of disabled builtins checked by the builtin_decl
functions described above.
Signed-off-by: Keith Packard
---
gcc/builtins.c | 12 +++---
gcc/c-family/c-attribs.c | 68
Richard Biener writes:
> I don't think it reliably works the way you implement it. It's also having
> more side-effects than what you document, in particular
Yeah, I made a 'minimal' patch that had the effect I needed, but it's
clearly in the wrong place as it disables the matching of builtins
_builtin("exp2")))
exp2(double x)
{
return pow (2.0, x);
}
Signed-off-by: Keith Packard
---
gcc/builtins.c | 6 ++
gcc/common.opt | 4
gcc/gimple.c | 3 +++
gcc/tree-loop-distribution.c | 2 ++
4 files change
Jonathan Wakely writes:
> I'll do a bit more testing and push it next week.
That's awesome news. Thanks so much for you help; I'm looking forward to
having real C++ support for my embedded customers!
--
-keith
signature.asc
Description: PGP signature
This option directs the library to only use simple stdio APIs instead
of using fileno to get the file descriptor for use with POSIX APIs.
Aided-by: Jonathan Wakely
Signed-off-by: Keith Packard
-
v2:
Switch from --enable-libstdcxx-pure-stdio to
--enable-stdio=stdio_pure
These are the changes to autoconf files for the stdio_pure patch
Signed-off-by: Keith Packard
---
libstdc++-v3/config.h.in | 3 +++
libstdc++-v3/configure | 17 -
2 files changed, 15 insertions(+), 5 deletions(-)
diff --git a/libstdc++-v3/config.h.in b/libstdc++-v3
The current libstdc++ basic_file_stdio.cc code assumes a POSIX API
underneath the stdio implementation provided by the host libc. This
means that the host must provide a fairly broad POSIX file API,
including read, write, open, close, lseek and ioctl.
This patch changes basic_file_stdio.cc to only
Jonathan Wakely writes:
> OK. In principle, changes to avoid using the POSIX APIs are definitely
> fine. I would like to combine your new configure switch with the
> existing --enable-cstdio one though.
>
> How about the attached change for acinclude.m4 which would allow you
> to do --enable-cstd
Jonathan Wakely writes:
> GCC changelog files are autogenerated now, so patches should not touch
> them. Just include the ChangeLog entry in the Git commit log (which
> will usually end up being quoted in the patch and/or the email body of
> the mail to gcc-patches).
Awesome.
> I think the righ
67 matches
Mail list logo