• ramana's avatar
    For Marcus - Implement sync primitives inline for ARM. · 06df6b17
    ramana authored
    2010-08-18  Marcus Shawcroft  <marcus.shawcroft@arm.com>
    
    	* config/arm/arm-protos.h (arm_expand_sync): New.
    	(arm_output_memory_barrier, arm_output_sync_insn): New.
    	(arm_sync_loop_insns): New.
    	* config/arm/arm.c (FL_ARCH7): New.
    	(FL_FOR_ARCH7): Include FL_ARCH7.
    	(arm_arch7): New.
    	(arm_print_operand): Support %C markup.
    	(arm_legitimize_sync_memory): New.
    	(arm_emit, arm_insn_count, arm_count, arm_output_asm_insn): New.
    	(arm_process_output_memory_barrier, arm_output_memory_barrier): New.
    	(arm_ldrex_suffix, arm_output_ldrex, arm_output_strex): New.
    	(arm_output_op2, arm_output_op3, arm_output_sync_loop): New.
    	(arm_get_sync_operand, FETCH_SYNC_OPERAND): New.
    	(arm_process_output_sync_insn, arm_output_sync_insn): New.
    	(arm_sync_loop_insns,arm_call_generator, arm_expand_sync): New.
    	* config/arm/arm.h (struct arm_sync_generator): New.
    	(TARGET_HAVE_DMB, TARGET_HAVE_DMB_MCR): New.
    	(TARGET_HAVE_MEMORY_BARRIER): New.
    	(TARGET_HAVE_LDREX, TARGET_HAVE_LDREXBHD): New.
    	* config/arm/arm.md: Include sync.md.
    	(UNSPEC_MEMORY_BARRIER): New.
    	(VUNSPEC_SYNC_COMPARE_AND_SWAP, VUNSPEC_SYNC_LOCK): New.
    	(VUNSPEC_SYNC_OP):New.
    	(VUNSPEC_SYNC_NEW_OP, VUNSPEC_SYNC_OLD_OP): New.
    	(sync_result, sync_memory, sync_required_value): New attributes.
    	(sync_new_value, sync_t1, sync_t2): Likewise.
    	(sync_release_barrier, sync_op): Likewise.
    	(length): Add logic to length attribute defintion to call
    	arm_sync_loop_insns when appropriate.
    	* config/arm/sync.md: New file.
    
    git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@163327 138bc75d-0d04-0410-961f-82ee72b054a4
    06df6b17
arm.h 95.2 KB