Re: CVS commit: src/external/gpl3/gcc/dist/gcc/config/aarch64

2020-10-20 Thread Joerg Sonnenberger
On Wed, Oct 21, 2020 at 08:58:36AM +0900, Rin Okuyama wrote:
> I'm also one who feels hesitate to import Linux'ism into our basic
> components. However, for this problem in particular, I still think
> it is not a good choice to keep NetBSD support in driver-aarch64.c:
> 
> (a) Our sysctl(3)-based interface is not compliant to any standards,
> just like Linux's /proc/cpuinfo. But the latter is, unfortunately
> for us, the de facto standard.

It works properly in a chroot etc without needing new files. I would
call that a big plus.

Joerg


Re: CVS commit: src/external/gpl3/gcc/dist/gcc/config/aarch64

2020-10-20 Thread Rin Okuyama

Hi,
(tech-toolchain@ added to cc)

On 2020/10/16 1:49, Kamil Rytarowski wrote:

On 15.10.2020 17:14, Rin Okuyama wrote:

On 2020/10/15 16:12, matthew green wrote:

Martin Husemann writes:

On Thu, Oct 15, 2020 at 05:28:12PM +1100, matthew green wrote:

you could try reverting most of our changes to this file and
making sure you run with /proc mounted -o linux.  ryo@ recently
added additional /proc/cpuinfo support that should make this
just work with the upstream version, but i haven't had chance
to update and see if this is the case.


I've confirmed that -mtune=native works fine at least for A53,
even if all the local changes to driver-aarch64.c is reverted.
I will commit it soon.


If we go this route, we should make the relevant procfs nodes
independent
of -o linux.


that would be fine by me.


Nowadays, -o linux is turned on by default (unless nolinux is
specified explicitly). Still, native apps probably should not
depend on it.

This needs MI changes to procfs, not MD to aarch64. Should we
enable /proc/cpuinfo unconditionally?



I'm against the policy of restoring the /proc dependency for this corner
case in one application.

We need to upstream the NetBSD specific patches to mainline GCC.


I'm also one who feels hesitate to import Linux'ism into our basic
components. However, for this problem in particular, I still think
it is not a good choice to keep NetBSD support in driver-aarch64.c:

(a) Our sysctl(3)-based interface is not compliant to any standards,
just like Linux's /proc/cpuinfo. But the latter is, unfortunately
for us, the de facto standard.

(b) Because of (a), driver-aarch64.c is deeply depended on
/proc/cpuinfo. Our NetBSD support code

see diff to vendor branch here:
http://cvsweb.netbsd.org/bsdweb.cgi/src/external/gpl3/gcc/dist/gcc/config/aarch64/driver-aarch64.c.diff?r1=1.1.1.7=1.10=h

is something like a "glue code" which converts our convention to
/proc/cpuinfo style. We already do this in procfs. Why twice?

(c) I imagine that there would be little benefits for upstream to
merge NetBSD support into their repository. If they will merge,
I don't think the code is kept updated.

(d) Only -march=native and -mtune=native depends on this feature. I'm
OK with /proc/cpuinfo is left as is; only enabled when -onolinux is
not specified. IMO, it is users' responsibility that such a
additional feature fails with their non-standard system settings.

In short, I'm worried about future when mrg@ or someone else have to
maintain our glue code eternally, if this code is not reverted.

Thanks,
rin


Re: CVS commit: src/external/gpl3/gcc/dist/gcc/config/aarch64

2020-10-16 Thread Robert Elz
Date:Fri, 16 Oct 2020 04:07:31 +
From:"Thomas Mueller" 
Message-ID:  <20201016052422.e063084...@mail.netbsd.org>

  | Should I add ,linux to the end of the procfs line?

You can, but it isn't needed these days -- I used to mount procfs twice,
once without the linux option, on /proc, and once with, on /emul/linux/proc)
but there seems to be little point in that any more (even though the linux
/proc has a whole bunch of trash that has nothing to do with processes, and
should be, and generally is, available from /kern ... /proc/cpuinfo is an
example of that, though that one is missing from kernfs and should be added
there).

I do add "hidden" to the mount option list though, there's essentially
no point in including /proc /kern /dev/pts (or anything else like those)
in default df output (which is the only thing "hidden" generally affects).

kre



Re: CVS commit: src/external/gpl3/gcc/dist/gcc/config/aarch64

2020-10-15 Thread Thomas Mueller
Excerpt from Rin Okuyama:

> Nowadays, -o linux is turned on by default (unless nolinux is
> specified explicitly). Still, native apps probably should not
> depend on it.
 
> This needs MI changes to procfs, not MD to aarch64. Should we
> enable /proc/cpuinfo unconditionally?

My NetBSD system has no /kern and no /proc, do I need to mkdir these 
directories?  I just did.

kernfs and procfs were commented out in /etc/fstab .

Do I need to revive, new /etc/fstab being as shown below, is this good now?

Should I add ,linux to the end of the procfs line?

I might want to run Linux programs.

# NetBSD /targetroot/etc/fstab
# See /usr/share/examples/fstab/ for more examples.
NAME=WD2G19  /  ffs rw,log   1 1
NAME=WD2G17  none   swapsw,dp0 0
kernfs  /kern   kernfs  rw
ptyfs   /dev/ptsptyfs   rw
procfs  /proc   procfs  rw
/dev/cd0a   /cdrom  cd9660  ro,noauto

tmpfs   /var/shmtmpfs   rw,-m1777,-sram%25

Tom


Re: CVS commit: src/external/gpl3/gcc/dist/gcc/config/aarch64

2020-10-15 Thread Kamil Rytarowski
On 15.10.2020 17:14, Rin Okuyama wrote:
> On 2020/10/15 16:12, matthew green wrote:
>> Martin Husemann writes:
>>> On Thu, Oct 15, 2020 at 05:28:12PM +1100, matthew green wrote:
 you could try reverting most of our changes to this file and
 making sure you run with /proc mounted -o linux.  ryo@ recently
 added additional /proc/cpuinfo support that should make this
 just work with the upstream version, but i haven't had chance
 to update and see if this is the case.
> 
> I've confirmed that -mtune=native works fine at least for A53,
> even if all the local changes to driver-aarch64.c is reverted.
> I will commit it soon.
> 
>>> If we go this route, we should make the relevant procfs nodes
>>> independent
>>> of -o linux.
>>
>> that would be fine by me.
> 
> Nowadays, -o linux is turned on by default (unless nolinux is
> specified explicitly). Still, native apps probably should not
> depend on it.
> 
> This needs MI changes to procfs, not MD to aarch64. Should we
> enable /proc/cpuinfo unconditionally?


I'm against the policy of restoring the /proc dependency for this corner
case in one application.

We need to upstream the NetBSD specific patches to mainline GCC.



signature.asc
Description: OpenPGP digital signature


Re: CVS commit: src/external/gpl3/gcc/dist/gcc/config/aarch64

2020-10-15 Thread Rin Okuyama

On 2020/10/15 16:12, matthew green wrote:

Martin Husemann writes:

On Thu, Oct 15, 2020 at 05:28:12PM +1100, matthew green wrote:

you could try reverting most of our changes to this file and
making sure you run with /proc mounted -o linux.  ryo@ recently
added additional /proc/cpuinfo support that should make this
just work with the upstream version, but i haven't had chance
to update and see if this is the case.


I've confirmed that -mtune=native works fine at least for A53,
even if all the local changes to driver-aarch64.c is reverted.
I will commit it soon.


If we go this route, we should make the relevant procfs nodes independent
of -o linux.


that would be fine by me.


Nowadays, -o linux is turned on by default (unless nolinux is
specified explicitly). Still, native apps probably should not
depend on it.

This needs MI changes to procfs, not MD to aarch64. Should we
enable /proc/cpuinfo unconditionally?


i had to write the netbsd version of that code twice so far.
once for gcc 8.3 and 8.4, once for gcc 8.5 and 9.3, and i'd
really rather avoid having to write another version :)


Oh... Thank you very much for your hard works!

Thanks,
rin


re: CVS commit: src/external/gpl3/gcc/dist/gcc/config/aarch64

2020-10-15 Thread matthew green
Martin Husemann writes:
> On Thu, Oct 15, 2020 at 05:28:12PM +1100, matthew green wrote:
> > you could try reverting most of our changes to this file and
> > making sure you run with /proc mounted -o linux.  ryo@ recently
> > added additional /proc/cpuinfo support that should make this
> > just work with the upstream version, but i haven't had chance
> > to update and see if this is the case.
> 
> If we go this route, we should make the relevant procfs nodes independent
> of -o linux.

that would be fine by me.

i had to write the netbsd version of that code twice so far.
once for gcc 8.3 and 8.4, once for gcc 8.5 and 9.3, and i'd
really rather avoid having to write another version :)


.mrg.


Re: CVS commit: src/external/gpl3/gcc/dist/gcc/config/aarch64

2020-10-15 Thread Martin Husemann
On Thu, Oct 15, 2020 at 05:28:12PM +1100, matthew green wrote:
> you could try reverting most of our changes to this file and
> making sure you run with /proc mounted -o linux.  ryo@ recently
> added additional /proc/cpuinfo support that should make this
> just work with the upstream version, but i haven't had chance
> to update and see if this is the case.

If we go this route, we should make the relevant procfs nodes independent
of -o linux.

Martin


re: CVS commit: src/external/gpl3/gcc/dist/gcc/config/aarch64

2020-10-15 Thread matthew green
"Rin Okuyama" writes:
> Module Name:  src
> Committed By: rin
> Date: Tue Oct 13 07:12:00 UTC 2020
> 
> Modified Files:
>   src/external/gpl3/gcc/dist/gcc/config/aarch64: driver-aarch64.c
> 
> Log Message:
> Reduce diff with upstream a bit.
> No functional changes.

you could try reverting most of our changes to this file and
making sure you run with /proc mounted -o linux.  ryo@ recently
added additional /proc/cpuinfo support that should make this
just work with the upstream version, but i haven't had chance
to update and see if this is the case.

thanks!


.mrg.


Re: CVS commit: src/external/gpl3/gcc/dist/gcc/config/m68k

2020-08-16 Thread Rin Okuyama

Sorry for the late reply.

On 2020/08/11 1:16, Valery Ushakov wrote:

This sounds eerily similar to port-macppc/54827 - there's quite a bit
of confusion early on on my part there, but scroll to the last couple
of mails.  http://gnats.netbsd.org/54827

It looks like some logic changed in MI gcc8 that broke netbsd MD
config headers and I wonder if you see the same problem here.  For
macppc the fix was also to undo the netbsd change to STACK_BOUNDARY in
favor of PREFERRED_STACK_BOUNDARY.


Thank you for remaining me that PR. I was following discussion at
that time, but I'd forgotten that it was due to STACK_BOUNDARY.

On 2020/08/11 10:27, matthew green wrote:

May be we should also check other ports for similar gotcha proactively?


good idea.  no other gcc/config/*/*netbsd* files define the
nasty STACK_BOUNDARY macro so hopefully we're good now.


Yes, powerpc and m68k were the last ones.

We somehow gained a bit more experience to overcome troubles
caused by GCC. I think that we can deal with similar problems
better in the next time :).

Thanks,
rin


re: CVS commit: src/external/gpl3/gcc/dist/gcc/config/m68k

2020-08-10 Thread matthew green
> May be we should also check other ports for similar gotcha proactively?

good idea.  no other gcc/config/*/*netbsd* files define the
nasty STACK_BOUNDARY macro so hopefully we're good now.

thanks!


.mrg.


Re: CVS commit: src/external/gpl3/gcc/dist/gcc/config/m68k

2020-08-10 Thread Valery Ushakov
On Mon, Aug 10, 2020 at 06:24:39 +, Rin Okuyama wrote:

> Modified Files:
>   src/external/gpl3/gcc/dist/gcc/config/m68k: netbsd-elf.h
> 
> Log Message:
> PR port-m68k/6
> 
> Reset STACK_BOUNDARY to default, 16, to fix strange freeze for amiga,
> when kernel is compiled by GCC8.

This sounds eerily similar to port-macppc/54827 - there's quite a bit
of confusion early on on my part there, but scroll to the last couple
of mails.  http://gnats.netbsd.org/54827

It looks like some logic changed in MI gcc8 that broke netbsd MD
config headers and I wonder if you see the same problem here.  For
macppc the fix was also to undo the netbsd change to STACK_BOUNDARY in
favor of PREFERRED_STACK_BOUNDARY.

May be we should also check other ports for similar gotcha proactively?

-uwe


Re: CVS commit: src/external/gpl3/gcc/dist/gcc/config/aarch64

2020-05-18 Thread Jared McNeill
Unfortunately this breaks building on a 9.0 arm64 host because it is 
picking up /usr/include/aarch64/armreg.h and the one in 9.0 is missing a 
bunch of stuff. It works when using armreg.h from the source tree instead, 
eg:


-#include 
+#include "/path/to/src/sys/arch/aarch64/include/armreg.h"



On Tue, 28 Apr 2020, matthew green wrote:


Module Name:src
Committed By:   mrg
Date:   Tue Apr 28 03:00:23 UTC 2020

Modified Files:
src/external/gpl3/gcc/dist/gcc/config/aarch64: driver-aarch64.c

Log Message:
slightly reduce the scope of #ifdef __NetBSD__ version of the
-m{cpu,tune,arch}=native handling code, and hopefully reduce
future effort by aligning inputs

- share common variables and setup more
- build a linux/arm64 like /proc/cpuinfo Features line and
 use that to match the new 'list of features' per gcc feature,
 based upon our sysctl(2) published info.  complete this list
 for all supported extensions.

now this feature works again.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 \
   src/external/gpl3/gcc/dist/gcc/config/aarch64/driver-aarch64.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




CVS commit: src/external/gpl3/gcc/dist/gcc/config

2019-11-06 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Wed Nov  6 10:42:00 UTC 2019

Modified Files:
src/external/gpl3/gcc/dist/gcc/config: netbsd.h

Log Message:
update the comment above LIB_SPEC to remove 2 wrong things we fixed.


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/external/gpl3/gcc/dist/gcc/config/netbsd.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/gpl3/gcc/dist/gcc/config

2019-11-06 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Wed Nov  6 10:42:00 UTC 2019

Modified Files:
src/external/gpl3/gcc/dist/gcc/config: netbsd.h

Log Message:
update the comment above LIB_SPEC to remove 2 wrong things we fixed.


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/external/gpl3/gcc/dist/gcc/config/netbsd.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/gpl3/gcc/dist/gcc/config/netbsd.h
diff -u src/external/gpl3/gcc/dist/gcc/config/netbsd.h:1.32 src/external/gpl3/gcc/dist/gcc/config/netbsd.h:1.33
--- src/external/gpl3/gcc/dist/gcc/config/netbsd.h:1.32	Wed Oct  2 02:54:34 2019
+++ src/external/gpl3/gcc/dist/gcc/config/netbsd.h	Wed Nov  6 10:42:00 2019
@@ -99,13 +99,9 @@ along with GCC; see the file COPYING3.  
1. Select the appropriate set of libs, depending on whether we're
   profiling.
 
-   2. Include the pthread library if -pthread is specified (only
-  if threads are enabled).
+   2. Include the pthread library if -pthread is specified.
 
-   3. Include the posix library if -posix is specified.
-
-   FIXME: Could eliminate the duplication here if we were allowed to
-   use string concatenation.  */
+   3. Include the posix library if -posix is specified. */
 
 #define NETBSD_LIB_SPEC		\
   "%{pthread:			\



CVS commit: src/external/gpl3/gcc/dist/gcc

2019-11-06 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Wed Nov  6 09:10:50 UTC 2019

Modified Files:
src/external/gpl3/gcc/dist/gcc: config.gcc
src/external/gpl3/gcc/dist/gcc/config/rs6000: netbsd64.h

Log Message:
revert the powerpc config.gcc changes i made while merging,
they end up mis-ordering tm files.

revert the rs6000/netbsd64.h change and put it back as
SUBSUBTARGET_EXTRA_SPECS.

this seems to make the build work again, though mknative will
need a re-run for ppc*.


To generate a diff of this commit:
cvs rdiff -u -r1.60 -r1.61 src/external/gpl3/gcc/dist/gcc/config.gcc
cvs rdiff -u -r1.24 -r1.25 \
src/external/gpl3/gcc/dist/gcc/config/rs6000/netbsd64.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/gpl3/gcc/dist/gcc/config.gcc
diff -u src/external/gpl3/gcc/dist/gcc/config.gcc:1.60 src/external/gpl3/gcc/dist/gcc/config.gcc:1.61
--- src/external/gpl3/gcc/dist/gcc/config.gcc:1.60	Wed Oct 16 07:35:14 2019
+++ src/external/gpl3/gcc/dist/gcc/config.gcc	Wed Nov  6 09:10:50 2019
@@ -2531,14 +2531,15 @@ powerpc*-*-freebsd*)
 	esac
 	;;
 powerpc*-*-netbsd*)
-	tm_file="${tm_file} dbxelf.h elfos.h ${nbsd_tm_file} freebsd-spec.h rs6000/sysv4.h rs6000/netbsd.h"
+	tm_file="${tm_file} ${nbsd_tm_file} dbxelf.h elfos.h freebsd-spec.h"
 	case ${target} in
 	powerpc64*)
 		tm_file="rs6000/biarch64.h ${tm_file}"
-		tm_file="${tm_file} rs6000/default64.h rs6000/netbsd64.h"
+		tm_file="${tm_file} rs6000/sysv4.h rs6000/default64.h rs6000/netbsd64.h"
 		tmake_file="${tmake_file} rs6000/t-netbsd64"
 		;;
 	*)
+		tm_file="${tm_file} rs6000/sysv4.h rs6000/netbsd.h"
 		tmake_file="${tmake_file} rs6000/t-netbsd"
 		;;
 	esac

Index: src/external/gpl3/gcc/dist/gcc/config/rs6000/netbsd64.h
diff -u src/external/gpl3/gcc/dist/gcc/config/rs6000/netbsd64.h:1.24 src/external/gpl3/gcc/dist/gcc/config/rs6000/netbsd64.h:1.25
--- src/external/gpl3/gcc/dist/gcc/config/rs6000/netbsd64.h:1.24	Tue Nov  5 20:06:41 2019
+++ src/external/gpl3/gcc/dist/gcc/config/rs6000/netbsd64.h	Wed Nov  6 09:10:50 2019
@@ -204,8 +204,8 @@ extern int dot_symbols;
 %{,assembler|,assembler-with-cpp: %{mregnames} %{mno-regnames}}" \
   ENDIAN_SELECT(" -mbig", " -mlittle", DEFAULT_ASM_ENDIAN)
 
-#undef	EXTRA_SPECS
-#define EXTRA_SPECS \
+#undef	SUBSUBTARGET_EXTRA_SPECS
+#define SUBSUBTARGET_EXTRA_SPECS \
   { "asm_spec_common",		ASM_SPEC_COMMON },			\
   { "asm_spec32",		ASM_SPEC32 },\
   { "asm_spec64",		ASM_SPEC64 },\



CVS commit: src/external/gpl3/gcc/dist/gcc

2019-11-06 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Wed Nov  6 09:10:50 UTC 2019

Modified Files:
src/external/gpl3/gcc/dist/gcc: config.gcc
src/external/gpl3/gcc/dist/gcc/config/rs6000: netbsd64.h

Log Message:
revert the powerpc config.gcc changes i made while merging,
they end up mis-ordering tm files.

revert the rs6000/netbsd64.h change and put it back as
SUBSUBTARGET_EXTRA_SPECS.

this seems to make the build work again, though mknative will
need a re-run for ppc*.


To generate a diff of this commit:
cvs rdiff -u -r1.60 -r1.61 src/external/gpl3/gcc/dist/gcc/config.gcc
cvs rdiff -u -r1.24 -r1.25 \
src/external/gpl3/gcc/dist/gcc/config/rs6000/netbsd64.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/gpl3/gcc/dist/gcc/config/rs6000

2019-11-05 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Nov  5 20:06:41 UTC 2019

Modified Files:
src/external/gpl3/gcc/dist/gcc/config/rs6000: netbsd64.h

Log Message:
- Use EXTRA_SPECS like we did for aarch64 instead of SUBSUBTARGET_EXTRA_SPECS
  so that assembly specs get propagated (they were lost before)
- adjust the block register padding (like the other OS's) so that code compiles
- XXX: linker still broken for shared libraries because the os specific spec
  is not chosen


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 \
src/external/gpl3/gcc/dist/gcc/config/rs6000/netbsd64.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/gpl3/gcc/dist/gcc/config/rs6000

2019-11-05 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Nov  5 20:06:41 UTC 2019

Modified Files:
src/external/gpl3/gcc/dist/gcc/config/rs6000: netbsd64.h

Log Message:
- Use EXTRA_SPECS like we did for aarch64 instead of SUBSUBTARGET_EXTRA_SPECS
  so that assembly specs get propagated (they were lost before)
- adjust the block register padding (like the other OS's) so that code compiles
- XXX: linker still broken for shared libraries because the os specific spec
  is not chosen


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 \
src/external/gpl3/gcc/dist/gcc/config/rs6000/netbsd64.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/gpl3/gcc/dist/gcc/config/rs6000/netbsd64.h
diff -u src/external/gpl3/gcc/dist/gcc/config/rs6000/netbsd64.h:1.23 src/external/gpl3/gcc/dist/gcc/config/rs6000/netbsd64.h:1.24
--- src/external/gpl3/gcc/dist/gcc/config/rs6000/netbsd64.h:1.23	Fri May 10 22:37:58 2019
+++ src/external/gpl3/gcc/dist/gcc/config/rs6000/netbsd64.h	Tue Nov  5 15:06:41 2019
@@ -204,8 +204,8 @@ extern int dot_symbols;
 %{,assembler|,assembler-with-cpp: %{mregnames} %{mno-regnames}}" \
   ENDIAN_SELECT(" -mbig", " -mlittle", DEFAULT_ASM_ENDIAN)
 
-#undef	SUBSUBTARGET_EXTRA_SPECS
-#define SUBSUBTARGET_EXTRA_SPECS \
+#undef	EXTRA_SPECS
+#define EXTRA_SPECS \
   { "asm_spec_common",		ASM_SPEC_COMMON },			\
   { "asm_spec32",		ASM_SPEC32 },\
   { "asm_spec64",		ASM_SPEC64 },\
@@ -296,7 +296,7 @@ extern int dot_symbols;
registers and memory.  FIRST is nonzero if this is the only
element.  */
 #define BLOCK_REG_PADDING(MODE, TYPE, FIRST) \
-  (!(FIRST) ? upward : FUNCTION_ARG_PADDING (MODE, TYPE))
+  (!(FIRST) ? PAD_UPWARD : targetm.calls.function_arg_padding (MODE, TYPE))
 
 /* NetBSD doesn't support saving and restoring 64-bit regs in a 32-bit
process.  */



CVS commit: src/external/gpl3/gcc/dist/gcc/config/pa

2019-11-02 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Nov  3 01:03:30 UTC 2019

Modified Files:
src/external/gpl3/gcc/dist/gcc/config/pa: pa-netbsd.h

Log Message:
netbsd/hppa uses 16 byte alignment.  the inherited default changed..


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/external/gpl3/gcc/dist/gcc/config/pa/pa-netbsd.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/gpl3/gcc/dist/gcc/config/pa

2019-11-02 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Nov  3 01:03:30 UTC 2019

Modified Files:
src/external/gpl3/gcc/dist/gcc/config/pa: pa-netbsd.h

Log Message:
netbsd/hppa uses 16 byte alignment.  the inherited default changed..


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/external/gpl3/gcc/dist/gcc/config/pa/pa-netbsd.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/gpl3/gcc/dist/gcc/config/pa/pa-netbsd.h
diff -u src/external/gpl3/gcc/dist/gcc/config/pa/pa-netbsd.h:1.5 src/external/gpl3/gcc/dist/gcc/config/pa/pa-netbsd.h:1.6
--- src/external/gpl3/gcc/dist/gcc/config/pa/pa-netbsd.h:1.5	Fri Aug 19 05:11:10 2016
+++ src/external/gpl3/gcc/dist/gcc/config/pa/pa-netbsd.h	Sun Nov  3 01:03:30 2019
@@ -131,6 +131,10 @@ along with GCC; see the file COPYING3.  
 #undef PTRDIFF_TYPE
 #define PTRDIFF_TYPE "long int"
 
+/* NetBSD always uses 128 byte alignment.  */
+#undef MALLOC_ABI_ALIGNMENT
+#define MALLOC_ABI_ALIGNMENT 128
+
 #if 0
 #undef TARGET_SYNC_LIBCALL
 #define TARGET_SYNC_LIBCALL 1



CVS commit: src/external/gpl3/gcc/dist/gcc

2019-10-23 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Oct 23 18:55:36 UTC 2019

Modified Files:
src/external/gpl3/gcc/dist/gcc: file-prefix-map.c

Log Message:
Since add_debug_regex_map is used in opts-global.c unconditionally, we can't
disable the code with #ifndef __NetBSD__ because it breaks cross-building.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/gpl3/gcc/dist/gcc/file-prefix-map.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/gpl3/gcc/dist/gcc

2019-10-23 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Oct 23 18:55:36 UTC 2019

Modified Files:
src/external/gpl3/gcc/dist/gcc: file-prefix-map.c

Log Message:
Since add_debug_regex_map is used in opts-global.c unconditionally, we can't
disable the code with #ifndef __NetBSD__ because it breaks cross-building.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/gpl3/gcc/dist/gcc/file-prefix-map.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/gpl3/gcc/dist/gcc/file-prefix-map.c
diff -u src/external/gpl3/gcc/dist/gcc/file-prefix-map.c:1.2 src/external/gpl3/gcc/dist/gcc/file-prefix-map.c:1.3
--- src/external/gpl3/gcc/dist/gcc/file-prefix-map.c:1.2	Tue Oct  1 17:17:28 2019
+++ src/external/gpl3/gcc/dist/gcc/file-prefix-map.c	Wed Oct 23 14:55:36 2019
@@ -123,7 +123,8 @@ remap_macro_filename (const char *filena
   return remap_filename (macro_prefix_maps, filename);
 }
 
-#ifndef __NetBSD__
+/* Original GCC version disabled. The NetBSD version handles regex */
+#if 0
 /* Remap using -fdebug-prefix-map.  Return the GC-allocated new name
corresponding to FILENAME or FILENAME if no remapping was performed.  */
 const char *
@@ -131,7 +132,12 @@ remap_debug_filename (const char *filena
 {
   return remap_filename (debug_prefix_maps, filename);
 }
-#else
+#endif
+
+/*
+ * The following code is a NetBSD extension that allows regex and
+ * \[0-9] substitutition arguments.
+ */
 
 /* Perform user-specified mapping of debug filename prefixes.  Return
the new name corresponding to FILENAME.  */
@@ -238,4 +244,3 @@ remap_debug_filename (const char *filena
 {
return remap_debug_regex_filename (remap_debug_prefix_filename (filename));
 }
-#endif



CVS commit: src/external/gpl3/gcc/dist/gcc

2019-10-16 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Wed Oct 16 07:35:14 UTC 2019

Modified Files:
src/external/gpl3/gcc/dist/gcc: config.gcc

Log Message:
make sure to include bpabi.h before arm.h.


To generate a diff of this commit:
cvs rdiff -u -r1.59 -r1.60 src/external/gpl3/gcc/dist/gcc/config.gcc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/gpl3/gcc/dist/gcc

2019-10-16 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Wed Oct 16 07:35:14 UTC 2019

Modified Files:
src/external/gpl3/gcc/dist/gcc: config.gcc

Log Message:
make sure to include bpabi.h before arm.h.


To generate a diff of this commit:
cvs rdiff -u -r1.59 -r1.60 src/external/gpl3/gcc/dist/gcc/config.gcc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/gpl3/gcc/dist/gcc/config.gcc
diff -u src/external/gpl3/gcc/dist/gcc/config.gcc:1.59 src/external/gpl3/gcc/dist/gcc/config.gcc:1.60
--- src/external/gpl3/gcc/dist/gcc/config.gcc:1.59	Wed Oct  2 05:58:03 2019
+++ src/external/gpl3/gcc/dist/gcc/config.gcc	Wed Oct 16 07:35:14 2019
@@ -1148,7 +1148,7 @@ arm*-*-freebsd*)# ARM Fr
 	with_tls=${with_tls:-gnu}
 	;;
 arm*-*-netbsdelf*)
-	tm_file="dbxelf.h elfos.h ${nbsd_tm_file} arm/elf.h arm/aout.h ${tm_file} arm/netbsd-elf.h"
+	tm_file="dbxelf.h elfos.h ${nbsd_tm_file} arm/elf.h arm/aout.h arm/netbsd-elf.h"
 	extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
 	tmake_file="${tmake_file} arm/t-arm"
 	case ${target} in
@@ -1169,6 +1169,7 @@ arm*-*-netbsdelf*)
 	with_cpu=${with_cpu:-strongarm}
 	;;
 	esac
+	tm_file="${tm_file} vxworks-dummy.h arm/arm.h"
 	case ${target} in
 	arm*-*-netbsdelf-*eabihf*)
 	tm_defines="${tm_defines} TARGET_DEFAULT_FLOAT_ABI=ARM_FLOAT_ABI_HARD"



CVS commit: src/external/gpl3/gcc/dist/gcc

2019-10-04 Thread Maya Rashish
Module Name:src
Committed By:   maya
Date:   Fri Oct  4 12:46:43 UTC 2019

Modified Files:
src/external/gpl3/gcc/dist/gcc: ira-color.c

Log Message:
We might've switched modes, re-init the move cost table again if necessary.

Fixes unlikely segfault on VAX.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/external/gpl3/gcc/dist/gcc/ira-color.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/gpl3/gcc/dist/gcc

2019-10-04 Thread Maya Rashish
Module Name:src
Committed By:   maya
Date:   Fri Oct  4 12:46:43 UTC 2019

Modified Files:
src/external/gpl3/gcc/dist/gcc: ira-color.c

Log Message:
We might've switched modes, re-init the move cost table again if necessary.

Fixes unlikely segfault on VAX.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/external/gpl3/gcc/dist/gcc/ira-color.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/gpl3/gcc/dist/gcc/ira-color.c
diff -u src/external/gpl3/gcc/dist/gcc/ira-color.c:1.6 src/external/gpl3/gcc/dist/gcc/ira-color.c:1.7
--- src/external/gpl3/gcc/dist/gcc/ira-color.c:1.6	Tue Oct  1 10:38:16 2019
+++ src/external/gpl3/gcc/dist/gcc/ira-color.c	Fri Oct  4 12:46:43 2019
@@ -1377,6 +1377,7 @@ update_costs_from_allocno (ira_allocno_t
 	 e.g. DImode for AREG on x86.  For such cases the
 	 register move cost will be maximal.  */
 	  mode = narrower_subreg_mode (mode, ALLOCNO_MODE (cp->second));
+	  ira_init_register_move_cost_if_necessary (mode);
 	  
 	  cost = (cp->second == allocno
 		  ? ira_register_move_cost[mode][rclass][aclass]



CVS commit: src/external/gpl3/gcc/dist/gcc

2019-10-01 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Wed Oct  2 05:58:03 UTC 2019

Modified Files:
src/external/gpl3/gcc/dist/gcc: config.gcc

Log Message:
avoid multiple tm_file headers being listed and breaking builds.


To generate a diff of this commit:
cvs rdiff -u -r1.58 -r1.59 src/external/gpl3/gcc/dist/gcc/config.gcc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/gpl3/gcc/dist/gcc/config.gcc
diff -u src/external/gpl3/gcc/dist/gcc/config.gcc:1.58 src/external/gpl3/gcc/dist/gcc/config.gcc:1.59
--- src/external/gpl3/gcc/dist/gcc/config.gcc:1.58	Wed Oct  2 02:54:34 2019
+++ src/external/gpl3/gcc/dist/gcc/config.gcc	Wed Oct  2 05:58:03 2019
@@ -1156,7 +1156,7 @@ arm*-*-netbsdelf*)
 	esac
 	case ${target} in
 	arm*-*-netbsdelf-*eabi*)
-	tm_file="$tm_file arm/bpabi.h arm/netbsd-elf.h arm/netbsd-eabi.h"
+	tm_file="${tm_file} arm/bpabi.h arm/netbsd-eabi.h"
 	# GCC 7 vs NetBSD/eabi -> avoid arm unwinder
 	#tmake_file="$tmake_file arm/t-bpabi"
 	tmake_file="$tmake_file arm/t-netbsdeabi"
@@ -1164,13 +1164,11 @@ arm*-*-netbsdelf*)
 	default_use_cxa_atexit=yes
 	;;
 	*)
-	tm_file="$tm_file arm/netbsd-elf.h"
 	tmake_file="$tmake_file arm/t-netbsd"
 	# NetBSD/arm (non-eabi) is only old platforms
 	with_cpu=${with_cpu:-strongarm}
 	;;
 	esac
-	tm_file="${tm_file} arm/arm.h"
 	case ${target} in
 	arm*-*-netbsdelf-*eabihf*)
 	tm_defines="${tm_defines} TARGET_DEFAULT_FLOAT_ABI=ARM_FLOAT_ABI_HARD"
@@ -2536,11 +2534,10 @@ powerpc*-*-netbsd*)
 	case ${target} in
 	powerpc64*)
 		tm_file="rs6000/biarch64.h ${tm_file}"
-		tm_file="${tm_file} rs6000/sysv4.h rs6000/default64.h rs6000/netbsd64.h"
+		tm_file="${tm_file} rs6000/default64.h rs6000/netbsd64.h"
 		tmake_file="${tmake_file} rs6000/t-netbsd64"
 		;;
 	*)
-		tm_file="${tm_file} rs6000/sysv4.h rs6000/netbsd.h"
 		tmake_file="${tmake_file} rs6000/t-netbsd"
 		;;
 	esac



CVS commit: src/external/gpl3/gcc/dist/gcc

2019-10-01 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Wed Oct  2 05:58:03 UTC 2019

Modified Files:
src/external/gpl3/gcc/dist/gcc: config.gcc

Log Message:
avoid multiple tm_file headers being listed and breaking builds.


To generate a diff of this commit:
cvs rdiff -u -r1.58 -r1.59 src/external/gpl3/gcc/dist/gcc/config.gcc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/gpl3/gcc/dist/gcc/common/config/or1k

2019-10-01 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Wed Oct  2 02:59:46 UTC 2019

Removed Files:
src/external/gpl3/gcc/dist/gcc/common/config/or1k: or1k-common.c

Log Message:
remove obsolete gcc 4.9 or1k code.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r0 \
src/external/gpl3/gcc/dist/gcc/common/config/or1k/or1k-common.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/gpl3/gcc/dist/gcc/config/or1k

2019-10-01 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Wed Oct  2 02:50:38 UTC 2019

Removed Files:
src/external/gpl3/gcc/dist/gcc/config/or1k: constraints.md elf.h
linux-elf.h linux-gas.h netbsd.h or1k-modes.def or1k-opts.h
or1k-protos.h or1k.c or1k.h or1k.md or1k.opt predicates.md t-linux
t-or1k t-or1knd

Log Message:
retire or1k gcc 4.9 code.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r0 \
src/external/gpl3/gcc/dist/gcc/config/or1k/constraints.md \
src/external/gpl3/gcc/dist/gcc/config/or1k/elf.h \
src/external/gpl3/gcc/dist/gcc/config/or1k/linux-elf.h \
src/external/gpl3/gcc/dist/gcc/config/or1k/linux-gas.h \
src/external/gpl3/gcc/dist/gcc/config/or1k/or1k-modes.def \
src/external/gpl3/gcc/dist/gcc/config/or1k/or1k-opts.h \
src/external/gpl3/gcc/dist/gcc/config/or1k/or1k-protos.h \
src/external/gpl3/gcc/dist/gcc/config/or1k/or1k.h \
src/external/gpl3/gcc/dist/gcc/config/or1k/or1k.md \
src/external/gpl3/gcc/dist/gcc/config/or1k/or1k.opt \
src/external/gpl3/gcc/dist/gcc/config/or1k/predicates.md \
src/external/gpl3/gcc/dist/gcc/config/or1k/t-linux \
src/external/gpl3/gcc/dist/gcc/config/or1k/t-or1k \
src/external/gpl3/gcc/dist/gcc/config/or1k/t-or1knd
cvs rdiff -u -r1.3 -r0 src/external/gpl3/gcc/dist/gcc/config/or1k/netbsd.h
cvs rdiff -u -r1.2 -r0 src/external/gpl3/gcc/dist/gcc/config/or1k/or1k.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/gpl3/gcc/dist/gcc/config/or1k

2019-10-01 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Wed Oct  2 02:50:38 UTC 2019

Removed Files:
src/external/gpl3/gcc/dist/gcc/config/or1k: constraints.md elf.h
linux-elf.h linux-gas.h netbsd.h or1k-modes.def or1k-opts.h
or1k-protos.h or1k.c or1k.h or1k.md or1k.opt predicates.md t-linux
t-or1k t-or1knd

Log Message:
retire or1k gcc 4.9 code.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r0 \
src/external/gpl3/gcc/dist/gcc/config/or1k/constraints.md \
src/external/gpl3/gcc/dist/gcc/config/or1k/elf.h \
src/external/gpl3/gcc/dist/gcc/config/or1k/linux-elf.h \
src/external/gpl3/gcc/dist/gcc/config/or1k/linux-gas.h \
src/external/gpl3/gcc/dist/gcc/config/or1k/or1k-modes.def \
src/external/gpl3/gcc/dist/gcc/config/or1k/or1k-opts.h \
src/external/gpl3/gcc/dist/gcc/config/or1k/or1k-protos.h \
src/external/gpl3/gcc/dist/gcc/config/or1k/or1k.h \
src/external/gpl3/gcc/dist/gcc/config/or1k/or1k.md \
src/external/gpl3/gcc/dist/gcc/config/or1k/or1k.opt \
src/external/gpl3/gcc/dist/gcc/config/or1k/predicates.md \
src/external/gpl3/gcc/dist/gcc/config/or1k/t-linux \
src/external/gpl3/gcc/dist/gcc/config/or1k/t-or1k \
src/external/gpl3/gcc/dist/gcc/config/or1k/t-or1knd
cvs rdiff -u -r1.3 -r0 src/external/gpl3/gcc/dist/gcc/config/or1k/netbsd.h
cvs rdiff -u -r1.2 -r0 src/external/gpl3/gcc/dist/gcc/config/or1k/or1k.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/gpl3/gcc/dist/gcc/config

2019-10-01 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Oct  1 22:44:18 UTC 2019

Modified Files:
src/external/gpl3/gcc/dist/gcc/config/powerpcspe: powerpcspe.c
src/external/gpl3/gcc/dist/gcc/config/rs6000: rs6000.c

Log Message:
merge GCC 8.3.

XXX: our change for e500 has moved into 'powerpcspe' port, which has
XXX: been marked deprecated in GCC 8.  this may affect what ppc ports
XXX: can update to GCC 8 easily, and we may need to add support for
XXX: 'powerpcspe' while we can.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/external/gpl3/gcc/dist/gcc/config/powerpcspe/powerpcspe.c
cvs rdiff -u -r1.20 -r1.21 \
src/external/gpl3/gcc/dist/gcc/config/rs6000/rs6000.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/gpl3/gcc/dist/gcc/doc

2019-10-01 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Oct  1 22:42:00 UTC 2019

Modified Files:
src/external/gpl3/gcc/dist/gcc/doc: cpp.1 cpp.info cppinternals.info
g++.1 gcc.1 gcc.info gccinstall.info gccint.info gcov-tool.1 gcov.1

Log Message:
regen for GCC 8.3 and our changes.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/external/gpl3/gcc/dist/gcc/doc/cpp.1 \
src/external/gpl3/gcc/dist/gcc/doc/cpp.info \
src/external/gpl3/gcc/dist/gcc/doc/g++.1 \
src/external/gpl3/gcc/dist/gcc/doc/gcc.1 \
src/external/gpl3/gcc/dist/gcc/doc/gcc.info \
src/external/gpl3/gcc/dist/gcc/doc/gcov.1
cvs rdiff -u -r1.12 -r1.13 \
src/external/gpl3/gcc/dist/gcc/doc/cppinternals.info \
src/external/gpl3/gcc/dist/gcc/doc/gccinstall.info \
src/external/gpl3/gcc/dist/gcc/doc/gccint.info
cvs rdiff -u -r1.5 -r1.6 src/external/gpl3/gcc/dist/gcc/doc/gcov-tool.1

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffs are larger than 1MB and have been omitted


CVS commit: src/external/gpl3/gcc/dist/gcc/doc

2019-10-01 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Oct  1 22:42:00 UTC 2019

Modified Files:
src/external/gpl3/gcc/dist/gcc/doc: cpp.1 cpp.info cppinternals.info
g++.1 gcc.1 gcc.info gccinstall.info gccint.info gcov-tool.1 gcov.1

Log Message:
regen for GCC 8.3 and our changes.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/external/gpl3/gcc/dist/gcc/doc/cpp.1 \
src/external/gpl3/gcc/dist/gcc/doc/cpp.info \
src/external/gpl3/gcc/dist/gcc/doc/g++.1 \
src/external/gpl3/gcc/dist/gcc/doc/gcc.1 \
src/external/gpl3/gcc/dist/gcc/doc/gcc.info \
src/external/gpl3/gcc/dist/gcc/doc/gcov.1
cvs rdiff -u -r1.12 -r1.13 \
src/external/gpl3/gcc/dist/gcc/doc/cppinternals.info \
src/external/gpl3/gcc/dist/gcc/doc/gccinstall.info \
src/external/gpl3/gcc/dist/gcc/doc/gccint.info
cvs rdiff -u -r1.5 -r1.6 src/external/gpl3/gcc/dist/gcc/doc/gcov-tool.1

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/gpl3/gcc/dist/gcc

2019-10-01 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Oct  1 21:17:28 UTC 2019

Modified Files:
src/external/gpl3/gcc/dist/gcc: Makefile.in file-prefix-map.c final.c
src/external/gpl3/gcc/dist/gcc/c-family: c-opts.c

Log Message:
merge debug/file prefix/merge stuff with upstream, which has gained
a lot of the same features.  builds, but may not actually run right.
adjust for add_path()'s SYSTEM -> INC_SYSTEM.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/external/gpl3/gcc/dist/gcc/Makefile.in
cvs rdiff -u -r1.1.1.1 -r1.2 src/external/gpl3/gcc/dist/gcc/file-prefix-map.c
cvs rdiff -u -r1.10 -r1.11 src/external/gpl3/gcc/dist/gcc/final.c
cvs rdiff -u -r1.8 -r1.9 src/external/gpl3/gcc/dist/gcc/c-family/c-opts.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/gpl3/gcc/dist/gcc

2019-10-01 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Oct  1 21:17:28 UTC 2019

Modified Files:
src/external/gpl3/gcc/dist/gcc: Makefile.in file-prefix-map.c final.c
src/external/gpl3/gcc/dist/gcc/c-family: c-opts.c

Log Message:
merge debug/file prefix/merge stuff with upstream, which has gained
a lot of the same features.  builds, but may not actually run right.
adjust for add_path()'s SYSTEM -> INC_SYSTEM.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/external/gpl3/gcc/dist/gcc/Makefile.in
cvs rdiff -u -r1.1.1.1 -r1.2 src/external/gpl3/gcc/dist/gcc/file-prefix-map.c
cvs rdiff -u -r1.10 -r1.11 src/external/gpl3/gcc/dist/gcc/final.c
cvs rdiff -u -r1.8 -r1.9 src/external/gpl3/gcc/dist/gcc/c-family/c-opts.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/gpl3/gcc/dist/gcc/Makefile.in
diff -u src/external/gpl3/gcc/dist/gcc/Makefile.in:1.18 src/external/gpl3/gcc/dist/gcc/Makefile.in:1.19
--- src/external/gpl3/gcc/dist/gcc/Makefile.in:1.18	Tue Oct  1 10:38:16 2019
+++ src/external/gpl3/gcc/dist/gcc/Makefile.in	Tue Oct  1 21:17:27 2019
@@ -1955,6 +1955,7 @@ CPP_SELFTEST_DEPS = cc1plus$(exeext) $(S
 selftest: s-selftest-c
 
 # C selftests
+C_SELFTEST_DEPS = 
 s-selftest-c: $(C_SELFTEST_DEPS)
 	@echo "NOT REBUILDING $@"
 NetBSD_DISABLED_s-selftest:

Index: src/external/gpl3/gcc/dist/gcc/file-prefix-map.c
diff -u src/external/gpl3/gcc/dist/gcc/file-prefix-map.c:1.1.1.1 src/external/gpl3/gcc/dist/gcc/file-prefix-map.c:1.2
--- src/external/gpl3/gcc/dist/gcc/file-prefix-map.c:1.1.1.1	Tue Oct  1 09:36:24 2019
+++ src/external/gpl3/gcc/dist/gcc/file-prefix-map.c	Tue Oct  1 21:17:28 2019
@@ -123,6 +123,7 @@ remap_macro_filename (const char *filena
   return remap_filename (macro_prefix_maps, filename);
 }
 
+#ifndef __NetBSD__
 /* Remap using -fdebug-prefix-map.  Return the GC-allocated new name
corresponding to FILENAME or FILENAME if no remapping was performed.  */
 const char *
@@ -130,3 +131,111 @@ remap_debug_filename (const char *filena
 {
   return remap_filename (debug_prefix_maps, filename);
 }
+#else
+
+/* Perform user-specified mapping of debug filename prefixes.  Return
+   the new name corresponding to FILENAME.  */
+
+static const char *
+remap_debug_prefix_filename (const char *filename)
+{
+  file_prefix_map *map;
+  char *s;
+  const char *name;
+  size_t name_len;
+
+  for (map = debug_prefix_maps; map; map = map->next)
+if (filename_ncmp (filename, map->old_prefix, map->old_len) == 0)
+  break;
+  if (!map)
+return filename;
+  name = filename + map->old_len;
+  name_len = strlen (name) + 1;
+  s = (char *) alloca (name_len + map->new_len);
+  memcpy (s, map->new_prefix, map->new_len);
+  memcpy (s + map->new_len, name, name_len);
+  return ggc_strdup (s);
+}
+
+#include 
+
+typedef struct debug_regex_map
+{
+  regex_t re;
+  const char *sub;
+  struct debug_regex_map *next;
+} debug_regex_map;
+
+/* Linked list of such structures.  */
+debug_regex_map *debug_regex_maps;
+
+
+/* Record a debug file regex mapping.  ARG is the argument to
+   -fdebug-regex-map and must be of the form OLD=NEW.  */
+
+void
+add_debug_regex_map (const char *arg)
+{
+  debug_regex_map *map;
+  const char *p;
+  char *old;
+  char buf[1024];
+  regex_t re;
+  int e;
+
+  p = strchr (arg, '=');
+  if (!p)
+{
+  error ("invalid argument %qs to -fdebug-regex-map", arg);
+  return;
+}
+  
+  old = xstrndup (arg, p - arg);
+  if ((e = regcomp(, old, REG_EXTENDED)) != 0)
+{
+  regerror(e, , buf, sizeof(buf));
+  warning (0, "regular expression compilation for %qs in argument to "
+	   "-fdebug-regex-map failed: %qs", old, buf);
+  free(old);
+  return;
+}
+  free(old);
+
+  map = XNEW (debug_regex_map);
+  map->re = re;
+  p++;
+  map->sub = xstrdup (p);
+  map->next = debug_regex_maps;
+  debug_regex_maps = map;
+}
+
+extern "C" ssize_t regasub(char **, const char *,
+  const regmatch_t *rm, const char *);
+
+/* Perform user-specified mapping of debug filename regular expressions.  Return
+   the new name corresponding to FILENAME.  */
+
+static const char *
+remap_debug_regex_filename (const char *filename)
+{
+  debug_regex_map *map;
+  char *s;
+  regmatch_t rm[10];
+
+  for (map = debug_regex_maps; map; map = map->next)
+if (regexec (>re, filename, 10, rm, 0) == 0
+   && regasub (, map->sub, rm, filename) >= 0)
+  {
+	 const char *name = ggc_strdup(s);
+	 free(s);
+	 return name;
+  }
+  return filename;
+}
+
+const char *
+remap_debug_filename (const char *filename)
+{
+   return remap_debug_regex_filename (remap_debug_prefix_filename (filename));
+}
+#endif

Index: src/external/gpl3/gcc/dist/gcc/final.c
diff -u src/external/gpl3/gcc/dist/gcc/final.c:1.10 src/external/gpl3/gcc/dist/gcc/final.c:1.11
--- src/external/gpl3/gcc/dist/gcc/final.c:1.10	Tue Oct  1 10:38:16 2019
+++ 

CVS commit: src/external/gpl3/gcc/dist/gcc

2019-09-22 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Sun Sep 22 23:34:13 UTC 2019

Modified Files:
src/external/gpl3/gcc/dist/gcc: cppbuiltin.c

Log Message:
Add LSan and UBSan specific preprocessor macros

__SANITIZE_LEAK__ patch:
https://gcc.gnu.org/ml/gcc-patches/2019-09/msg01270.html

__SANITIZE_UNDEFINED__
https://gcc.gnu.org/ml/gcc-patches/2019-09/msg01286.html

GCC upstream does not see value in feature parity with LLVM sanitizers.
For the time being this will be a NetBSD specific extension.

__SANITIZE_LEAK__ is needed for __NO_LEAKS in 
__SANITIZE_UNDEFINED__ is planned to be reused in the kernel headers.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.4 -r1.2 src/external/gpl3/gcc/dist/gcc/cppbuiltin.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/gpl3/gcc/dist/gcc

2019-09-22 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Sun Sep 22 23:34:13 UTC 2019

Modified Files:
src/external/gpl3/gcc/dist/gcc: cppbuiltin.c

Log Message:
Add LSan and UBSan specific preprocessor macros

__SANITIZE_LEAK__ patch:
https://gcc.gnu.org/ml/gcc-patches/2019-09/msg01270.html

__SANITIZE_UNDEFINED__
https://gcc.gnu.org/ml/gcc-patches/2019-09/msg01286.html

GCC upstream does not see value in feature parity with LLVM sanitizers.
For the time being this will be a NetBSD specific extension.

__SANITIZE_LEAK__ is needed for __NO_LEAKS in 
__SANITIZE_UNDEFINED__ is planned to be reused in the kernel headers.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.4 -r1.2 src/external/gpl3/gcc/dist/gcc/cppbuiltin.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/gpl3/gcc/dist/gcc/cppbuiltin.c
diff -u src/external/gpl3/gcc/dist/gcc/cppbuiltin.c:1.1.1.4 src/external/gpl3/gcc/dist/gcc/cppbuiltin.c:1.2
--- src/external/gpl3/gcc/dist/gcc/cppbuiltin.c:1.1.1.4	Sat Jan 19 10:14:18 2019
+++ src/external/gpl3/gcc/dist/gcc/cppbuiltin.c	Sun Sep 22 23:34:13 2019
@@ -93,6 +93,12 @@ define_builtin_macros_for_compilation_fl
   if (flag_sanitize & SANITIZE_ADDRESS)
 cpp_define (pfile, "__SANITIZE_ADDRESS__");
 
+  if (flag_sanitize & SANITIZE_UNDEFINED)
+cpp_define (pfile, "__SANITIZE_UNDEFINED__");
+
+  if (flag_sanitize & SANITIZE_LEAK)
+cpp_define (pfile, "__SANITIZE_LEAK__");
+
   if (flag_sanitize & SANITIZE_THREAD)
 cpp_define (pfile, "__SANITIZE_THREAD__");
 



CVS commit: src/external/gpl3/gcc/dist/gcc

2019-09-14 Thread Maya Rashish
Module Name:src
Committed By:   maya
Date:   Sat Sep 14 15:02:47 UTC 2019

Modified Files:
src/external/gpl3/gcc/dist/gcc: ira-color.c

Log Message:
Initialize the mode before accessing the move costs.
This matches the code of the rest of the file, and might be acceptable
by upstream.

PR toolchain/53176.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/gpl3/gcc/dist/gcc/ira-color.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/gpl3/gcc/dist/gcc

2019-09-14 Thread Maya Rashish
Module Name:src
Committed By:   maya
Date:   Sat Sep 14 15:02:47 UTC 2019

Modified Files:
src/external/gpl3/gcc/dist/gcc: ira-color.c

Log Message:
Initialize the mode before accessing the move costs.
This matches the code of the rest of the file, and might be acceptable
by upstream.

PR toolchain/53176.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/gpl3/gcc/dist/gcc/ira-color.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/gpl3/gcc/dist/gcc/ira-color.c
diff -u src/external/gpl3/gcc/dist/gcc/ira-color.c:1.4 src/external/gpl3/gcc/dist/gcc/ira-color.c:1.5
--- src/external/gpl3/gcc/dist/gcc/ira-color.c:1.4	Sat Sep 14 15:00:04 2019
+++ src/external/gpl3/gcc/dist/gcc/ira-color.c	Sat Sep 14 15:02:47 2019
@@ -2771,6 +2771,7 @@ allocno_copy_cost_saving (ira_allocno_t 
 	}
   else
 	gcc_unreachable ();
+  ira_init_register_move_cost_if_necessary(allocno_mode);
   cost += cp->freq * ira_register_move_cost[allocno_mode][rclass][rclass];
 }
   return cost;



CVS commit: src/external/gpl3/gcc/dist/gcc

2019-09-14 Thread Maya Rashish
Module Name:src
Committed By:   maya
Date:   Sat Sep 14 15:00:05 UTC 2019

Modified Files:
src/external/gpl3/gcc/dist/gcc: ira-color.c

Log Message:
Revert ira-color.c r1.2.

"VAX does not fully populate the register move costs table, so do not
access it w/o checks.
Hack to work around PR toolchain/53176."

Will commit a more upstream-friendly variant shortly.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/gpl3/gcc/dist/gcc/ira-color.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/gpl3/gcc/dist/gcc

2019-09-14 Thread Maya Rashish
Module Name:src
Committed By:   maya
Date:   Sat Sep 14 15:00:05 UTC 2019

Modified Files:
src/external/gpl3/gcc/dist/gcc: ira-color.c

Log Message:
Revert ira-color.c r1.2.

"VAX does not fully populate the register move costs table, so do not
access it w/o checks.
Hack to work around PR toolchain/53176."

Will commit a more upstream-friendly variant shortly.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/gpl3/gcc/dist/gcc/ira-color.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/gpl3/gcc/dist/gcc/ira-color.c
diff -u src/external/gpl3/gcc/dist/gcc/ira-color.c:1.3 src/external/gpl3/gcc/dist/gcc/ira-color.c:1.4
--- src/external/gpl3/gcc/dist/gcc/ira-color.c:1.3	Sat Jan 19 12:10:04 2019
+++ src/external/gpl3/gcc/dist/gcc/ira-color.c	Sat Sep 14 15:00:04 2019
@@ -2771,13 +2771,7 @@ allocno_copy_cost_saving (ira_allocno_t 
 	}
   else
 	gcc_unreachable ();
-  cost += cp->freq *
-(   ira_register_move_cost
- && ira_register_move_cost[allocno_mode]
-	 && ira_register_move_cost[allocno_mode][rclass]
-	)
-	   ? ira_register_move_cost[allocno_mode][rclass][rclass] 
-	   : 0;
+  cost += cp->freq * ira_register_move_cost[allocno_mode][rclass][rclass];
 }
   return cost;
 }



Re: CVS commit: src/external/gpl3/gcc/dist/gcc, vax crashes

2019-08-29 Thread maya
For future reference, proably by me:

Reproducer for the crash without the local diff:

#!/bin/sh

cat << EOF > oacc.i
int a, b;
int e() {
  short *c = 0;
  char d = c[a + 1];
  b = d;
  a += 2;
}
EOF
vax--netbsdelf-gcc -O2 -c oacc.i


This hits an assertion:
emit-rtl.c:2310 gcc_assert (memory_address_addr_space_p (mode, addr, as));
This points to vax code, vax_legitimate_address_p.
This function might not handle some addressing modes, possibly one of
these two:
   c:   b0 40 9f 02 movw *0x2[r0],r1
   c:   98 40 a0 02 cvtbl 0x2(r0)[r0],15 


CVS commit: src/external/gpl3/gcc/dist/gcc

2019-08-29 Thread Maya Rashish
Module Name:src
Committed By:   maya
Date:   Thu Aug 29 11:45:29 UTC 2019

Modified Files:
src/external/gpl3/gcc/dist/gcc: dse.c reload.c

Log Message:
Don't keep our local modifications as ifdef __NetBSD__.
When we build netbsd on another OS, we produce a cross compiler without
these definitions.

Fixes some compiler crashes when building netbsd/vax on linux.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/external/gpl3/gcc/dist/gcc/dse.c
cvs rdiff -u -r1.7 -r1.8 src/external/gpl3/gcc/dist/gcc/reload.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/gpl3/gcc/dist/gcc/dse.c
diff -u src/external/gpl3/gcc/dist/gcc/dse.c:1.9 src/external/gpl3/gcc/dist/gcc/dse.c:1.10
--- src/external/gpl3/gcc/dist/gcc/dse.c:1.9	Sat Jan 19 12:10:04 2019
+++ src/external/gpl3/gcc/dist/gcc/dse.c	Thu Aug 29 11:45:29 2019
@@ -290,7 +290,7 @@ static unsigned HOST_WIDE_INT
 lowpart_bitmask (int n)
 {
   unsigned HOST_WIDE_INT mask = HOST_WIDE_INT_M1U;
-#ifdef __NetBSD__ // XXXMRG
+#if 1 // XXXMRG
   gcc_assert(n >= 0 && n <= HOST_BITS_PER_WIDE_INT);
   if (n == 0)
 return 0;

Index: src/external/gpl3/gcc/dist/gcc/reload.c
diff -u src/external/gpl3/gcc/dist/gcc/reload.c:1.7 src/external/gpl3/gcc/dist/gcc/reload.c:1.8
--- src/external/gpl3/gcc/dist/gcc/reload.c:1.7	Sat Jan 19 12:10:04 2019
+++ src/external/gpl3/gcc/dist/gcc/reload.c	Thu Aug 29 11:45:29 2019
@@ -1148,7 +1148,7 @@ push_reload (rtx in, rtx out, rtx *inloc
 		   SUBREG_BYTE (in),
 		   GET_MODE (in)),
 			  REGNO (SUBREG_REG (in)));
-#ifdef __NetBSD__ // XXXMRG
+#if 1 // XXXMRG
   else if (REG_P (SUBREG_REG (in))
|| GET_CODE (SUBREG_REG (in)) == SYMBOL_REF)
 #else



CVS commit: src/external/gpl3/gcc/dist/gcc

2019-08-29 Thread Maya Rashish
Module Name:src
Committed By:   maya
Date:   Thu Aug 29 11:45:29 UTC 2019

Modified Files:
src/external/gpl3/gcc/dist/gcc: dse.c reload.c

Log Message:
Don't keep our local modifications as ifdef __NetBSD__.
When we build netbsd on another OS, we produce a cross compiler without
these definitions.

Fixes some compiler crashes when building netbsd/vax on linux.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/external/gpl3/gcc/dist/gcc/dse.c
cvs rdiff -u -r1.7 -r1.8 src/external/gpl3/gcc/dist/gcc/reload.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/gpl3/gcc/dist/gcc/config/arm

2019-06-12 Thread Maya Rashish
Module Name:src
Committed By:   maya
Date:   Wed Jun 12 17:04:35 UTC 2019

Modified Files:
src/external/gpl3/gcc/dist/gcc/config/arm: netbsd-elf.h

Log Message:
Remove unused macro


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 \
src/external/gpl3/gcc/dist/gcc/config/arm/netbsd-elf.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/gpl3/gcc/dist/gcc/config/arm

2019-06-12 Thread Maya Rashish
Module Name:src
Committed By:   maya
Date:   Wed Jun 12 17:04:35 UTC 2019

Modified Files:
src/external/gpl3/gcc/dist/gcc/config/arm: netbsd-elf.h

Log Message:
Remove unused macro


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 \
src/external/gpl3/gcc/dist/gcc/config/arm/netbsd-elf.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/gpl3/gcc/dist/gcc/config/arm/netbsd-elf.h
diff -u src/external/gpl3/gcc/dist/gcc/config/arm/netbsd-elf.h:1.13 src/external/gpl3/gcc/dist/gcc/config/arm/netbsd-elf.h:1.14
--- src/external/gpl3/gcc/dist/gcc/config/arm/netbsd-elf.h:1.13	Sat Jan 19 12:10:05 2019
+++ src/external/gpl3/gcc/dist/gcc/config/arm/netbsd-elf.h	Wed Jun 12 17:04:35 2019
@@ -170,9 +170,3 @@ while (0)
 
 #undef FPUTYPE_DEFAULT
 #define FPUTYPE_DEFAULT "vfp"
-
-/* Ensure that libgcc does not attempt to define __[CD]TOR_LIST__[] for APCS,
-   which belongs in crtbegin on NetBSD.  */
-#ifndef __ARM_EABI__
-#define CTOR_LISTS_DEFINED_EXTERNALLY
-#endif



CVS commit: src/external/gpl3/gcc/dist/gcc/config/rs6000

2019-05-10 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat May 11 02:37:58 UTC 2019

Modified Files:
src/external/gpl3/gcc/dist/gcc/config/rs6000: netbsd64.h

Log Message:
Switch PPC64 long double to 64 bits until the compiler is fixed.
XXX: This changes the ABI of the libraries.


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 \
src/external/gpl3/gcc/dist/gcc/config/rs6000/netbsd64.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/gpl3/gcc/dist/gcc/config/rs6000/netbsd64.h
diff -u src/external/gpl3/gcc/dist/gcc/config/rs6000/netbsd64.h:1.22 src/external/gpl3/gcc/dist/gcc/config/rs6000/netbsd64.h:1.23
--- src/external/gpl3/gcc/dist/gcc/config/rs6000/netbsd64.h:1.22	Tue Apr 16 03:36:55 2019
+++ src/external/gpl3/gcc/dist/gcc/config/rs6000/netbsd64.h	Fri May 10 22:37:58 2019
@@ -592,9 +592,16 @@ extern int dot_symbols;
 #define USE_LD_AS_NEEDED 1
 #endif
 
-/* NetBSD ppc64 has 128-bit long double support.  */
+/*
+ * NetBSD ppc64 used to have 128-bit long double support.
+ * But it does not work anymore:
+ * (insn 23 22 24 5 (set (reg:CCFP 179)
+ *	 (compare:CCFP (reg/v:TF 171 [ a ])
+ * 		 (reg:TF 177)))
+ *  "/usr/src/sys/external/bsd/compiler_rt/dist/lib/builtins/fixxfti.c":43 -1
+ */
 #undef	RS6000_DEFAULT_LONG_DOUBLE_SIZE
-#define RS6000_DEFAULT_LONG_DOUBLE_SIZE 128
+#define RS6000_DEFAULT_LONG_DOUBLE_SIZE 64
 
 #define POWERPC_NETBSD
 



CVS commit: src/external/gpl3/gcc/dist/gcc/config/rs6000

2019-05-10 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat May 11 02:37:58 UTC 2019

Modified Files:
src/external/gpl3/gcc/dist/gcc/config/rs6000: netbsd64.h

Log Message:
Switch PPC64 long double to 64 bits until the compiler is fixed.
XXX: This changes the ABI of the libraries.


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 \
src/external/gpl3/gcc/dist/gcc/config/rs6000/netbsd64.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



re: CVS commit: src/external/gpl3/gcc/dist/gcc/config

2019-04-10 Thread matthew green
"Maya Rashish" writes:
> Module Name:  src
> Committed By: maya
> Date: Wed Apr 10 16:11:06 UTC 2019
> 
> Modified Files:
>   src/external/gpl3/gcc/dist/gcc/config: netbsd.h
> 
> Log Message:
> remove bogus specs redefinition.
> fixes the use of -march=native

please revert this.

the right fix is to fix the x86 specific code which i have
a change in testing for.


.mrg.


Re: CVS commit: src/external/gpl3/gcc/dist/gcc

2016-03-23 Thread Joerg Sonnenberger
On Wed, Mar 23, 2016 at 08:52:43AM -0400, Christos Zoulas wrote:
> 3) Removed definitions of EH_RETURN_STACKADJ_RTX and STARTING_FRAME_OFFSET
> from gcc/config/vax/elf.h. It's not necessary to remember the stack
> adjustment or to waste four bytes on every stack frame for a value
> that's not needed. Also remove the suspicious changes in
> gcc/config/vax/vax.md to the definitions of call_pop and call_value
> regarding DW_CFA_GNU_args_size and EH unwinding. I reverted to the
> previous versions from an older version of GCC, adding a few useful
> comments that had been removed.

The latter part seems quite wrong as the VAX calling convention
generally requires reading the argument size from the stack...

Joerg


Re: CVS commit: src/external/gpl3/gcc/dist/gcc/config/i386

2013-01-03 Thread Joerg Sonnenberger
On Mon, Dec 31, 2012 at 10:08:18AM +, David Laight wrote:
 On Mon, Dec 31, 2012 at 03:00:42AM +0100, Joerg Sonnenberger wrote:
  On Sun, Dec 30, 2012 at 08:16:59PM +, David Laight wrote:
   Module Name:  src
   Committed By: dsl
   Date: Sun Dec 30 20:16:59 UTC 2012
   
   Modified Files:
 src/external/gpl3/gcc/dist/gcc/config/i386: i386.c
   
   Log Message:
   No need to check both TARGET_64BIT and ix86_preferred_stack_boundary = 
   64,
   if the former is true the latter is also true.
  
  At least in terms of documentation, this is a regression. TARGET_64BIT
  implies the presence of SSE support and that's somewhat independent of
  the separate preferred stack boundary
 
 Eh? TARGET_64BIT forces ix86_preferred_stack_boundary = 64.
 The fact that it also implies SSE support is relevant.

Only as default value, not if explicitly overriden?

Joerg


Re: CVS commit: src/external/gpl3/gcc/dist/gcc/config/i386

2013-01-03 Thread David Laight
On Thu, Jan 03, 2013 at 03:46:08PM +0100, Joerg Sonnenberger wrote:
   
   At least in terms of documentation, this is a regression. TARGET_64BIT
   implies the presence of SSE support and that's somewhat independent of
   the separate preferred stack boundary
  
  Eh? TARGET_64BIT forces ix86_preferred_stack_boundary = 64.
  The fact that it also implies SSE support is relevant.
 
 Only as default value, not if explicitly overriden?

It won't let you override to a lower value.

David

-- 
David Laight: da...@l8s.co.uk


Re: CVS commit: src/external/gpl3/gcc/dist/gcc/config/i386

2012-12-31 Thread David Laight
On Mon, Dec 31, 2012 at 03:00:42AM +0100, Joerg Sonnenberger wrote:
 On Sun, Dec 30, 2012 at 08:16:59PM +, David Laight wrote:
  Module Name:src
  Committed By:   dsl
  Date:   Sun Dec 30 20:16:59 UTC 2012
  
  Modified Files:
  src/external/gpl3/gcc/dist/gcc/config/i386: i386.c
  
  Log Message:
  No need to check both TARGET_64BIT and ix86_preferred_stack_boundary = 64,
  if the former is true the latter is also true.
 
 At least in terms of documentation, this is a regression. TARGET_64BIT
 implies the presence of SSE support and that's somewhat independent of
 the separate preferred stack boundary

Eh? TARGET_64BIT forces ix86_preferred_stack_boundary = 64.
The fact that it also implies SSE support is relevant.

David

-- 
David Laight: da...@l8s.co.uk


re: CVS commit: src/external/gpl3/gcc/dist/gcc/config/i386

2012-12-31 Thread matthew green

 Module Name:  src
 Committed By: dsl
 Date: Sun Dec 30 20:16:59 UTC 2012
 
 Modified Files:
   src/external/gpl3/gcc/dist/gcc/config/i386: i386.c
 
 Log Message:
 No need to check both TARGET_64BIT and ix86_preferred_stack_boundary = 64,
 if the former is true the latter is also true.

can this not be overriden with cli options?  the old
test seems safer.


Re: CVS commit: src/external/gpl3/gcc/dist/gcc/config/i386

2012-12-31 Thread David Laight
On Tue, Jan 01, 2013 at 02:06:31AM +1100, matthew green wrote:
 
  Module Name:src
  Committed By:   dsl
  Date:   Sun Dec 30 20:16:59 UTC 2012
  
  Modified Files:
  src/external/gpl3/gcc/dist/gcc/config/i386: i386.c
  
  Log Message:
  No need to check both TARGET_64BIT and ix86_preferred_stack_boundary = 64,
  if the former is true the latter is also true.
 
 can this not be overriden with cli options?  the old
 test seems safer.

No - for amd64 the ix86_preferred_stack_boundary is always = 64.

David

-- 
David Laight: da...@l8s.co.uk


Re: CVS commit: src/external/gpl3/gcc/dist/gcc/config/i386

2012-12-30 Thread Joerg Sonnenberger
On Sun, Dec 30, 2012 at 08:16:59PM +, David Laight wrote:
 Module Name:  src
 Committed By: dsl
 Date: Sun Dec 30 20:16:59 UTC 2012
 
 Modified Files:
   src/external/gpl3/gcc/dist/gcc/config/i386: i386.c
 
 Log Message:
 No need to check both TARGET_64BIT and ix86_preferred_stack_boundary = 64,
 if the former is true the latter is also true.

At least in terms of documentation, this is a regression. TARGET_64BIT
implies the presence of SSE support and that's somewhat independent of
the separate preferred stack boundary

Joerg


Re: CVS commit: src/external/gpl3/gcc/dist/gcc/config/i386

2012-10-08 Thread David Laight
On Sat, Oct 06, 2012 at 02:10:46PM +, Joerg Sonnenberger wrote:
 Module Name:  src
 Committed By: joerg
 Date: Sat Oct  6 14:10:46 UTC 2012
 
 Modified Files:
   src/external/gpl3/gcc/dist/gcc/config/i386: i386.h
 
 Log Message:
 PR 46978: ICE on spilling MMX registers
 
 GCC/i386 has code to lower the required alignment for long long to 32bit
 as the CPU doesn't need more. It is also using the same mode for setting
 up the MMX registers and in turn, the stack slots reserved for spilling
 require 32bit alignment. The actual vector types used keep the original
 64bit alignment, so when the compiler wants to spill a MMX register, it
 hits an assertion. Fix this by using the vector type as raw type for MMX
 registers.

Doesn't that enforce a 64bit alignment when it isn't needed?
Or have I misread the commit message?
Misaligned transfers for stack slots for MMX are actually fine.

Only the 128bit (and larger) accesses have to be aligned.

The performance penalty of misaligned 64bit transfers really is best
avoided by maintaining the stack alignment - and assuming it won't
get misaligned.

I suspect that the 'sub %sp,n' use to allocate a stack frame has
hardware optimisations that are absent from the 'and %sp,~7' needed
to realign it.

David

-- 
David Laight: da...@l8s.co.uk


Re: CVS commit: src/external/gpl3/gcc/dist/gcc/config/i386

2012-10-08 Thread Joerg Sonnenberger
On Mon, Oct 08, 2012 at 08:12:26AM +0100, David Laight wrote:
 On Sat, Oct 06, 2012 at 02:10:46PM +, Joerg Sonnenberger wrote:
  Module Name:src
  Committed By:   joerg
  Date:   Sat Oct  6 14:10:46 UTC 2012
  
  Modified Files:
  src/external/gpl3/gcc/dist/gcc/config/i386: i386.h
  
  Log Message:
  PR 46978: ICE on spilling MMX registers
  
  GCC/i386 has code to lower the required alignment for long long to 32bit
  as the CPU doesn't need more. It is also using the same mode for setting
  up the MMX registers and in turn, the stack slots reserved for spilling
  require 32bit alignment. The actual vector types used keep the original
  64bit alignment, so when the compiler wants to spill a MMX register, it
  hits an assertion. Fix this by using the vector type as raw type for MMX
  registers.
 
 Doesn't that enforce a 64bit alignment when it isn't needed?

Correct. Given the general usefulness of MMX, I'm inclined to just
ignore it.

 Misaligned transfers for stack slots for MMX are actually fine.

Also correct. I haven't had time to hunt down where it comes up with
that assumption though.

Joerg


Re: CVS commit: src/external/gpl3/gcc/dist/gcc

2012-09-16 Thread SAITOH Masanobu
(2012/09/16 16:26), SAITOH Masanobu wrote:
 Module Name:  src
 Committed By: msaitoh
 Date: Sun Sep 16 07:26:31 UTC 2012
 
 Modified Files:
   src/external/gpl3/gcc/dist/gcc: ChangeLog
   src/external/gpl3/gcc/dist/gcc/config/arm: arm.md
 
 Log Message:
 Fix gcc bugid 51408 for arm.
 
 
 To generate a diff of this commit:
 cvs rdiff -u -r1.3 -r1.4 src/external/gpl3/gcc/dist/gcc/ChangeLog
 cvs rdiff -u -r1.1.1.1 -r1.2 src/external/gpl3/gcc/dist/gcc/config/arm/arm.md
 
 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

Sorry, this change fixes PR#46972.


-- 
---
SAITOH Masanobu (msai...@execsw.org
 msai...@netbsd.org)


Re: CVS commit: src/external/gpl3/gcc/dist/gcc/config/i386

2012-09-14 Thread David Laight
On Fri, Sep 14, 2012 at 01:00:01PM +, Joerg Sonnenberger wrote:
 Module Name:  src
 Committed By: joerg
 Date: Fri Sep 14 13:00:01 UTC 2012
 
 Modified Files:
   src/external/gpl3/gcc/dist/gcc/config/i386: i386.c netbsd-elf.h
   netbsd64.h
 
 Log Message:
 Fix GCC to correctly implement the i386 psABI on NetBSD.
 This consists of two parts:
 - for NetBSD/i386 and NetBSD/AMD64 with -m32, use a default stack
   alignment of 23bit as specified by the ABI
 - ensure that double and long long variables on the stack are by default
   only aligned to 32bit, if there is nothing else in the function
   needing a larger stack alignment
 
 The combination ensures that SSE variables on the stack trigger the
 realignment logic, but just using double or long long doesn't.
 
 
 To generate a diff of this commit:
 cvs rdiff -u -r1.1.1.1 -r1.2 \
 src/external/gpl3/gcc/dist/gcc/config/i386/i386.c \
 src/external/gpl3/gcc/dist/gcc/config/i386/netbsd64.h
 cvs rdiff -u -r1.2 -r1.3 \
 src/external/gpl3/gcc/dist/gcc/config/i386/netbsd-elf.h
 
 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

I'm still to be convinced that the patches are correct.

David

-- 
David Laight: da...@l8s.co.uk