summaryrefslogtreecommitdiff
path: root/gnu/usr.bin/gcc
diff options
context:
space:
mode:
authorDale Rahn <drahn@cvs.openbsd.org>2004-02-03 17:26:05 +0000
committerDale Rahn <drahn@cvs.openbsd.org>2004-02-03 17:26:05 +0000
commita13d137c08a9e9b337b3baf4be3893558ac7723c (patch)
tree4a4969316136045bf1c136e50713fcc0836fd5fb /gnu/usr.bin/gcc
parentb5fb7921e4e7f1816a8526e26df9c1b97edba039 (diff)
new file is needed to get define early enough for other headers, add
OpenBSD to the comments, adjust target code to be same as netbsd, now working.
Diffstat (limited to 'gnu/usr.bin/gcc')
-rw-r--r--gnu/usr.bin/gcc/gcc/config.gcc2
-rw-r--r--gnu/usr.bin/gcc/gcc/config/arm/arm.md8
-rw-r--r--gnu/usr.bin/gcc/gcc/config/arm/openbsd.h26
-rw-r--r--gnu/usr.bin/gcc/gcc/config/arm/openbsd1.h22
4 files changed, 48 insertions, 10 deletions
diff --git a/gnu/usr.bin/gcc/gcc/config.gcc b/gnu/usr.bin/gcc/gcc/config.gcc
index 545c9d4ff74..f78b0fed36e 100644
--- a/gnu/usr.bin/gcc/gcc/config.gcc
+++ b/gnu/usr.bin/gcc/gcc/config.gcc
@@ -703,7 +703,7 @@ arm*-*-netbsdelf*)
tmake_file="${tmake_file} arm/t-netbsd"
;;
arm*-*-openbsd*)
- tm_file="dbxelf.h elfos.h arm/elf.h arm/aout.h arm/strongarm-elf.h arm/arm.h openbsd.h ${tm_file}"
+ tm_file="dbxelf.h elfos.h arm/openbsd1.h arm/elf.h arm/aout.h arm/arm.h openbsd.h ${tm_file}"
tmake_file="${tmake_file} arm/t-netbsd"
;;
arm*-*-netbsd*)
diff --git a/gnu/usr.bin/gcc/gcc/config/arm/arm.md b/gnu/usr.bin/gcc/gcc/config/arm/arm.md
index 0e6071295b9..6bcbb83d1b6 100644
--- a/gnu/usr.bin/gcc/gcc/config/arm/arm.md
+++ b/gnu/usr.bin/gcc/gcc/config/arm/arm.md
@@ -3948,7 +3948,13 @@
(match_operand:DI 1 "general_operand" ""))]
"TARGET_EITHER"
"
- if (TARGET_THUMB)
+ if (TARGET_ARM)
+ {
+ /* Everything except mem = const or mem = mem can be done easily */
+ if (GET_CODE (operands[0]) == MEM)
+ operands[1] = force_reg (DImode, operands[1]);
+ }
+ else /* TARGET_THUMB.... */
{
if (!no_new_pseudos)
{
diff --git a/gnu/usr.bin/gcc/gcc/config/arm/openbsd.h b/gnu/usr.bin/gcc/gcc/config/arm/openbsd.h
index c298ce34e9c..7091fd0d8f3 100644
--- a/gnu/usr.bin/gcc/gcc/config/arm/openbsd.h
+++ b/gnu/usr.bin/gcc/gcc/config/arm/openbsd.h
@@ -1,4 +1,4 @@
-/* Definitions of target machine for GNU compiler, NetBSD/arm ELF version.
+/* Definitions of target machine for GNU compiler, OpenBSD/arm ELF version.
Copyright (C) 2002 Free Software Foundation, Inc.
Contributed by Wasabi Systems, Inc.
@@ -45,7 +45,17 @@ Boston, MA 02111-1307, USA. */
/* Default it to use ATPCS with soft-VFP. */
#undef TARGET_DEFAULT
-#define TARGET_DEFAULT (ARM_FLAG_APCS_32 | ARM_FLAG_SOFT_FLOAT | ARM_FLAG_APCS_FRAME)
+/* Default it to use ATPCS with soft-VFP. */
+#undef TARGET_DEFAULT
+#define TARGET_DEFAULT \
+ (ARM_FLAG_APCS_32 \
+ | ARM_FLAG_SOFT_FLOAT \
+ | ARM_FLAG_APCS_FRAME \
+ | ARM_FLAG_ATPCS \
+ | ARM_FLAG_VFP \
+ | ARM_FLAG_MMU_TRAPS \
+ | TARGET_ENDIAN_DEFAULT)
+
#define TARGET_OS_CPP_BUILTINS() \
do \
@@ -115,7 +125,7 @@ Boston, MA 02111-1307, USA. */
/* We don't have any limit on the length as out debugger is GDB. */
#undef DBX_CONTIN_LENGTH
-/* NetBSD does its profiling differently to the Acorn compiler. We
+/* OpenBSD and NetBSD do their profiling differently to the Acorn compiler. We
don't need a word following the mcount call; and to skip it
requires either an assembly stub or use of fomit-frame-pointer when
compiling the profiling functions. Since we break Acorn CC
@@ -134,7 +144,7 @@ Boston, MA 02111-1307, USA. */
#undef TYPE_OPERAND_FMT
#define TYPE_OPERAND_FMT "%%%s"
-/* NetBSD uses the old PCC style aggregate returning conventions. */
+/* OpenBSD and NetBSD use the old PCC style aggregate returning conventions. */
#undef DEFAULT_PCC_STRUCT_RETURN
#define DEFAULT_PCC_STRUCT_RETURN 1
@@ -144,12 +154,12 @@ Boston, MA 02111-1307, USA. */
#undef RETURN_IN_MEMORY
-/* VERY BIG NOTE: Change of structure alignment for NetBSD/arm.
+/* VERY BIG NOTE: Change of structure alignment for OpenBSD|NetBSD/arm.
There are consequences you should be aware of...
Normally GCC/arm uses a structure alignment of 32 for compatibility
with armcc. This means that structures are padded to a word
- boundary. However this causes problems with bugged NetBSD kernel
+ boundary. However this causes problems with bugged OpenBSD|NetBSD kernel
code (possibly userland code as well - I have not checked every
binary). The nature of this bugged code is to rely on sizeof()
returning the correct size of various structures rounded to the
@@ -157,7 +167,7 @@ Boston, MA 02111-1307, USA. */
is another). This code breaks when the structure alignment is 32
as sizeof() will report a word=rounded size. By changing the
structure alignment to 8. GCC will conform to what is expected by
- NetBSD.
+ OpenBSD|NetBSD.
This has several side effects that should be considered.
1. Structures will only be aligned to the size of the largest member.
@@ -173,7 +183,7 @@ Boston, MA 02111-1307, USA. */
short strings.
This modification is not encouraged but with the present state of the
- NetBSD source tree it is currently the only solution that meets the
+ OpenBSD|NetBSD source tree it is currently the only solution that meets the
requirements. */
#undef DEFAULT_STRUCTURE_SIZE_BOUNDARY
diff --git a/gnu/usr.bin/gcc/gcc/config/arm/openbsd1.h b/gnu/usr.bin/gcc/gcc/config/arm/openbsd1.h
new file mode 100644
index 00000000000..7d002441a3b
--- /dev/null
+++ b/gnu/usr.bin/gcc/gcc/config/arm/openbsd1.h
@@ -0,0 +1,22 @@
+/* Definitions of target machine for GNU compiler, OpenBSD/arm ELF version.
+ Copyright (C) 2002 Free Software Foundation, Inc.
+
+This file is part of GNU CC.
+
+GNU CC is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU CC is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU CC; see the file COPYING. If not, write to
+the Free Software Foundation, 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA. */
+
+/* StrongARM family default cpu. */
+#define SUBTARGET_CPU_DEFAULT TARGET_CPU_strongarm