From 8b98b5fd9f9e4edb38a6b7eeb91b5a77ad91d95c Mon Sep 17 00:00:00 2001 From: "David S. Miller" Date: Thu, 15 Nov 2012 21:24:22 +0000 Subject: Add support for sparc fused compare-and-branch. gcc/ 2012-11-15 David S. Miller * configure.ac: Add check for assembler SPARC4 instruction support. * configure: Rebuild. * config.in: Add HAVE_AS_SPARC4 section. * config/sparc/sparc.opt (mcbcond): New option. * doc/invoke.texi: Document it. * config/sparc/constraints.md: New constraint 'A' for 5-bit signed immediates. * doc/md.texi: Document it. * config/sparc/sparc.c (dump_target_flag_bits): Handle MASK_CBCOND. (sparc_option_override): Likewise. (emit_cbcond_insn): New function. (emit_conditional_branch_insn): Call it. (emit_cbcond_nop): New function. (output_ubranch): Use cbcond, remove label arg. (output_cbcond): New function. * config/sparc/sparc-protos.h (output_ubranch): Update. (output_cbcond): Declare it. (emit_cbcond_nop): Likewise. * config/sparc/sparc.md (type attribute): New types 'cbcond' and uncond_cbcond. (emit_cbcond_nop): New attribute. (length attribute): Handle cbcond and uncond_cbcond. (in_call_delay attribute): Reject cbcond and uncond_cbcond. (in_branch_delay attribute): Likewise. (in_uncond_branch_delay attribute): Likewise. (in_annul_branch_delay attribute): Likewise. (*cbcond_sp32, *cbcond_sp64): New insn patterns. (jump): Rewrite into an expander. (*jump_ubranch, *jump_cbcond): New patterns. * config/sparc/niagara4.md: Match 'cbcond' in 'n4_cti'. * config/sparc/sparc.h (AS_NIAGARA4_FLAG): New macro, use it when target default is niagara4. (SPARC_SIMM5_P): Define. * config/sparc/sol2.h (AS_SPARC64_FLAG): Adjust. (AS_SPARC32_FLAG): Define. (ASM_CPU32_DEFAULT_SPEC, ASM_CPU64_DEFAULT_SPEC): Use AS_NIAGARA4_FLAG as needed. From-SVN: r193543 --- gcc/configure.ac | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'gcc/configure.ac') diff --git a/gcc/configure.ac b/gcc/configure.ac index ac25623..9781e69 100644 --- a/gcc/configure.ac +++ b/gcc/configure.ac @@ -3545,6 +3545,24 @@ foo: fnaddd %f10, %f12, %f14],, [AC_DEFINE(HAVE_AS_FMAF_HPC_VIS3, 1, [Define if your assembler supports FMAF, HPC, and VIS 3.0 instructions.])]) + + gcc_GAS_CHECK_FEATURE([SPARC4 instructions], + gcc_cv_as_sparc_sparc4,, + [-xarch=sparc4], + [.text + .register %g2, #scratch + .register %g3, #scratch + .align 4 + cxbe %g2, %g3, 1f +1: cwbneg %g2, %g3, 1f +1: sha1 + md5 + aes_kexpand0 %f4, %f6, %f8 + des_round %f38, %f40, %f42, %f44 + camellia_f %f54, %f56, %f58, %f60 + kasumi_fi_xor %f46, %f48, %f50, %f52],, + [AC_DEFINE(HAVE_AS_SPARC4, 1, + [Define if your assembler supports SPARC4 instructions.])]) ;; changequote(,)dnl -- cgit v1.1