From e74f57e9942decc725f52795bb4d6883f58cc299 Mon Sep 17 00:00:00 2001 From: rmanfredi Date: Wed, 29 Feb 2012 20:21:30 +0000 Subject: Added units to check for __builtin_ctz() and __builtin_clz() support. git-svn-id: svn://svn.code.sf.net/p/dist/code/trunk/dist@137 2592e710-e01b-42a5-8df0-11608a6cc53d --- mcon/U/d_built_clz.U | 37 +++++++++++++++++++++++++++++++++++++ mcon/U/d_built_ctz.U | 37 +++++++++++++++++++++++++++++++++++++ 2 files changed, 74 insertions(+) create mode 100644 mcon/U/d_built_clz.U create mode 100644 mcon/U/d_built_ctz.U (limited to 'mcon/U') diff --git a/mcon/U/d_built_clz.U b/mcon/U/d_built_clz.U new file mode 100644 index 0000000..8af83ce --- /dev/null +++ b/mcon/U/d_built_clz.U @@ -0,0 +1,37 @@ +?RCS: $Id$ +?RCS: +?RCS: Copyright (c) 2012 Raphael Manfredi +?RCS: +?RCS: You may redistribute only under the terms of the Artistic Licence, +?RCS: as specified in the README file that comes with the distribution. +?RCS: You may reuse parts of this distribution only within the terms of +?RCS: that same Artistic Licence; a copy of which may be found at the root +?RCS: of the source tree for dist 4.0. +?RCS: +?MAKE:d_built_clz: Trylink cat +?MAKE: -pick add $@ %< +?S:d_built_clz: +?S: This variable conditionally defines the HAS_BUILTIN_CLZ symbol, which +?S: indicates to the C program that __builtin_clz is available to count +?S: leading zeroes. +?S:. +?C:HAS_BUILTIN_CLZ: +?C: This symbol, if defined, indicates that the __builtin_clz routine is +?C: available to count leading zeroes in a word. +?C:. +?H:#$d_built_clz HAS_BUILTIN_CLZ /**/ +?H:. +?LINT:set d_built_clz +: check for __builtin_clz +$cat >try.c <try.c <