diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index bfb637e5abfff3342d7bd25584108cad8d96d409..c151b8cbda9a94a910c173d5e617dc8343f0d031 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 313a73959cb8d3be76ca770cdf11e75a6f6a7747..9f70aa4a565072544a068137d977deae44122e88 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 3d96b0145f735084a14a9d58948de53f9361426e..b6e8aed34d05c82ebb89fe302a71157a890532c9 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 0e16d03cc166a34e132575d3236811afa20310d4..0999828ba842a2eeac0486b2348acbe5699cda2b 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 2611ed85907b002df24999faf05214d6e701b68a..bcae8380be675ed57259c3352f291b3760c351f1 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 694865a69b873230582d0f3a1ee7206a999771f3..c497199d735579b45cd7e49865bd2b9a66ae84c9 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 0000000000000000000000000000000000000000..3fd812ab228e57c2ab7cb147c1da3bc0f3fab57b
--- /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 e0db8cc187b498deba33cd98e00900252dfdca68..dbe97354abadb2f8f8a0dd9aa1589d584779467a 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 b94a9f9adf53340ff3d48f080e4357330b737c63..30aacfac6af32a5d0475da82e9737ab863193142 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