Yeah,
there was an odd thing --
somehow some important defines were missed after code reorganisation.
I co'ed changes.
here is a patch against CVS' gcc-3.3 attached.
gcc-current is not affected by this bug.
~d
--
/*****************************************************************
("`-''-/").___..--''"`-._ (\ Dimmy the Wild UA1ACZ
`6_ 6 ) `-. ( ).`-.__.`) State Polytechnical Univ.
(_Y_.)' ._ ) `._ `. ``-..-' Radio-Physics Departament
_..`--'_..-_/ /--'_.' ,' Saint Petersburg, Russia
(il),-'' (li),' ((!.-' +7 (812) 5403923, 5585314
*****************************************************************/
Index: msp430.h
===================================================================
RCS file: /cvsroot/mspgcc/gcc/gcc-3.3/gcc/config/msp430/msp430.h,v
retrieving revision 1.24
diff -c -3 -p -r1.24 msp430.h
*** msp430.h 28 Aug 2003 14:54:12 -0000 1.24
--- msp430.h 20 Oct 2003 11:41:19 -0000
*************** extern const char *msp430_mcu_name;
*** 97,103 ****
extern int msp430_has_hwmul;
! #define MSP430_HAS_HWMUL (msp430_has_hwmul)
int msp430_current_function_noint_hwmul_function_p(void);
#define MSP430_NOINT_HWMUL (msp430_current_function_noint_hwmul_function_p())
--- 97,103 ----
extern int msp430_has_hwmul;
! #define MSP430_HAS_HWMUL_INTERNAL (msp430_has_hwmul)
int msp430_current_function_noint_hwmul_function_p(void);
#define MSP430_NOINT_HWMUL (msp430_current_function_noint_hwmul_function_p())
*************** sprintf (STRING, "*.%s%d", PREFIX, NUM)
*** 2476,2482 ****
formats. In that case, the various `tm.h' files can define these
macros differently. */
! #define ASSEMBLER_DIALECT MSP430_HAS_HWMUL
/* If your target supports multiple dialects of assembler language
(such as different opcodes), define this macro as a C expression
that gives the numeric index of the assembler language dialect to
--- 2476,2482 ----
formats. In that case, the various `tm.h' files can define these
macros differently. */
! #define ASSEMBLER_DIALECT MSP430_HAS_HWMUL_INTERNAL
/* If your target supports multiple dialects of assembler language
(such as different opcodes), define this macro as a C expression
that gives the numeric index of the assembler language dialect to
*************** valid_machine_decl_attribute (DECL, ATTR
*** 2782,2788 ****
#define CPP_SPEC "\
%{!mmcu*|mmcu=msp1:%(cpp_msp1)} \
! %{mmcu=msp2:%(cpp_msp2)} \
%{mmcu=msp430x110:%(cpp_msp1) -D__MSP430_110__} \
%{mmcu=msp430x112:%(cpp_msp1) -D__MSP430_112__} \
%{mmcu=msp430x1101:%(cpp_msp1) -D__MSP430_1101__} \
--- 2782,2788 ----
#define CPP_SPEC "\
%{!mmcu*|mmcu=msp1:%(cpp_msp1)} \
! %{mmcu=msp2:%(cpp_msp2) -DMSP430_HAS_HWMUL} \
%{mmcu=msp430x110:%(cpp_msp1) -D__MSP430_110__} \
%{mmcu=msp430x112:%(cpp_msp1) -D__MSP430_112__} \
%{mmcu=msp430x1101:%(cpp_msp1) -D__MSP430_1101__} \
*************** valid_machine_decl_attribute (DECL, ATTR
*** 2798,2817 ****
%{mmcu=msp430x135:%(cpp_msp1) -D__MSP430_135__} \
%{mmcu=msp430x1331:%(cpp_msp1) -D__MSP430_1331__} \
%{mmcu=msp430x1351:%(cpp_msp1) -D__MSP430_1351__} \
! %{mmcu=msp430x147:%(cpp_msp2) -D__MSP430_147__} \
! %{mmcu=msp430x148:%(cpp_msp2) -D__MSP430_148__} \
! %{mmcu=msp430x149:%(cpp_msp2) -D__MSP430_149__} \
! %{mmcu=msp430x1471:%(cpp_msp2) -D__MSP430_1471__} \
! %{mmcu=msp430x1481:%(cpp_msp2) -D__MSP430_1481__} \
! %{mmcu=msp430x1491:%(cpp_msp2) -D__MSP430_1491__} \
%{mmcu=msp430x155:%(cpp_msp1) -D__MSP430_155__} \
%{mmcu=msp430x156:%(cpp_msp1) -D__MSP430_156__} \
%{mmcu=msp430x157:%(cpp_msp1) -D__MSP430_157__} \
! %{mmcu=msp430x167:%(cpp_msp2) -D__MSP430_167__} \
! %{mmcu=msp430x168:%(cpp_msp2) -D__MSP430_168__} \
! %{mmcu=msp430x169:%(cpp_msp2) -D__MSP430_169__} \
! %{mmcu=msp430x1610:%(cpp_msp2) -D__MSP430_1610__} \
! %{mmcu=msp430x1611:%(cpp_msp2) -D__MSP430_1611__} \
%{mmcu=msp430x311:%(cpp_msp1) -D__MSP430_311__} \
%{mmcu=msp430x312:%(cpp_msp1) -D__MSP430_312__} \
%{mmcu=msp430x313:%(cpp_msp1) -D__MSP430_313__} \
--- 2798,2817 ----
%{mmcu=msp430x135:%(cpp_msp1) -D__MSP430_135__} \
%{mmcu=msp430x1331:%(cpp_msp1) -D__MSP430_1331__} \
%{mmcu=msp430x1351:%(cpp_msp1) -D__MSP430_1351__} \
! %{mmcu=msp430x147:%(cpp_msp2) -D__MSP430_147__ -DMSP430_HAS_HWMUL} \
! %{mmcu=msp430x148:%(cpp_msp2) -D__MSP430_148__ -DMSP430_HAS_HWMUL} \
! %{mmcu=msp430x149:%(cpp_msp2) -D__MSP430_149__ -DMSP430_HAS_HWMUL} \
! %{mmcu=msp430x1471:%(cpp_msp2) -D__MSP430_1471__ -DMSP430_HAS_HWMUL} \
! %{mmcu=msp430x1481:%(cpp_msp2) -D__MSP430_1481__ -DMSP430_HAS_HWMUL} \
! %{mmcu=msp430x1491:%(cpp_msp2) -D__MSP430_1491__ -DMSP430_HAS_HWMUL} \
%{mmcu=msp430x155:%(cpp_msp1) -D__MSP430_155__} \
%{mmcu=msp430x156:%(cpp_msp1) -D__MSP430_156__} \
%{mmcu=msp430x157:%(cpp_msp1) -D__MSP430_157__} \
! %{mmcu=msp430x167:%(cpp_msp2) -D__MSP430_167__ -DMSP430_HAS_HWMUL} \
! %{mmcu=msp430x168:%(cpp_msp2) -D__MSP430_168__ -DMSP430_HAS_HWMUL} \
! %{mmcu=msp430x169:%(cpp_msp2) -D__MSP430_169__ -DMSP430_HAS_HWMUL} \
! %{mmcu=msp430x1610:%(cpp_msp2) -D__MSP430_1610__ -DMSP430_HAS_HWMUL} \
! %{mmcu=msp430x1611:%(cpp_msp2) -D__MSP430_1611__ -DMSP430_HAS_HWMUL} \
%{mmcu=msp430x311:%(cpp_msp1) -D__MSP430_311__} \
%{mmcu=msp430x312:%(cpp_msp1) -D__MSP430_312__} \
%{mmcu=msp430x313:%(cpp_msp1) -D__MSP430_313__} \
*************** valid_machine_decl_attribute (DECL, ATTR
*** 2819,2840 ****
%{mmcu=msp430x315:%(cpp_msp1) -D__MSP430_315__} \
%{mmcu=msp430x323:%(cpp_msp1) -D__MSP430_323__} \
%{mmcu=msp430x325:%(cpp_msp1) -D__MSP430_325__} \
! %{mmcu=msp430x336:%(cpp_msp2) -D__MSP430_336__} \
! %{mmcu=msp430x337:%(cpp_msp2) -D__MSP430_337__} \
%{mmcu=msp430x412:%(cpp_msp1) -D__MSP430_412__} \
%{mmcu=msp430x413:%(cpp_msp1) -D__MSP430_413__} \
! %{mmcu=msp430xE423:%(cpp_msp2) -D__MSP430_E423__} \
! %{mmcu=msp430xE425:%(cpp_msp2) -D__MSP430_E425__} \
! %{mmcu=msp430xE427:%(cpp_msp2) -D__MSP430_E427__} \
! %{mmcu=msp430xW423:%(cpp_msp2) -D__MSP430_W423__} \
! %{mmcu=msp430xW425:%(cpp_msp2) -D__MSP430_W425__} \
! %{mmcu=msp430xW427:%(cpp_msp2) -D__MSP430_W427__} \
%{mmcu=msp430x435:%(cpp_msp1) -D__MSP430_435__} \
%{mmcu=msp430x436:%(cpp_msp1) -D__MSP430_436__} \
%{mmcu=msp430x437:%(cpp_msp1) -D__MSP430_437__} \
! %{mmcu=msp430x447:%(cpp_msp2) -D__MSP430_447__} \
! %{mmcu=msp430x448:%(cpp_msp2) -D__MSP430_448__} \
! %{mmcu=msp430x449:%(cpp_msp2) -D__MSP430_449__} \
%{mint8:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long -D__INT_MAX__=127} \
%{!mint*:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int -D__INT_MAX__=32767} \
%{posix:-D_POSIX_SOURCE} %{mIAR:-D_IAR_ASSEMBLER_}"
--- 2819,2840 ----
%{mmcu=msp430x315:%(cpp_msp1) -D__MSP430_315__} \
%{mmcu=msp430x323:%(cpp_msp1) -D__MSP430_323__} \
%{mmcu=msp430x325:%(cpp_msp1) -D__MSP430_325__} \
! %{mmcu=msp430x336:%(cpp_msp2) -D__MSP430_336__ -DMSP430_HAS_HWMUL} \
! %{mmcu=msp430x337:%(cpp_msp2) -D__MSP430_337__ -DMSP430_HAS_HWMUL} \
%{mmcu=msp430x412:%(cpp_msp1) -D__MSP430_412__} \
%{mmcu=msp430x413:%(cpp_msp1) -D__MSP430_413__} \
! %{mmcu=msp430xE423:%(cpp_msp2) -D__MSP430_E423__ -DMSP430_HAS_HWMUL} \
! %{mmcu=msp430xE425:%(cpp_msp2) -D__MSP430_E425__ -DMSP430_HAS_HWMUL} \
! %{mmcu=msp430xE427:%(cpp_msp2) -D__MSP430_E427__ -DMSP430_HAS_HWMUL} \
! %{mmcu=msp430xW423:%(cpp_msp2) -D__MSP430_W423__ -DMSP430_HAS_HWMUL} \
! %{mmcu=msp430xW425:%(cpp_msp2) -D__MSP430_W425__ -DMSP430_HAS_HWMUL} \
! %{mmcu=msp430xW427:%(cpp_msp2) -D__MSP430_W427__ -DMSP430_HAS_HWMUL} \
%{mmcu=msp430x435:%(cpp_msp1) -D__MSP430_435__} \
%{mmcu=msp430x436:%(cpp_msp1) -D__MSP430_436__} \
%{mmcu=msp430x437:%(cpp_msp1) -D__MSP430_437__} \
! %{mmcu=msp430x447:%(cpp_msp2) -D__MSP430_447__ -DMSP430_HAS_HWMUL} \
! %{mmcu=msp430x448:%(cpp_msp2) -D__MSP430_448__ -DMSP430_HAS_HWMUL} \
! %{mmcu=msp430x449:%(cpp_msp2) -D__MSP430_449__ -DMSP430_HAS_HWMUL} \
%{mint8:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long -D__INT_MAX__=127} \
%{!mint*:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int -D__INT_MAX__=32767} \
%{posix:-D_POSIX_SOURCE} %{mIAR:-D_IAR_ASSEMBLER_}"
Index: msp430.md
===================================================================
RCS file: /cvsroot/mspgcc/gcc/gcc-3.3/gcc/config/msp430/msp430.md,v
retrieving revision 1.59
diff -c -3 -p -r1.59 msp430.md
*** msp430.md 1 Oct 2003 16:26:44 -0000 1.59
--- msp430.md 20 Oct 2003 11:41:19 -0000
***************
*** 57,63 ****
(const_string "arith"))
(define_attr "msp430_has_hwmul" "yes,no"
! (const (if_then_else (symbol_ref "MSP430_HAS_HWMUL")
(const_string "yes")
(const_string "no"))))
--- 57,63 ----
(const_string "arith"))
(define_attr "msp430_has_hwmul" "yes,no"
! (const (if_then_else (symbol_ref "MSP430_HAS_HWMUL_INTERNAL")
(const_string "yes")
(const_string "no"))))
***************
*** 551,557 ****
[(set (reg:QI 14) (mult:QI (reg:QI 10) (reg:QI 12)))
(clobber (reg:QI 10))
(clobber (reg:QI 12))]
! "!MSP430_HAS_HWMUL"
"call #__mulqi3"
[(set_attr "length" "2")
(set_attr "cc" "clobber")])
--- 551,557 ----
[(set (reg:QI 14) (mult:QI (reg:QI 10) (reg:QI 12)))
(clobber (reg:QI 10))
(clobber (reg:QI 12))]
! "!MSP430_HAS_HWMUL_INTERNAL"
"call #__mulqi3"
[(set_attr "length" "2")
(set_attr "cc" "clobber")])
***************
*** 569,575 ****
(sign_extend:HI (reg:QI 12))))
(clobber (reg:QI 10))
(clobber (reg:QI 12))]
! "!MSP430_HAS_HWMUL"
"call #__mulqihi3"
[(set_attr "length" "2")
(set_attr "cc" "clobber")])
--- 569,575 ----
(sign_extend:HI (reg:QI 12))))
(clobber (reg:QI 10))
(clobber (reg:QI 12))]
! "!MSP430_HAS_HWMUL_INTERNAL"
"call #__mulqihi3"
[(set_attr "length" "2")
(set_attr "cc" "clobber")])
***************
*** 587,593 ****
(zero_extend:HI (reg:QI 12))))
(clobber (reg:QI 10))
(clobber (reg:QI 12))]
! "!MSP430_HAS_HWMUL"
"call #__umulqihi3"
[(set_attr "length" "2")
(set_attr "cc" "clobber")])
--- 587,593 ----
(zero_extend:HI (reg:QI 12))))
(clobber (reg:QI 10))
(clobber (reg:QI 12))]
! "!MSP430_HAS_HWMUL_INTERNAL"
"call #__umulqihi3"
[(set_attr "length" "2")
(set_attr "cc" "clobber")])
***************
*** 606,612 ****
[(set (reg:HI 14) (mult:HI (reg:HI 10) (reg:HI 12)))
(clobber (reg:HI 10))
(clobber (reg:HI 12))]
! "!MSP430_HAS_HWMUL"
"call #__mulhi3"
[(set_attr "length" "2")
(set_attr "cc" "clobber")])
--- 606,612 ----
[(set (reg:HI 14) (mult:HI (reg:HI 10) (reg:HI 12)))
(clobber (reg:HI 10))
(clobber (reg:HI 12))]
! "!MSP430_HAS_HWMUL_INTERNAL"
"call #__mulhi3"
[(set_attr "length" "2")
(set_attr "cc" "clobber")])
***************
*** 627,633 ****
(clobber (reg:HI 11))
(clobber (reg:HI 12))
(clobber (reg:HI 13))]
! "!MSP430_HAS_HWMUL"
"mov #0, r11
tst r10
jge +2
--- 627,633 ----
(clobber (reg:HI 11))
(clobber (reg:HI 12))
(clobber (reg:HI 13))]
! "!MSP430_HAS_HWMUL_INTERNAL"
"mov #0, r11
tst r10
jge +2
***************
*** 655,661 ****
(clobber (reg:HI 11))
(clobber (reg:HI 12))
(clobber (reg:HI 13))]
! "!MSP430_HAS_HWMUL"
"clr r11
clr r13
call #__umulhisi3"
--- 655,661 ----
(clobber (reg:HI 11))
(clobber (reg:HI 12))
(clobber (reg:HI 13))]
! "!MSP430_HAS_HWMUL_INTERNAL"
"clr r11
clr r13
call #__umulhisi3"
***************
*** 676,682 ****
if(msp430_easy_mul(operands,0))
DONE;
! if (!MSP430_HAS_HWMUL)
{
/* all ops have to be registers */
emit_insn (gen_mulsi3_call (operands[0], operands[1], operands[2]));
--- 676,682 ----
if(msp430_easy_mul(operands,0))
DONE;
! if (!MSP430_HAS_HWMUL_INTERNAL)
{
/* all ops have to be registers */
emit_insn (gen_mulsi3_call (operands[0], operands[1], operands[2]));
***************
*** 703,709 ****
(define_insn "*mulsi3hw_inline_ni"
[(set (reg:SI 14) (mult:SI (reg:SI 10) (reg:SI 12)))]
! "TARGET_INLINESIHWMUL && MSP430_HAS_HWMUL && MSP430_NOINT_HWMUL"
"mov r12, &__MPY
mov r10, &__OP2
mov r12, &__MAC
--- 703,709 ----
(define_insn "*mulsi3hw_inline_ni"
[(set (reg:SI 14) (mult:SI (reg:SI 10) (reg:SI 12)))]
! "TARGET_INLINESIHWMUL && MSP430_HAS_HWMUL_INTERNAL && MSP430_NOINT_HWMUL"
"mov r12, &__MPY
mov r10, &__OP2
mov r12, &__MAC
***************
*** 718,724 ****
(define_insn "*mulsi3hw_inline_ie"
[(set (reg:SI 14) (mult:SI (reg:SI 10) (reg:SI 12)))]
! "TARGET_INLINESIHWMUL && MSP430_HAS_HWMUL && !MSP430_NOINT_HWMUL"
"push r2
dint
nop
--- 718,724 ----
(define_insn "*mulsi3hw_inline_ie"
[(set (reg:SI 14) (mult:SI (reg:SI 10) (reg:SI 12)))]
! "TARGET_INLINESIHWMUL && MSP430_HAS_HWMUL_INTERNAL && !MSP430_NOINT_HWMUL"
"push r2
dint
nop
***************
*** 742,755 ****
(clobber (reg:SI 10))
(clobber (reg:SI 12))])
(set (match_operand:SI 0 "register_operand" "") (reg:SI 14))]
! "!MSP430_HAS_HWMUL"
"")
(define_insn "*mulsi3_call"
[(set (reg:SI 14) (mult:SI (reg:SI 10) (reg:SI 12)))
(clobber (reg:SI 10))
(clobber (reg:SI 12))]
! "!MSP430_HAS_HWMUL"
"call #__mulsi3"
[(set_attr "length" "2")
(set_attr "cc" "clobber")])
--- 742,755 ----
(clobber (reg:SI 10))
(clobber (reg:SI 12))])
(set (match_operand:SI 0 "register_operand" "") (reg:SI 14))]
! "!MSP430_HAS_HWMUL_INTERNAL"
"")
(define_insn "*mulsi3_call"
[(set (reg:SI 14) (mult:SI (reg:SI 10) (reg:SI 12)))
(clobber (reg:SI 10))
(clobber (reg:SI 12))]
! "!MSP430_HAS_HWMUL_INTERNAL"
"call #__mulsi3"
[(set_attr "length" "2")
(set_attr "cc" "clobber")])