CVS: gcc/gcc-3.3/gcc/config/msp430 msp430.c,1.87,1.88 msp430.md,1.63,1.64

Peter <[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-serv24133/gcc/config/msp430

Modified Files:
	msp430.c msp430.md 
Log Message:
fix for call instruction to address in R1


Index: msp430.c
===================================================================
RCS file: /cvsroot/mspgcc/gcc/gcc-3.3/gcc/config/msp430/msp430.c,v
retrieving revision 1.87
retrieving revision 1.88
diff -u -w -d -r1.87 -r1.88
--- msp430.c	17 Mar 2005 14:08:46 -0000	1.87
+++ msp430.c	30 Jan 2006 08:47:05 -0000	1.88
@@ -1325,6 +1325,10 @@
 
 	  print_sub_operand (file, XEXP (addr, 1), code);
 
+      /* shift if the indirect pointer register is the stack pointer */
+      if ((code >= 'M' && code <= 'N') && (REGNO (XEXP (addr, 0)) == 1))
+        shift = code - 'M';
+
 	  if (shift)
 	    fprintf (file, "+%d", shift * ml);
 

Index: msp430.md
===================================================================
RCS file: /cvsroot/mspgcc/gcc/gcc-3.3/gcc/config/msp430/msp430.md,v
retrieving revision 1.63
retrieving revision 1.64
diff -u -w -d -r1.63 -r1.64
--- msp430.md	10 Aug 2004 12:59:05 -0000	1.63
+++ msp430.md	30 Jan 2006 08:47:05 -0000	1.64
@@ -28,6 +28,8 @@
 ;;  D	   3		    6
 ;;  E  adds nothing to reg but used only with (mem:hi (reg:hi))
 ;;  F  no trim array
+;;  M  Add 0 to address if using stack pointer
+;;  N  Add 2 to address if using stack pointer
 ;;  Extra constarains:
 ;;  P  hardware constants: -1,0,+1,+2,+4,+8
 ;;  Q  Indexed destination register as X(Rn)
@@ -371,7 +373,7 @@
    (call (mem:HI (match_operand:HI 1 "general_operand" "r,P,mi"))
 	 (match_operand:HI 2 "general_operand" "X,X,X")))]
 ""
- "call\\t%1"
+ "call\\t%N1"
 [ (set_attr "length" "1,1,2")
    (set_attr "cc" "clobber")])
 



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
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.