CVS: msp430-libc/src .cvsignore, NONE, 1.1.2.1 core_common.inc, NONE, 1.1.2.1 Makefile, 1.49, 1.49.2.1 gcrt0.S, 1.11, 1.11.2.1

"Sergey A. Borshch" <[email protected]> Mon, 26 Jan 2009 15:47:15 +0000
Newsgroups gmane.comp.hardware.texas-instruments.msp430.gcc.cvs
Message-ID <[email protected]>
Update of /cvsroot/mspgcc/msp430-libc/src
In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv21574/src

Modified Files:
      Tag: MSP430X
	Makefile gcrt0.S 
Added Files:
      Tag: MSP430X
	.cvsignore core_common.inc 
Log Message:
multilib support added. 
430X support added. 
crt functions moved from libgcc to libc.
setjmp rewritten.


--- NEW FILE: .cvsignore ---
build
--- NEW FILE: core_common.inc ---
#ifndef  __CORE_COMMON_H__
#define  __CORE_COMMON_H__
#if defined (__ASSEMBLER__)

/*
 * if __MSP430X2__ defined, __MSP430X__ is defined too
 * so we check for __MSP430X__ only
 */
#if defined(__MSP430X__)
  #if defined(__MSP430X_ADDR_16BIT__)
    #define XBR     br
    #define XCALL   call
    #define XRET    ret
    #define XMOVA   mov
    #define XCMP    cmp
  #else
    #define XBR     bra
    #define XCALL   calla
    #define XRET    reta
    #define XMOVA   mova
    #define XCMP    cmpa
  #endif
  #if defined(__MSP430X_REGS_16BIT__)
    #define XPUSH   pushx.w
    #define XPOP    popx.w
    #define XPUSHM  pushm.w
    #define XPOPM   popm.w
    #define XMOV    movx.w
    .equ    PUSH_BYTES, 2
  #else
    #define XPUSH   pushx.a
    #define XPOP    popx.a
    #define XPUSHM  pushm.a
    #define XPOPM   popm.a
    #define XMOV    movx.a
    .equ    PUSH_BYTES, 4
  #endif
#else
  #define XBR     br
  #define XCALL   call
  #define XRET    ret
  #define XMOV    mov
  #define XCMP    cmp
  #define XPUSH   push
  #define XPOP    pop
  #define XMOVA   mov
  .equ    PUSH_BYTES, 2
#endif

#endif  /* __ASSEMBLER__ */

#endif  /* __CORE_COMMON_H__ */

Index: Makefile
===================================================================
RCS file: /cvsroot/mspgcc/msp430-libc/src/Makefile,v
retrieving revision 1.49
retrieving revision 1.49.2.1
diff -u -w -d -r1.49 -r1.49.2.1
--- Makefile	7 Dec 2008 22:45:57 -0000	1.49
+++ Makefile	26 Jan 2009 15:47:13 -0000	1.49.2.1
@@ -3,7 +3,7 @@
 #
 # $Id$
 #
-VERSION = 20080812
+VERSION = 20081208
 
 # installation prefix (set this if you don't install by hand)
 
@@ -19,103 +19,127 @@
 includedir = ${prefix_target}/include
 libdir = ${prefix_target}/lib
 
-srcdir = .
+SRC_ROOT := .
+BUILD_ROOT = ./Build
 
-CC = ${target}-gcc
-AS = ${target}-gcc -x assembler-with-cpp
-AR = ${target}-ar
+CC = ${bindir}/gcc
+AS = ${bindir}/gcc -x assembler-with-cpp
+AR = ${bindir}/ar
 RM = rm
 MD = mkdir -p $@
 INSTALL = install -c -m644 $^/
 
-ASFLAGS = -Wa,-gstabs
-CFLAGS = -Wall -O2 -g
-
+COMMON := $(LIB_OPTIONS)
 # make sure we can find our header files (not the installed ones)
+COMMON += -I$(SRC_ROOT)/../include 
+COMMON += -I$(SRC_ROOT)
 
-ALL_ASFLAGS += -I$(srcdir)/../include -I$(srcdir) ${ASFLAGS}
-ALL_CFLAGS += -I$(srcdir)/../include -I$(srcdir) ${CFLAGS}
+ASFLAGS = $(COMMON)
+ASFLAGS += -Wa,-gdwarf-2
+#ASFLAGS += -Wa,-ahlmsd=$(<:.S=.lst)
+#ASFLAGS += -v
+
+CFLAGS = $(COMMON)
+CFLAGS += -Wall -Os -gdwarf-2
 
-opt_speed_cflags = -O2
 
 # further declaration... 
+SRCDIRS = .
 ifdef gnu
- source_dirs = gnu
+ SRCDIRS += gnu
 else
- source_dirs = bsd
+ SRCDIRS = bsd
 endif
+SRCDIRS += stdlib
+SRCDIRS += string
+SRCDIRS += libm
 
-source_dirs = 
+VPATH := $(addprefix $(SRC_ROOT)/, $(SRCDIRS))
+#vpath
+#vpath %.c $(SRCDIRS)
+#vpath %.S $(SRCDIRS)
 
-VPATH = $(addprefix $(srcdir)/, $(source_dirs))
 
-all: build-crt build-libc build-libm
+all: build install
+print:
+	@$(CC) --print-multi-lib
+build: build-crt build-multilib
+install: install-crt install-headers install-multilib
+clean:
+	${RM} -rf $(BUILD_ROOT)
 
-install: install-crt install-libc install-headers install-libm
+.PHONY: clean clean-crt clean-multilib
 
-clean: clean-crt clean-libc clean-libm
+#--------- crt ---------------------------------------
+BUILDDIR := $(BUILD_ROOT)
+MCU_LIST := $(strip $(shell $(CC) --target-help | sed  -n '/Known MCU names/,/no/p' | sed -n '/msp430/p' 2>/dev/null))
+CRT_OBJS := $(addprefix $(BUILDDIR)/, $(addsuffix .o,$(subst msp,crt,$(MCU_LIST))))
 
+# match by name
+$(CRT_OBJS): $(BUILDDIR)/crt%.o: gcrt0.S
+	${AS} $(ASFLAGS) $(subst crt, -mmcu=msp, $(subst .o,,$(notdir $@))) -c $< -o $@
 
-crt_all_objs = \
-	crt430x110.o   crt430x112.o \
-	crt430x1101.o  crt430x1111.o  crt430x1121.o \
-	crt430x1122.o  crt430x1132.o \
-	crt430x122.o   crt430x123.o \
-	crt430x1222.o  crt430x1232.o \
-	crt430x133.o   crt430x135.o \
-	crt430x1331.o  crt430x1351.o \
-	crt430x147.o   crt430x148.o   crt430x149.o \
-	crt430x1471.o  crt430x1481.o  crt430x1491.o \
-	crt430x155.o   crt430x156.o   crt430x157.o \
-	crt430x167.o   crt430x168.o   crt430x169.o   crt430x1610.o  crt430x1611.o  crt430x1612.o \
-	crt430x2001.o  crt430x2011.o \
-	crt430x2002.o  crt430x2012.o \
-	crt430x2003.o  crt430x2013.o \
-	crt430x2101.o  crt430x2111.o  crt430x2121.o  crt430x2131.o \
-	crt430x2112.o  crt430x2122.o  crt430x2132.o \
-	crt430x2232.o  crt430x2252.o  crt430x2272.o \
-	crt430x2234.o  crt430x2254.o  crt430x2274.o \
-	crt430x233.o   crt430x235.o \
-	crt430x2330.o  crt430x2350.o  crt430x2370.o \
-	crt430x247.o   crt430x248.o   crt430x249.o   crt430x2410.o \
-	crt430x2471.o  crt430x2481.o  crt430x2491.o  \
-	crt430x2416.o  crt430x2417.o  crt430x2418.o  crt430x2419.o \
-	crt430x2616.o  crt430x2617.o  crt430x2618.o  crt430x2619.o \
-	crt430x311.o   crt430x312.o   crt430x313.o   crt430x314.o   crt430x315.o \
-	crt430x323.o   crt430x325.o   crt430x336.o   crt430x337.o \
-	crt430x412.o   crt430x413.o   crt430x415.o   crt430x417.o \
-	crt430x423.o   crt430x425.o   crt430x427.o \
-	crt430x4250.o  crt430x4260.o  crt430x4270.o \
-	crt430xG4250.o crt430xG4260.o crt430xG4270.o \
-	crt430xE423.o  crt430xE425.o  crt430xE427.o \
-	crt430xE4232.o crt430xE4242.o crt430xE4252.o crt430xE4272.o \
-	crt430xW423.o  crt430xW425.o  crt430xW427.o \
-	crt430xG437.o  crt430xG438.o  crt430xG439.o \
-	crt430x435.o   crt430x436.o   crt430x437.o \
-	crt430x4351.o  crt430x4361.o  crt430x4371.o \
-	crt430x447.o   crt430x448.o   crt430x449.o \
-	crt430xG4616.o crt430xG4617.o crt430xG4618.o crt430xG4619.o \
-	crt430x4783.o  crt430x4784.o  crt430x4793.o  crt430x4794.o \
-	crt430x5418.o  crt430x5419.o  \
-	crt430x5435.o  crt430x5436.o  crt430x5437.o  crt430x5438.o \
+crt: build-crt install-crt
 	
+build-crt: makedir-crt $(CRT_OBJS)
 
-build-crt: ${crt_all_objs}
+clean-crt:
+	${RM} -f $(CRT_OBJS)
 
-# match by name
+install-crt: $(CRT_OBJS) ${libdir}
+	${INSTALL}
 
-${crt_all_objs}: crt%.o: gcrt0.S
-	${AS} ${CPPFLAGS} -mmcu=msp$* ${ALL_ASFLAGS} -c $(ABSPATH)$< -o $@
+makedir-crt:
+	mkdir -p $(BUILDDIR)
 
-clean-crt:
-	${RM} -f ${crt_all_objs}
+#------- multilib --------
+multilib: build-multilib install-multilib
+build-multilib: 
+	for i in `$(CC) --print-multi-lib 2>/dev/null`; do \
+	  dir=`echo $$i | sed -e 's/;.*$$//'` ; \
+	  options=`echo $$i | sed -e 's/[^@]*//' -e 's/@/ -/g'`; \
+	  $(MAKE) "MULTILIB_DIR=$$dir" "LIB_OPTIONS=$$options" build-libc build-libm ; \
+	done; 
 
-install-crt: ${crt_all_objs} ${libdir}
+install-multilib:
+	for i in `$(CC) --print-multi-lib 2>/dev/null`; do \
+	  dir=`echo $$i | sed -e 's/;.*$$//'` ; \
+	  mkdir -p $(libdir)/$$dir; \
+	  $(MAKE) MULTILIB_DIR="$$dir" install-libc install-libm ; \
+	done;
+
+.PHONY: clean-multilib clean-libc clean-libm
+clean-multilib:
+	for i in `$(CC) --print-multi-lib 2>/dev/null`; do \
+	  dir=`echo $$i | sed -e 's/;.*$$//'` ; \
+	  $(MAKE) "MULTILIB_DIR=$$dir" clean-libc clean-libm; \
+	done; 
+
+#--------------- headers ---------------
+
+install-headers: ins-hr ins-hs ins-msp430
+
+ins-hr: $(wildcard $(SRC_ROOT)/../include/*.h) ${includedir}
 	${INSTALL}
 
-#--------------- a bit of libc
+ins-hs: $(wildcard $(SRC_ROOT)/../include/sys/*.h) ${includedir}/sys
+	${INSTALL}
 
-libc_libs = msp1/libc.a msp2/libc.a
+ins-msp430: $(wildcard $(SRC_ROOT)/../include/msp430/*.h) ${includedir}/msp430
+	${INSTALL}
+
+fix-limits: $(wildcard $(SRC_ROOT)/../include/limits.h) ${includedir}/../../lib/gcc-lib/msp430/3.0/include
+	${INSTALL}	
+
+#--------------- directories ---------------
+$(includedir) $(includedir)/sys $(includedir)/msp430:
+	$(MD)
+#------------------------------------------------------------------------
+#------------------------------------------------------------------------
+#------------------------------------------------------------------------
+#--------------- libc ------------------------
+BUILDDIR=$(BUILD_ROOT)/$(subst .,msp1,$(MULTILIB_DIR))
+LIBC = $(BUILDDIR)/libc.a
 
 libc_c_sources = abs.c atol.c bsearch.c errno.c labs.c \
 _init_section__.c malloc.c atoi.c strtol.c strtoul.c \
@@ -123,7 +147,12 @@
 printf.c vprintf.c vuprintf.c uprintf.c puts.c \
 rand.c itoa.c ltoa.c utoa.c ultoa.c
 
-libc_asm_sources = abort.S div.S exit.S ldiv.S setjmp.S
+libc_asm_sources = abort.S div.S exit.S ldiv.S setjmp.S \
+__do_clear_bss.S __do_copy_data.S __do_global_ctors.S \
+__do_global_dtors.S __init_stack.S __jump_to_main.S \
+__low_level_init.S __stop_progexec__.S _reset_vector__.S \
+_unexpected_.S
+
 
 libc_str_sources = \
 isascii.c memccpy.c strchr.c strncat.c swab.c \
@@ -137,115 +166,32 @@
 isalpha.c isxdigit.c strcat.c strncasecmp.c strtok.c \
 ispunct.c
 
+LIBC_OBJS = $(addprefix $(BUILDDIR)/,$(libc_str_sources:.c=.o) $(libc_c_sources:.c=.o) $(libc_asm_sources:.S=.o) )
+build-libc: create_libdir $(LIBC)
 
+create_libdir:
+	mkdir -p $(BUILDDIR)
 
-libc_msp430_ct_objs_1 = ${libc_c_sources:%.c=%.o}
-libc_msp430_ct_objs_2 = ${libc_c_sources:%.c=%.o}
-
-libc_msp430_asmt_objs_1 = ${libc_asm_sources:%.S=%.o}
-libc_msp430_asmt_objs_2 = ${libc_asm_sources:%.S=%.o}
-
-
-
-libc_msp430_c_objs_1 = $(addprefix msp1/, $(libc_msp430_ct_objs_1))
-libc_msp430_c_objs_2 = $(addprefix msp2/, $(libc_msp430_ct_objs_2))
-
-libc_msp430_S_objs_1 = $(addprefix msp1/, $(libc_msp430_asmt_objs_1))
-libc_msp430_S_objs_2 = $(addprefix msp2/, $(libc_msp430_asmt_objs_2))
-
-
-libc_msp430_objs_1 = ${libc_msp430_c_objs_1}
-libc_msp430_objs_2 = ${libc_msp430_c_objs_2}
-
-
-build-libc: mspdirs ${libc_libs}
-
-mspdirs:
-	mkdir -p msp1 msp2
-
-${libc_msp430_objs_1}: msp1/%.o: stdlib/%.c
-	${CC} -c ${CPPFLAGS} ${ALL_CFLAGS} -mmcu=msp1 -c $(ABSPATH)$< -o $@
-
-${libc_msp430_objs_2}: msp2/%.o: stdlib/%.c
-	${CC} -c ${CPPFLAGS} ${ALL_CFLAGS} -mmcu=msp2 -c $(ABSPATH)$< -o $@
-
-${libc_msp430_S_objs_1}: msp1/%.o: stdlib/%.S
-	${AS} -mmcu=msp1 -c $(ABSPATH)$< -o $@
-
-${libc_msp430_S_objs_2}: msp2/%.o: stdlib/%.S
-	${AS} -mmcu=msp2 -c $(ABSPATH)$< -o $@
-
-libc_msp430_cstr_objs_1 = ${libc_str_sources:%.c=%.o}
-libc_msp430_cstr_objs_2 = ${libc_str_sources:%.c=%.o}
-
-libc_msp430_str_objs_1 = $(addprefix msp1/, $(libc_msp430_cstr_objs_1))
-libc_msp430_str_objs_2 = $(addprefix msp2/, $(libc_msp430_cstr_objs_2))
-
-
-${libc_msp430_str_objs_1}: msp1/%.o: string/%.c
-	${CC} -c ${CPPFLAGS} ${ALL_CFLAGS} -mmcu=msp1 -c $(ABSPATH)$< -o $@
-
-${libc_msp430_str_objs_2}: msp2/%.o: string/%.c
-	${CC} -c ${CPPFLAGS} ${ALL_CFLAGS} -mmcu=msp2 -c $(ABSPATH)$< -o $@
-
-
-all_objs1 = ${libc_msp430_objs_1} ${libc_msp430_str_objs_1} ${libc_msp430_S_objs_1}
-all_objs2 = ${libc_msp430_objs_2} ${libc_msp430_str_objs_2} ${libc_msp430_S_objs_2}
+$(BUILDDIR)/%.o: %.c
+	${CC} -c $(CFLAGS) $< -o $@
 
-msp1/libc.a: ${all_objs1}
-	${AR} rc $@ $?
+$(BUILDDIR)/%.o: %.S
+	${AS} -c $(ASFLAGS) $< -o $@
 
-msp2/libc.a: ${all_objs2}
+$(LIBC): $(LIBC_OBJS)
 	${AR} rc $@ $?
 
 .PHONY: clean-libc
 clean-libc:
-	${RM} -f msp1/libc.a msp2/libc.a msp1/*.o msp2/*.o
-
-install-libc: ins-msp1 ins-msp2 ins-lib
-
-ins-msp1: msp1/libc.a ${libdir}/msp1
-	${INSTALL}
-
-ins-msp2: msp2/libc.a ${libdir}/msp2
-	${INSTALL}
-
-ins-lib: msp1/libc.a ${libdir}
-	${INSTALL}
-
-#--------------- headers ---------------
-
-install-headers: ins-hr ins-hs ins-msp430
-
-ins-hr: $(wildcard $(srcdir)/../include/*.h) ${includedir}
-	${INSTALL}
-
-ins-hs: $(wildcard $(srcdir)/../include/sys/*.h) ${includedir}/sys
-	${INSTALL}
-
-ins-msp430: $(wildcard $(srcdir)/../include/msp430/*.h) ${includedir}/msp430
-	${INSTALL}
+	${RM} -f $(LIBC) $(LIBC_OBJS)
 
-fix-limits: $(wildcard $(srcdir)/../include/limits.h) ${includedir}/../../lib/gcc-lib/msp430/3.0/include
+install-libc: $(LIBC) $(libdir)/$(MULTILIB_DIR)
 	${INSTALL}	
-
-#--------------- directories ---------------
-libc_dirs = msp1 msp2
-install_lib_dirs = $(libdir) $(libdir)/msp1 $(libdir)/msp2 
-
-$(libc_dirs) $(install_lib_dirs) $(includedir) $(includedir)/sys $(includedir)/msp430: 
-	$(MD)
-
-
-#------------------------------------------------------------------------
-#------------------------------------------------------------------------
-#------------------------------------------------------------------------
 #------------------------------------------------------------------------
 #-------------- Math & FP libs ---------------
 
 math: build-libm
 
-
 basic_fp = divsf.c fixsfsi.c floatdisf.c gtsf.c mulsf.c \
 addsf.c eqsf.c fixunssfdi.c floatsisf.c lesf.c negsf.c \
 cmpsf.c fixsfdi.c fixunssfsi.c gesf.c ltsf.c subsf.c nesf.c
@@ -260,64 +206,20 @@
 ef_fmod.c ef_rem_pio2.c kf_rem_pio2.c sf_cos.c sf_infinity.c sf_nextafter.c
 
 
-libm_libs = msp1/libm.a msp2/libm.a msp1/libfp.a msp2/libfp.a
-
-libm_msp430_fp_objs_1 = ${basic_fp:%.c=%.o}
-libm_msp430_fp_objs_2 = ${basic_fp:%.c=%.o}
-
-libm_msp430_fc_objs_1 = ${fppfunc:%.c=%.o}
-libm_msp430_fc_objs_2 = ${fppfunc:%.c=%.o}
-
-
-libm_msp430_c_objs_1 = $(addprefix msp1/, $(libm_msp430_fp_objs_1))
-libm_msp430_c_objs_2 = $(addprefix msp2/, $(libm_msp430_fp_objs_2))
-
-libm_msp430_cf_objs_1 = $(addprefix msp1/, $(libm_msp430_fc_objs_1))
-libm_msp430_cf_objs_2 = $(addprefix msp2/, $(libm_msp430_fc_objs_2))
-
-
-build-libm: ${libm_libs}
-
-${libm_msp430_c_objs_1}: msp1/%.o: libm/%.c
-	${CC} -c ${CPPFLAGS} ${ALL_CFLAGS} -mmcu=msp1 -c $(ABSPATH)$< -o $@
-
-${libm_msp430_c_objs_2}: msp2/%.o: libm/%.c
-	${CC} -c ${CPPFLAGS} ${ALL_CFLAGS} -mmcu=msp2 -c $(ABSPATH)$< -o $@
-
-
-${libm_msp430_cf_objs_1}: msp1/%.o: libm/%.c
-	${CC} ${CPPFLAGS} -mmcu=msp1 ${ALL_CFLAGS} -c $(ABSPATH)$< -o $@
-
-${libm_msp430_cf_objs_2}: msp2/%.o: libm/%.c
-	${CC} ${CPPFLAGS} -mmcu=msp2 ${ALL_CFLAGS} -c $(ABSPATH)$< -o $@
-
-
-allm_objs1 = ${libm_msp430_cf_objs_1} 
-allm_objs2 = ${libm_msp430_cf_objs_2}
-
-msp1/libm.a: ${allm_objs1}
-	${AR} rc $@ $?
+LIBM = $(BUILDDIR)/libm.a
+LIBFP = $(BUILDDIR)/libfp.a
+LIBM_OBJS = $(addprefix $(BUILDDIR)/,$(notdir $(fppfunc:%.c=%.o)))
+LIBFP_OBJS = $(addprefix $(BUILDDIR)/,$(notdir $(basic_fp:%.c=%.o)))
 
-msp2/libm.a: ${allm_objs2}
-	${AR} rc $@ $?
+build-libm: create_libdir $(LIBM) $(LIBFP)
 
-msp1/libfp.a:${libm_msp430_c_objs_1}
+$(LIBM): $(LIBM_OBJS)
 	${AR} rc $@ $?
-
-msp2/libfp.a:${libm_msp430_c_objs_2}
+$(LIBFP): $(LIBFP_OBJS)
 	${AR} rc $@ $?
 
-install-libm: insm-msp1 insm-msp2 insm-lib
-
-insm-msp1: msp1/libm.a msp1/libfp.a ${libdir}/msp1
-	${INSTALL}
-
-insm-msp2: msp2/libm.a msp2/libfp.a ${libdir}/msp2
-	${INSTALL}
-
-insm-lib: msp1/libm.a ${libdir}
+install-libm: $(LIBM) $(LIBFP) $(libdir)/$(MULTILIB_DIR)
 	${INSTALL}
 
-.PHONY: clean-libm
 clean-libm:
-	${RM} -f msp1/libm.a msp2/libm.a msp1/libfp.a msp2/libfp.a msp1/*.o msp2/*.o
+	${RM} -f $(LIBM) $(LIBFP) $(LIBM_OBJS) $(LIBFP_OBJS)

Index: gcrt0.S
===================================================================
RCS file: /cvsroot/mspgcc/msp430-libc/src/gcrt0.S,v
retrieving revision 1.11
retrieving revision 1.11.2.1
diff -u -w -d -r1.11 -r1.11.2.1
--- gcrt0.S	7 Dec 2008 22:45:57 -0000	1.11
+++ gcrt0.S	26 Jan 2009 15:47:13 -0000	1.11.2.1
@@ -22,30 +22,59 @@
 
 ;; -*- mode: asm -*-
 
-#include <io.h>
 
+#include <io.h>
+#include "core_common.inc"
+/***************************************************************
+ *	Declare registers used in library routines
+ ***************************************************************/
+.macro  MAKE_WEAK   name, address
+        .weak   \name
+        .set    \name, \address
+.endm
+        MAKE_WEAK   __WDTCTL, WDTCTL
+#if defined (__MSP430_HAS_HW_MUL__)
+        MAKE_WEAK   __MPY, MPY
+        MAKE_WEAK   __MPYS, MPYS
+        MAKE_WEAK   __MAC, MAC
+        MAKE_WEAK   __MACS, MACS
+        MAKE_WEAK   __OP2, OP2
+        MAKE_WEAK   __RESLO, RESLO
+        MAKE_WEAK   __RESHI, RESHI
+        MAKE_WEAK   __SUMEXT, SUMEXT
+#if defined (__MSP430_HAS_HW_MUL32__)
+        MAKE_WEAK   __MPY32L, MPY32L
+        MAKE_WEAK   __MPY32H, MPY32H
+        MAKE_WEAK   __MPYS32L, MPYS32L
+        MAKE_WEAK   __MPYS32H, MPYS32H
+        MAKE_WEAK   __MAC32L, MAC32L
+        MAKE_WEAK   __MAC32H, MAC32H
+        MAKE_WEAK   __MACS32L, MACS32L
+        MAKE_WEAK   __MACS32H, MACS32H
+        MAKE_WEAK   __OP2L, OP2L
+        MAKE_WEAK   __OP2H, OP2H
+        MAKE_WEAK   __RES0, RES0
+        MAKE_WEAK   __RES1, RES1
+        MAKE_WEAK   __RES2, RES2
+        MAKE_WEAK   __RES3, RES3
+        MAKE_WEAK   __MPY32CTL0, MPY32CTL0
+#endif
+#endif
 /***************************************************************
  *	Interrupt Vectors:
  *	WARNING!!! All vectors must be defined here!!!
  *	User may not define its interrupt service routines!
  ***************************************************************/
-
-        .weak _unexpected_
-	.global _unexpected_1_
-	
 	.text
         .p2align 1,0
-
-_unexpected_1_:
-	br	#_unexpected_
-_unexpected_:
-        reti
+_branch_to_unexpected_:
+        XBR     _unexpected_
 
 .section .vectors, "ax", @progbits
 
 .macro  VEC name
 	.weak   \name
-        .set    \name, _unexpected_1_
+        .equ    \name, _branch_to_unexpected_
         .word   \name
 .endm
 
@@ -95,7 +124,7 @@
 /* bc */	VEC vector_ffbc
 /* be */	VEC vector_ffbe
 #endif
-#if defined(__MSP430X2__) || defined(__MSP430X__)
+#if defined(__MSP430X__)
 /* c0 */	VEC vector_ffc0
 /* c2 */	VEC vector_ffc2
 /* c4 */	VEC vector_ffc4


------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword