CVS: gcc/gcc-3.3/gcc/config/msp430 msp430.c,1.85,1.86

Dmitry Diky <[email protected]>
Newsgroups gmane.comp.hardware.texas-instruments.msp430.gcc.cvs
Message-ID <[email protected]>
Update of /cvsroot/mspgcc/gcc/gcc-3.3/gcc/config/msp430
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26376

Modified Files:
	msp430.c 
Log Message:
fix HW mult qi->hi mode unsigned


Index: msp430.c
===================================================================
RCS file: /cvsroot/mspgcc/gcc/gcc-3.3/gcc/config/msp430/msp430.c,v
retrieving revision 1.85
retrieving revision 1.86
diff -u -w -d -r1.85 -r1.86
--- msp430.c	26 Oct 2004 16:12:28 -0000	1.85
+++ msp430.c	26 Oct 2004 18:11:06 -0000	1.86
@@ -5263,6 +5263,12 @@
   int dummy = 0;
   int zs = zero_shifted (operands[1]) || indexed_location (operands[1]);
 
+  if(operands[0] == op2_rtx)
+  {
+    OUT_INSN (len, "and	#0xff00, %0",operands);
+    dummy = 3;
+    return "";
+  }
   if (!sameoperand (operands, 1))
     {
       OUT_INSN (len, "mov.b\t%A1, %A0", operands);
@@ -9275,10 +9281,11 @@
   if (!MSP430_NOINT_HWMUL)
     emit_insn (gen_reent_in ());
 
-  LOAD_MPY (operands[1]);
-  emit_insn (gen_zero_extendqihi2 (mpy_rtx, m_mpy));
-  LOAD_OP2 (operands[2]);
-  emit_insn (gen_zero_extendqihi2 (op2_rtx, m_op2));
+  LOAD_MPY (gen_lowpart (QImode,operands[1]));
+  //emit_insn (gen_zero_extendqihi2 (mpy_rtx, m_mpy));
+  //LOAD_OP2 (gen_lowpart (QImode,operands[2]));
+  //emit_insn (gen_zero_extendqihi2 (op2_rtx, m_op2));
+  emit_move_insn(m_op2, gen_lowpart (QImode,operands[2]));
 
   if (MSP430_NOINT_HWMUL)
     emit_insn (gen_fetch_result_hi_nint (operands[0]));



-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.