On 08/14/2013 02:55 PM, DJ Delorie wrote:

+#endif /* GCC_MSP430_PROTOS_H */
Index: gcc/config/msp430/predicates.md
===================================================================
--- gcc/config/msp430/predicates.md     (revision 0)
+++ gcc/config/msp430/predicates.md     (revision 0)
+
+(define_predicate "msp_volatile_memory_operand"
+  (and (match_code "mem")
+       (match_test ("memory_address_addr_space_p (GET_MODE (op), XEXP (op, 0), 
MEM_ADDR_SPACE (op))")))
+)
+
+; TRUE for any valid general operand.  We do this because
+; general_operand refuses to match volatile memory refs.
+
+(define_predicate "msp_general_operand"
+  (ior (match_operand 0 "general_operand")
+       (match_operand 0 "msp_volatile_memory_operand"))
+)
This is no good. You really can't go around optimizing volatiles like you want to. That's my only objection to the port at this point.

Given this is strictly an optimization issue and you want to pursue it further, my recommendation would be to get the port in without the hackery for volatiles and discuss optimization of volatiles independently of the base port submission.

Jeff

Reply via email to