This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch] add new target - msp430


HI Fellows,

Providing all the paper work has been done and this target has been added to 
binutils tree the attached is a toplevel diff file which introduces new 
target - Texas Instruments msp430 MCU.

Where can I post the rest - target specific files (overall size - 70K bzipped)

Cheers,
Dmitry


Index: config.sub
===================================================================
RCS file: /cvsroot/gcc/gcc/config.sub,v
retrieving revision 1.70
diff -c -3 -p -u -r1.70 config.sub
--- config.sub  17 Dec 2002 10:01:10 -0000      1.70
+++ config.sub  9 Jan 2003 13:20:22 -0000
@@ -250,6 +250,7 @@ case $basic_machine in
        | mipsisa64sr71k | mipsisa64sr71kel \
        | mipstx39 | mipstx39el \
        | mn10200 | mn10300 \
+       | msp430 \
        | ns16k | ns32k \
        | openrisc | or32 \
        | pdp10 | pdp11 | pj | pjl \
Index: configure
===================================================================
RCS file: /cvsroot/gcc/gcc/configure,v
retrieving revision 1.63
diff -c -3 -p -u -r1.63 configure
--- configure   7 Jan 2003 21:57:34 -0000       1.63
+++ configure   9 Jan 2003 13:20:27 -0000
@@ -1106,6 +1106,9 @@ case "${target}" in
   avr-*-*)
     noconfigdirs="$noconfigdirs target-libiberty ${libstdcxx_version} ${libgcj}"
     ;;
+  msp430-*-*)
+    noconfigdirs="$noconfigdirs target-libiberty ${libstdcxx_version} ${libgcj}"
+    ;;
   c4x-*-* | tic4x-*-*)
     noconfigdirs="$noconfigdirs ${libstdcxx_version} target-libgloss ${libgcj}"
     ;;
Index: configure.in
===================================================================
RCS file: /cvsroot/gcc/gcc/configure.in,v
retrieving revision 1.208
diff -c -3 -p -u -r1.208 configure.in
--- configure.in        7 Jan 2003 20:40:40 -0000       1.208
+++ configure.in        9 Jan 2003 13:20:27 -0000
@@ -449,6 +449,9 @@ case "${target}" in
   avr-*-*)
     noconfigdirs="$noconfigdirs target-libiberty ${libstdcxx_version} ${libgcj}"
     ;;
+  msp430-*-*)
+    noconfigdirs="$noconfigdirs target-libiberty ${libstdcxx_version} ${libgcj}"
+    ;;
   c4x-*-* | tic4x-*-*)
     noconfigdirs="$noconfigdirs ${libstdcxx_version} target-libgloss ${libgcj}"
     ;;
Index: gcc/Makefile.in
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/Makefile.in,v
retrieving revision 1.965
diff -c -3 -p -u -r1.965 Makefile.in
--- gcc/Makefile.in     9 Jan 2003 08:00:35 -0000       1.965
+++ gcc/Makefile.in     9 Jan 2003 13:20:33 -0000
@@ -802,7 +802,7 @@ LIB2FUNCS_2 = _floatdixf _fixunsxfsi _fi
     _addvdi3 _subvsi3 _subvdi3 _mulvsi3 _mulvdi3 _negvsi2 _negvdi2 _ctors

 # Defined in libgcc2.c, included only in the static library.
-LIB2FUNCS_ST = _eprintf _gcov __gcc_bcmp
+LIB2FUNCS_ST?= _eprintf _gcov __gcc_bcmp

 FPBIT_FUNCS = _pack_sf _unpack_sf _addsub_sf _mul_sf _div_sf \
     _fpcmp_parts_sf _compare_sf _eq_sf _ne_sf _gt_sf _ge_sf \
Index: gcc/config.gcc
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/config.gcc,v
retrieving revision 1.274
diff -c -3 -p -u -r1.274 config.gcc
--- gcc/config.gcc      8 Jan 2003 19:57:44 -0000       1.274
+++ gcc/config.gcc      9 Jan 2003 13:20:34 -0000
@@ -713,6 +713,8 @@ arm-*-pe*)
        ;;
 avr-*-*)
        ;;
+msp430-*-*)
+       ;;
 c4x-*-rtems* | tic4x-*-rtems*)
        xm_defines=POSIX
        tmake_file="c4x/t-c4x t-rtems"
@@ -1933,6 +1935,8 @@ pdp11-*-bsd)
 pdp11-*-*)
        ;;
 avr-*-*)
+       ;;
+msp430-*-*)
        ;;
 ns32k-*-openbsd*)
        # Nothing special
Index: extend.texi
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/doc/extend.texi,v
retrieving revision 1.114
diff -c -3 -p -u -r1.114 extend.texi
--- extend.texi	9 Jan 2003 05:23:54 -0000	1.114
+++ extend.texi	9 Jan 2003 14:19:53 -0000
@@ -2450,7 +2450,7 @@ this attribute to work correctly.
 
 @item interrupt
 @cindex interrupt handler functions
-Use this attribute on the ARM, AVR, C4x, M32R/D and Xstormy16 ports to indicate
+Use this attribute on the ARM, AVR, C4x, M32R/D, MSP430 and Xstormy16 ports to indicate
 that the specified function is an interrupt handler.  The compiler will
 generate function entry and exit sequences suitable for use in an
 interrupt handler when this attribute is present.
@@ -2469,6 +2469,14 @@ void f () __attribute__ ((interrupt ("IR
 
 Permissible values for this parameter are: IRQ, FIQ, SWI, ABORT and UNDEF@.
 
+Note, on the MSP430 you must specify the vector offset by adding a parameter
+to the interrupt attribute like this:
+
+@smallexample
+void f () __attribute__ ((interrupt (OFFSET)));
+@end smallexample
+
+
 @item interrupt_handler
 @cindex interrupt handler functions on the H8/300 and SH processors
 Use this attribute on the H8/300, H8/300H and SH to indicate that the
@@ -2521,7 +2529,7 @@ attribute is present.  Interrupts will b
 
 @item naked
 @cindex function without a prologue/epilogue code
-Use this attribute on the ARM, AVR, C4x and IP2K ports to indicate that the
+Use this attribute on the ARM, AVR, C4x, MSP430 and IP2K ports to indicate that the
 specified function do not need prologue/epilogue sequences generated by
 the compiler.  It is up to the programmer to provide these sequences.
 
Index: install.texi
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/doc/install.texi,v
retrieving revision 1.160
diff -c -3 -p -u -r1.160 install.texi
--- install.texi	3 Jan 2003 10:16:30 -0000	1.160
+++ install.texi	9 Jan 2003 14:20:01 -0000
@@ -2876,6 +2876,32 @@ information about using GCC on IRIX plat
 @html
 <hr />
 @end html
+@heading @anchor{msp430}msp430
+
+Texas Instrument MSP430-family micro controllers.  These are used in embedded
+applications.  There are no standard Unix configurations.
+@ifnothtml
+@xref{MSP430 Options,, MSP430 Options, gcc, Using and Porting the GNU Compiler
+Collection (GCC)},
+@end ifnothtml
+@ifhtml
+See ``MSP430 Options'' in the main manual
+@end ifhtml
+for the list of supported MCU types.
+
+Use @samp{configure --target=msp430 --enable-languages="c"} to configure GCC@.
+
+Further installation notes and other useful information about MSP430 tools
+can also be obtained from:
+
+@itemize @bullet
+@item
+@uref{http://www.ti.com,,http://mspgcc.sourceforge.org}
+@end itemize
+
+@html
+<hr />
+@end html
 @heading @anchor{powerpc*-*-*}powerpc-*-*
 
 You can specify a default version for the @option{-mcpu=@var{cpu_type}}
Index: invoke.texi
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/doc/invoke.texi,v
retrieving revision 1.220
diff -c -3 -p -u -r1.220 invoke.texi
--- invoke.texi	8 Jan 2003 19:57:52 -0000	1.220
+++ invoke.texi	9 Jan 2003 14:20:31 -0000
@@ -620,6 +620,12 @@ in the following sections.
 -melf -mbranch-predict -mno-branch-predict -mbase-addresses @gol
 -mno-base-addresses -msingle-exit -mno-single-exit}
 
+@emph{MSP430 Options}
+@gccoptlist{
+-mforce-hw-mul -mno-stack-init -mno-volatile-workaround @gol
+-mdisable-hwmul -mhwmul-no-int -msave-prologue -minline-hwmul @gol
+-mmcu=@var{mcu} -minit-stack=@var{val} -mendup-at=@var{name}}
+
 @emph{IA-64 Options}
 @gccoptlist{
 -mbig-endian  -mlittle-endian  -mgnu-as  -mgnu-ld  -mno-pic @gol
@@ -5286,6 +5292,7 @@ that macro, which enables you to change 
 * NS32K Options::
 * AVR Options::
 * MCore Options::
+* MSP430 Options::
 * IA-64 Options::
 * D30V Options::
 * S/390 and zSeries Options::
@@ -9269,7 +9276,6 @@ This may be useful for operating systems
 Assume code will be loaded in the first 512MB of virtual address space.
 This is the default for all platforms.
 
-
 @end table
 
 @node AVR Options
@@ -9411,6 +9417,55 @@ Generate code for a little endian target
 @opindex m210
 @opindex m340
 Generate code for the 210 processor.
+@end table
+
+@node MSP430 Options
+@subsection MSP430 Options
+@cindex MSP430 Options
+These options are defined for MSP430 implementatio:
+
+@table @gcctabopt
+@item -mmcu=@var{mcu}
+@opindex mmcu
+Specify MSP430 architecture. All architectures supported. 
+For example:
+@smallexample
+-mmcu=msp430x149
+@end smallexample
+
+Upon this option gcc decides use or not hardware multiplier and passes
+further options to assembler and linker.
+
+@item -minit-stack=@var{N}
+@opindex minit-stack
+Specify the initial stack address, which may be a symbol or numeric value,
+@samp{__stack} is the default.
+  
+@item -mendup-at=@var{name}
+@opindex endup-at
+By passing this option user tells to gcc where to jump after main exits.
+@samp{__stop_ProgExec_} is default.
+
+@item -mforce-hw-mul
+@opindex force-hw-mul
+Force gcc to use hardware multiplier.
+
+@item -mdisable-hwmul
+@opindex disable-hwmul
+Disable hardware multiplier.
+
+@item -mhwmul-no-int
+@opindex hwmul-no-int
+Do not disable interrupts around hardware multiplication code.
+
+@item -mno-stack-init
+@opindex no-stack-init
+Do not init stack (r1) in main's prologue.
+
+@item -msave-prologue
+@opindex save-prologue
+Try to expand function prologue via library call instead of inlining.
+
 @end table
 
 @node IA-64 Options
Index: md.texi
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/doc/md.texi,v
retrieving revision 1.61
diff -c -3 -p -u -r1.61 md.texi
--- md.texi	7 Jan 2003 21:09:21 -0000	1.61
+++ md.texi	9 Jan 2003 14:20:48 -0000
@@ -2020,6 +2020,16 @@ Constants in the range @minus{}8 to 2
 
 @end table
 
+@item MSP430---@file{msp430.h}
+@table @code
+@item R
+Indexed mode @code{@@Rn}
+
+@item P
+Auto-generated constants: -1, 0, 1, 2, 4 and 8
+
+@end table
+
 @need 1000
 @item SPARC---@file{sparc.h}
 @table @code

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]