Mercurial > projects > ldc
diff dmd/mars.c @ 217:0806379a5eca trunk
[svn r233] Added: -oq command line option for writing fully qualified object names.
Added: started support for x86 80bit floating point.
Changed: aggregates passed by value now use the llvm 'byval' parameter attribute, also lays ground work for
using other attributes.
Changed: eliminated a lot more std::vectorS, these showed up pretty much at the top when profiling!
Changed: performed other misc. cleanups.
Changed: halt expression now call the new llvm trap intrinsic instead of an assert(0).
Changed: dstress suite now passes -O0 by default, this only eliminates unreferenced globals, which speeds up
linking quite a bit.
author | lindquist |
---|---|
date | Thu, 05 Jun 2008 06:38:36 +0200 |
parents | 9d44ec83acd1 |
children | 761c8352f494 |
line wrap: on
line diff
--- a/dmd/mars.c Tue Jun 03 22:32:59 2008 +0200 +++ b/dmd/mars.c Thu Jun 05 06:38:36 2008 +0200 @@ -202,6 +202,7 @@ -od<objdir> write object files to directory <objdir>\n\ -of<filename> name output file to <filename>\n\ -op do not strip paths from source file\n\ + -oq write object files with fully qualified names\n\ -profile profile runtime performance of generated code\n\ -quiet suppress unnecessary messages\n\ -release compile release version\n\ @@ -214,6 +215,7 @@ -version=level compile in version code >= level\n\ -version=ident compile in version code identified by ident\n\ -w enable warnings\n\ + -fp80 enable 80bit reals on x86 32bit (EXPERIMENTAL)\n\ ", #if WIN32 " @cmdfile read arguments from cmdfile\n" @@ -397,6 +399,8 @@ global.params.disassemble = 1; else if (strcmp(p + 1, "annotate") == 0) global.params.llvmAnnotate = 1; + else if (strcmp(p + 1, "fp80") == 0) + global.params.useFP80 = 1; else if (p[1] == 'o') { switch (p[2]) @@ -423,6 +427,12 @@ global.params.preservePaths = 1; break; + case 'q': + if (p[3]) + goto Lerror; + global.params.fqnPaths = 1; + break; + case 0: error("-o no longer supported, use -of or -od"); break; @@ -691,6 +701,7 @@ } } + bool is_x86 = false; if (strcmp(global.params.llvmArch,"x86")==0) { VersionCondition::addPredefinedGlobalIdent("X86"); //VersionCondition::addPredefinedGlobalIdent("LLVM_InlineAsm_X86"); @@ -698,6 +709,7 @@ global.params.is64bit = false; tt_arch = "i686"; data_layout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:8"; + is_x86 = true; } else if (strcmp(global.params.llvmArch,"x86-64")==0) { VersionCondition::addPredefinedGlobalIdent("X86_64"); @@ -740,6 +752,14 @@ VersionCondition::addPredefinedGlobalIdent("LLVM64"); } + if (global.params.useFP80) { + if (!is_x86) { + error("the -fp80 option is only valid for the x86 32bit architecture"); + fatal(); + } + VersionCondition::addPredefinedGlobalIdent("LLVM_X86_FP80"); + } + assert(tt_arch != 0); assert(tt_os != 0); assert(data_layout != 0);