On 09/15/2011 05:02 PM, Richard Henderson wrote:
! /* Initialize the fields for each supported opcode.  */
! static struct op_functions add_op = { sync_mem_fetch_add_optab,
!                                     sync_mem_add_fetch_optab,
!                                     sync_mem_add_optab,
!                                     sync_old_add_optab,
!                                     sync_new_add_optab,
!                                     sync_add_optab,
!                                     MINUS
!                                   };

Can these be const?

yes, and I was thinking about doing just that in fact.


! static struct op_functions xor_op = { sync_mem_fetch_xor_optab,
!                                     sync_mem_xor_fetch_optab,
!                                     sync_mem_xor_optab,
!                                     sync_old_xor_optab,
!                                     sync_new_xor_optab,
!                                     sync_xor_optab,
!                                     UNKNOWN
!                                   };

XOR is its own reverse.  ;-)

yeah, that would help with compile time... :-)

!       if ((result = maybe_emit_op (optab, target, mem, val, true, model, 
true)))
!         return result;

Please don't embed = inside IF conditions.

sure, i just figured the extra parenthesis covered that. I'll break them out. (They started this way, then I broke them out, and then put them back.)

Andrew

Reply via email to