This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[msp430] support sym+int and sym-sym


Because sizeof(void*) is 4 but POINTER_SIZE is 3, we have to handle
some things manually.  This is yet another one.  Committed.

	* config/msp430/msp430.c (msp430_asm_integer): Support addition
	and subtraction too.

Index: config/msp430/msp430.c
===================================================================
--- config/msp430/msp430.c	(revision 224181)
+++ config/msp430/msp430.c	(working copy)
@@ -973,13 +973,14 @@ msp430_asm_integer (rtx x, unsigned int 
   if (size == 3 && GET_MODE (x) == PSImode)
     size = 4;
 
   switch (size)
     {
     case 4:
-      if (c == SYMBOL_REF || c == CONST || c == LABEL_REF || c == CONST_INT)
+      if (c == SYMBOL_REF || c == CONST || c == LABEL_REF || c == CONST_INT
+	  || c == PLUS || c == MINUS)
 	{
 	  fprintf (asm_out_file, "\t.long\t");
 	  output_addr_const (asm_out_file, x);
 	  fputc ('\n', asm_out_file);
 	  return true;
 	}


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]