(1) Update with latest LTS patches

(2) Add patch from trunk to support FRAM devices.

PR:	ports/172352 (2)
Feature safe: yes
This commit is contained in:
Lev A. Serebryakov 2012-10-18 14:51:52 +00:00
parent c8a77e4453
commit 969b3ed2ca
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=306070
4 changed files with 63 additions and 4 deletions

View File

@ -7,7 +7,7 @@
PORTNAME= gcc
PORTVERSION= ${GCCVERSION}.${LTSVERSION}
PORTREVISION= 0
PORTREVISION= 1
PORTEPOCH= 2
CATEGORIES= devel
MASTER_SITES= ${MASTER_SITE_SOURCEWARE} \
@ -25,7 +25,7 @@ PATCHFILES= ${LTS_PATCHES}
PATCH_DIST_STRIP= -p1
MAINTAINER= lev@FreeBSD.org
COMMENT= FSF gcc-4.5 for TI's msp430 MCUs cross-development
COMMENT= FSF gcc-4.6 for TI's msp430 MCUs cross-development
LICENSE= GPLv3
@ -42,7 +42,7 @@ CONFLICTS= msp430-gcc-3.*
GCCVERSION= 4.6.3
LTSVERSION= 20120406
PATCHVERSION= 20120406
BUGS_FIXED= # For future use
BUGS_FIXED= 3540953 3559978
LTS_PATCHES!= for bugid in ${BUGS_FIXED} ; do echo ${PKGNAMEPREFIX}${PORTNAME}-${GCCVERSION}-${PATCHVERSION}-sf$${bugid}.patch ; done
SRCDIR= ${WRKDIR}/${PORTNAME}-${GCCVERSION}

View File

@ -4,3 +4,7 @@ SHA256 (gcc-g++-4.6.3.tar.bz2) = b3e0c733e900e99096b0c5480f57e22e3e583ec3d83596c
SIZE (gcc-g++-4.6.3.tar.bz2) = 6928430
SHA256 (mspgcc-20120406.tar.bz2) = 82ed21884b550942f8dcf102e57a5fc7d5acf146d7a93f21a2a52ecd5477ae79
SIZE (mspgcc-20120406.tar.bz2) = 417633
SHA256 (msp430-gcc-4.6.3-20120406-sf3540953.patch) = a6f6921e967a9c7dd7e4a3e6e3eaffbe3eff2bc7ea0ffd73a72fde5ef3b5b692
SIZE (msp430-gcc-4.6.3-20120406-sf3540953.patch) = 2602
SHA256 (msp430-gcc-4.6.3-20120406-sf3559978.patch) = 191169fadbe41afd01f29ef5dcd4180276728a391ef42826e0031253e0ddf5bf
SIZE (msp430-gcc-4.6.3-20120406-sf3559978.patch) = 2535

View File

@ -0,0 +1,55 @@
--- gcc/config/msp430/msp430-builtins.c 2012-09-26 12:24:42.000000000 +0800
+++ gcc/config/msp430/msp430-builtins.c 2012-09-26 12:28:31.000000000 +0800
@@ -59,6 +59,7 @@
MSP430_BUILTIN_GET_WATCHDOG_CLEAR_VALUE,
MSP430_BUILTIN_SET_WATCHDOG_CLEAR_VALUE,
MSP430_BUILTIN_WATCHDOG_CLEAR,
+ MSP430_BUILTIN_EVEN_IN_RANGE,
MSP430_BUILTIN_last_enum
};
@@ -153,6 +154,13 @@
add_builtin_function ("__watchdog_clear",
build_function_type_list (void_type_node, NULL_TREE),
MSP430_BUILTIN_WATCHDOG_CLEAR, BUILT_IN_MD, NULL, NULL_TREE);
+ add_builtin_function ("__even_in_range",
+ build_function_type_list (unsigned_type_node,
+ unsigned_type_node,
+ unsigned_type_node,
+ NULL_TREE),
+ MSP430_BUILTIN_EVEN_IN_RANGE, BUILT_IN_MD,
+ NULL, NULL_TREE);
}
rtx
@@ -432,6 +440,30 @@
emit_move_insn (retval, arg);
insn = gen_bswaphi1 (retval);
break;
+ case MSP430_BUILTIN_EVEN_IN_RANGE:
+ {
+ tree key_tree = CALL_EXPR_ARG (exp, 0);
+ tree limit_tree = CALL_EXPR_ARG (exp, 1);
+ rtx key;
+ HOST_WIDE_INT limit_val;
+
+ need_insn = false;
+ if (!cst_and_fits_in_hwi (limit_tree)
+ || (0 > ((limit_val = int_cst_value (limit_tree)))))
+ {
+ error
+ ("__even_in_range second argument must be non-negative integer constant");
+ break;
+ }
+ key = expand_expr (key_tree, NULL_RTX, VOIDmode, EXPAND_NORMAL);
+ retval = gen_reg_rtx (HImode);
+ /* This is a stub. To complete this, we need to attach notes
+ * that assert that the value is, in fact, even and between 0
+ * and the second argument. No idea how to do that in a way
+ * that gcc's tablejump will pay any attention to. */
+ emit_move_insn (retval, key);
+ break;
+ }
}
if (insn)

View File

@ -1,4 +1,4 @@
FSF gcc-4.5 for TI's msp430 MCUs cross-development
FSF gcc-4.6 for TI's msp430 MCUs cross-development
This brings the gcc compiler for the Texas Instruments MSP430 16-bit
RISC-like family of microcontrollers.