summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>1997-09-05 17:43:51 +0000
committerlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>1997-09-05 17:43:51 +0000
commit148549fab36e04a28e20524c2b4c68ae646ab172 (patch)
treeece88107a5f321dcd578f8a6f8ba6c1218b6d565
parent747fe2d146c7e865e7cd5b8d9f94b53b1498928b (diff)
downloadgcc-148549fab36e04a28e20524c2b4c68ae646ab172.tar.gz
* v850: New directory for v850 port.
* v850/lib1funcs.asm: New file. * t-v850, v850.c, v850.h, v850.md, xm-v850.h: New files. * ginclude/va-v850.h: New file. * varargs.h, stdarg.h: Include va-mn10200.h. * configure.in (mn10200-*-*): New target. * Makefile.in (USER_H): Add va-mn10200.h. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@15104 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog13
-rw-r--r--gcc/Makefile.in1
-rwxr-xr-xgcc/config.sub2
-rwxr-xr-xgcc/configure10
-rw-r--r--gcc/configure.in10
-rw-r--r--gcc/ginclude/stdarg.h4
-rw-r--r--gcc/ginclude/va-v850.h37
-rw-r--r--gcc/ginclude/varargs.h4
-rw-r--r--gcc/invoke.texi54
9 files changed, 134 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index bfb637e5abf..c151b8cbda9 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,16 @@
+Fri Sep 5 10:08:44 1997 Jeffrey A Law (law@cygnus.com)
+
+ * v850: New directory for v850 port.
+ * v850/lib1funcs.asm: New file.
+ * t-v850, v850.c, v850.h, v850.md, xm-v850.h: New files.
+ * ginclude/va-v850.h: New file.
+ * ginclude/varargs.h, ginclude/stdarg.h: Include va-mn10200.h.
+ * configure.in (mn10200-*-*): New target.
+ * configure: Rebuilt.
+ * config.sub: Handle v850-elf.
+ * Makefile.in (USER_H): Add va-mn10200.h.
+ * invoke.texi: Document v850 stuff.
+
Fri Sep 5 09:37:50 1997 Jim Wilson (wilson@cygnus.com)
* m68k/m68k.h (MACHINE_STATE_SAVE, MACHINE_STATE_RESTORE): Add
diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index 313a73959cb..9f70aa4a565 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -126,6 +126,7 @@ USER_H = $(srcdir)/ginclude/stdarg.h $(srcdir)/ginclude/stddef.h \
$(srcdir)/ginclude/va-pyr.h $(srcdir)/ginclude/va-sparc.h \
$(srcdir)/ginclude/va-clipper.h $(srcdir)/ginclude/va-spur.h \
$(srcdir)/ginclude/va-m32r.h $(srcdir)/ginclude/va-sh.h \
+ $(srcdir)/ginclude/va-v850.h \
$(srcdir)/ginclude/iso646.h $(srcdir)/ginclude/va-ppc.h \
$(srcdir)/ginclude/proto.h $(EXTRA_HEADERS) \
$(LANG_EXTRA_HEADERS)
diff --git a/gcc/config.sub b/gcc/config.sub
index 3d96b0145f7..b6e8aed34d0 100755
--- a/gcc/config.sub
+++ b/gcc/config.sub
@@ -155,7 +155,7 @@ case $basic_machine in
| alpha | alphaev5 | alphaev56 | we32k | ns16k | clipper \
| i370 | sh | powerpc | powerpcle | 1750a | dsp16xx | pdp11 \
| mips64 | mipsel | mips64el | mips64orion | mips64orionel \
- | sparc | sparclet | sparclite | sparc64)
+ | sparc | sparclet | sparclite | sparc64 | v850)
basic_machine=$basic_machine-unknown
;;
# We use `pc' rather than `unknown'
diff --git a/gcc/configure b/gcc/configure
index 0e16d03cc16..0999828ba84 100755
--- a/gcc/configure
+++ b/gcc/configure
@@ -3906,6 +3906,16 @@ for machine in $build $host $target; do
# cpu_type=gmicro
# use_collect2=yes
# ;;
+ v850-*-*)
+ cpu_type=v850
+ tm_file="v850/v850.h"
+ xm_file="v850/xm-v850.h"
+ if [ x$stabs = xyes ]
+ then
+ tm_file="${tm_file} dbx.h"
+ fi
+ use_collect2=no
+ ;;
vax-*-bsd*) # vaxen running BSD
use_collect2=yes
float_format=vax
diff --git a/gcc/configure.in b/gcc/configure.in
index 2611ed85907..bcae8380be6 100644
--- a/gcc/configure.in
+++ b/gcc/configure.in
@@ -2434,6 +2434,16 @@ for machine in $build $host $target; do
# cpu_type=gmicro
# use_collect2=yes
# ;;
+ v850-*-*)
+ cpu_type=v850
+ tm_file="v850/v850.h"
+ xm_file="v850/xm-v850.h"
+ if [[ x$stabs = xyes ]]
+ then
+ tm_file="${tm_file} dbx.h"
+ fi
+ use_collect2=no
+ ;;
vax-*-bsd*) # vaxen running BSD
use_collect2=yes
float_format=vax
diff --git a/gcc/ginclude/stdarg.h b/gcc/ginclude/stdarg.h
index 694865a69b8..c497199d735 100644
--- a/gcc/ginclude/stdarg.h
+++ b/gcc/ginclude/stdarg.h
@@ -53,6 +53,9 @@
#ifdef __mn10200__
#include "va-mn10200.h"
#else
+#ifdef __v850__
+#include "va-v850.h"
+#else
/* Define __gnuc_va_list. */
@@ -109,6 +112,7 @@ void va_end (__gnuc_va_list); /* Defined in libgcc.a */
#endif /* _STDARG_H */
+#endif /* not v850 */
#endif /* not mn10200 */
#endif /* not mn10300 */
#endif /* not sh */
diff --git a/gcc/ginclude/va-v850.h b/gcc/ginclude/va-v850.h
new file mode 100644
index 00000000000..3fd812ab228
--- /dev/null
+++ b/gcc/ginclude/va-v850.h
@@ -0,0 +1,37 @@
+/* CYGNUS LOCAL v850/law (entire file ) */
+
+/* Define __gnuc_va_list. */
+
+#ifndef __GNUC_VA_LIST
+#define __GNUC_VA_LIST
+typedef void *__gnuc_va_list;
+#endif /* not __GNUC_VA_LIST */
+
+/* If this is for internal libc use, don't define anything but
+ __gnuc_va_list. */
+#if defined (_STDARG_H) || defined (_VARARGS_H)
+
+#ifdef _STDARG_H
+#define va_start(AP, LASTARG) \
+ (AP = ((__gnuc_va_list) __builtin_next_arg (LASTARG)))
+#else
+#define __va_ellipsis ...
+#define va_alist __builtin_va_alist
+#define va_dcl int __builtin_va_alist; __va_ellipsis
+#define va_start(AP) AP=(char *) &__builtin_va_alist
+#endif
+
+/* Now stuff common to both varargs & stdarg implementations. */
+#define __va_rounded_size(TYPE) \
+ (((sizeof (TYPE) + sizeof (int) - 1) / sizeof (int)) * sizeof (int))
+#undef va_end
+void va_end (__gnuc_va_list);
+#define va_end(AP) ((void)0)
+#define va_arg(AP, TYPE) \
+ (sizeof (TYPE) > 8 \
+ ? (AP = (__gnuc_va_list) ((char *) (AP) + __va_rounded_size (char *)),\
+ **((TYPE **) (void *) ((char *) (AP) - __va_rounded_size (char *))))\
+ : (AP = (__gnuc_va_list) ((char *) (AP) + __va_rounded_size (TYPE)), \
+ *((TYPE *) (void *) ((char *) (AP) - __va_rounded_size (TYPE)))))
+#endif
+/* END CYGNUS LOCAL */
diff --git a/gcc/ginclude/varargs.h b/gcc/ginclude/varargs.h
index e0db8cc187b..dbe97354aba 100644
--- a/gcc/ginclude/varargs.h
+++ b/gcc/ginclude/varargs.h
@@ -51,6 +51,9 @@
#ifdef __mn10200__
#include "va-mn10200.h"
#else
+#ifdef __v850__
+#include "va-v850.h"
+#else
#ifdef __NeXT__
@@ -126,6 +129,7 @@ typedef void *__gnuc_va_list;
/* Copy __gnuc_va_list into another variable of this type. */
#define __va_copy(dest, src) (dest) = (src)
+#endif /* not v850 */
#endif /* not mn10200 */
#endif /* not mn10300 */
#endif /* not sh */
diff --git a/gcc/invoke.texi b/gcc/invoke.texi
index b94a9f9adf5..30aacfac6af 100644
--- a/gcc/invoke.texi
+++ b/gcc/invoke.texi
@@ -344,6 +344,12 @@ in the following sections.
-Qy -Qn -YP,@var{paths} -Ym,@var{dir}
@end smallexample
+@emph{V850 Options}
+-mlong-calls -mno-long-calls -mep -mno-ep
+-mprolog-function -mno-prolog-function -mspace
+-mtda=@var{n} -msda=@var{n} -mzda=@var{n}
+@end smallexample
+
@item Code Generation Options
@xref{Code Gen Options,,Options for Code Generation Conventions}.
@smallexample
@@ -2766,6 +2772,7 @@ that macro, which enables you to change the defaults.
* H8/300 Options::
* SH Options::
* System V Options::
+* V850 Options::
@end menu
@node M680x0 Options
@@ -4920,6 +4927,53 @@ The assembler uses this option.
@c the generic assembler that comes with Solaris takes just -Ym.
@end table
+@node V850 Options
+@subsection V850 Options
+@cindex V850 Options
+
+These @samp{-m} options are defined for V850 implementations:
+
+@table @code
+@item -mlong-calls
+@itemx -mno-long-calls
+Treat all calls as being far away (near). If calls are assumed to be
+far away, the compiler will always load the functions address up into a
+register, and call indirect through the pointer.
+
+@item -mno-ep
+@item -mep
+Do not optimize (do optimize) basic blocks that use the same index
+pointer 4 or more times to copy pointer into the @code{ep} register, and
+use the shorter @code{sld} and @code{sst} instructions. The @samp{-mep}
+option is on by default if you optimize.
+
+@item -mno-prolog-function
+@itemx -mprolog-function
+Do not use (do use) external functions to save and restore registers at
+the prolog and epilog of a function. The external functions are slower,
+but use less code space if more than one function saves the same number
+of registers. The @samp{-mprolog-function} option is on by default if
+you optimize.
+
+@item -mspace
+Try to make the code as small as possible. At present, this just turns
+on the @samp{-mep} and @samp{-mprolog-function} options.
+
+@item -mtda=@var{n}
+Put static or global variables whose size is @var{n} bytes or less into
+the tiny data area that register @code{ep} points to. The tiny data
+area can hold up to 256 bytes in total (128 bytes for byte references).
+
+@item -msda=@var{n}
+Put static or global variables whose size is @var{n} bytes or less into
+the small data area that register @code{gp} points to. The small data
+area can hold up to 64 kilobytes.
+
+@item -mzda=@var{n}
+Put static or global variables whose size is @var{n} bytes or less into
+the first 32 kilobytes of memory.
+@end table
+
@node Code Gen Options
@section Options for Code Generation Conventions
@cindex code generation conventions