Happy new year!

I'm checking in this patch, which ensures that offsets for register
offset addressing on moxie are limited to 16 bits.

Since this is the first commit of 2015, I'm rolling the ChangeLog file
as well.

Thanks,

AG


2015-01-01  Anthony Green  <gr...@moxielogic.com>

        * config/moxie/predicates.md (moxie_general_movsrc_operand):
        Restrict move source register offsets to 16 bits.


Index: config/moxie/predicates.md
===================================================================
--- config/moxie/predicates.md  (revision 219135)
+++ config/moxie/predicates.md  (working copy)
@@ -34,7 +34,8 @@
   if (MEM_P (op)
       && GET_CODE (XEXP (op, 0)) == PLUS
       && GET_CODE (XEXP (XEXP (op, 0), 0)) == REG
-      && GET_CODE (XEXP (XEXP (op, 0), 1)) == CONST_INT)
+      && GET_CODE (XEXP (XEXP (op, 0), 1)) == CONST_INT
+      && IN_RANGE (INTVAL (XEXP (XEXP (op, 0), 1)), -32768, 32767))
     return 1;
 
   return general_operand (op, mode);

Reply via email to