This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[msp430] support sym+int and sym-sym
- From: DJ Delorie <dj at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Sat, 6 Jun 2015 01:15:19 -0400
- Subject: [msp430] support sym+int and sym-sym
- Authentication-results: sourceware.org; auth=none
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;
}