Mercurial > projects > ldc
view revisions.pl.in @ 1083:c1e9f612e2e2
Fix for dual operand form of fistp, also make reg ST(0) explicit and fix lindquists
previous code that allowed dual operand form of fstp but dissallowed the single
operand form accidently
author | Kelly Wilson <wilsonk cpsc.ucalgary.ca> |
---|---|
date | Tue, 10 Mar 2009 06:23:26 -0600 |
parents | dc576c7e4b1e |
children | 829ac3f30103 |
line wrap: on
line source
#!/usr/bin/perl use strict; use warnings; use File::stat; use Time::localtime; my $llvm_src = `perl @LLVM_CONFIG@ --src-root`; my $llvm_rev = `svnversion --committed $llvm_src`; my $llvm_rev_str; my $llvm_rev_nr; if ($llvm_rev =~ /^\s*(\d+:)?((\d+)[MSP]*)\s*$/) { $llvm_rev_str = qq!#define LLVM_REV_STR "LLVM rev. $2"!; $llvm_rev_nr = "$3"; } else { my $llvm_lib = `perl @LLVM_CONFIG@ --libdir`; $llvm_lib =~ s/\s+$//; $llvm_rev = ctime(stat($llvm_lib)->mtime) if (-d $llvm_lib); $llvm_rev_str = qq!#include "llvm/Config/config.h"\n#define LLVM_REV_STR PACKAGE_STRING" ($llvm_rev)"!; # Assume latest release, so < any version we should be testing for. $llvm_rev_nr = 0; } my $ldc_rev = `hg -R@PROJECT_SOURCE_DIR@ log -r qparent --template '{rev}:{node|short} ({date|isodate})' 2>/dev/null || hg -R@PROJECT_SOURCE_DIR@ tip --template '{rev}:{node|short} ({date|isodate})'`; my $out = qq!#ifndef LDC_VERSIONS_H #define LDC_VERSIONS_H // LLVM version string, for use in -version output $llvm_rev_str // LLVM svn revision number, used to adapt to changes in LLVM // (Is 0 if LLVM is not an SVN version) #define LLVM_REV $llvm_rev_nr // LDC version string, for use in -version output #define LDC_REV "rev. $ldc_rev" #endif // LDC_VERSIONS_H\n!; my $revh; my $old = ""; open $revh, "revisions.h" and $old = join "", <$revh>; if ($old ne $out) { open $revh, ">revisions.h" or die "cannot create revisions.h: $!"; print $revh $out; close $revh; }