diff mbox

[msp430] support sym+int and sym-sym

Message ID 201506060515.t565FJ9C022178@greed.delorie.com
State New
Headers show

Commit Message

DJ Delorie June 6, 2015, 5:15 a.m. UTC
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.
diff mbox

Patch

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;
 	}