path: root/mcon/U/d_regparm.U
diff options
Diffstat (limited to 'mcon/U/d_regparm.U')
1 files changed, 48 insertions, 0 deletions
diff --git a/mcon/U/d_regparm.U b/mcon/U/d_regparm.U
new file mode 100644
index 0000000..7b968a1
--- /dev/null
+++ b/mcon/U/d_regparm.U
@@ -0,0 +1,48 @@
+?RCS: $Id: d_regparm.U 167 2013-05-08 17:58:00Z rmanfredi $
+?RCS: Copyright (c) 2006, Christian Biere
+?RCS: You may redistribute only under the terms of the Artistic License,
+?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 License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?MAKE:d_regparm: Myread Setvar cat rm cc ccflags ldflags gccversion
+?MAKE: -pick add $@ %<
+?S: This variable conditionally defines the HAS_REGPARM symbol, which
+?S: indicates to the C program that attribute regparm is available.
+?C: This symbol is defined when __attribute__((__regparm__(n))) can be used.
+?H:#$d_regparm HAS_REGPARM
+?LINT:set d_regparm
+: check whether '__attribute__((__regparm__(n)))' can be used
+if [ "x$gccversion" != x ]
+ $cat >try.c <<'EOC'
+static __attribute__((__regparm__(1))) int
+blah(int x)
+ return x / 2;
+int main(int argc, char *argv[])
+ (void) argv;
+ return blah(argc);
+ if $cc $ccflags -Werror $ldflags -o try try.c >/dev/null 2>&1
+ then
+ val="$define"
+ fi
+ $rm -rf try try.*
+set d_regparm
+eval $setvar