Mercurial > projects > ldc
comparison 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 |
comparison
equal
deleted
inserted
replaced
216:3d022aa016ae | 217:0806379a5eca |
---|---|
200 -O<n> optimize at level <n> (0-5)\n\ | 200 -O<n> optimize at level <n> (0-5)\n\ |
201 -o- do not write object file\n\ | 201 -o- do not write object file\n\ |
202 -od<objdir> write object files to directory <objdir>\n\ | 202 -od<objdir> write object files to directory <objdir>\n\ |
203 -of<filename> name output file to <filename>\n\ | 203 -of<filename> name output file to <filename>\n\ |
204 -op do not strip paths from source file\n\ | 204 -op do not strip paths from source file\n\ |
205 -oq write object files with fully qualified names\n\ | |
205 -profile profile runtime performance of generated code\n\ | 206 -profile profile runtime performance of generated code\n\ |
206 -quiet suppress unnecessary messages\n\ | 207 -quiet suppress unnecessary messages\n\ |
207 -release compile release version\n\ | 208 -release compile release version\n\ |
208 -run srcfile args... run resulting program, passing args\n\ | 209 -run srcfile args... run resulting program, passing args\n\ |
209 -R<path> provide path to the directory containing the runtime library\n\ | 210 -R<path> provide path to the directory containing the runtime library\n\ |
212 -vv very verbose (does not include -v)\n\ | 213 -vv very verbose (does not include -v)\n\ |
213 -v1 D language version 1\n\ | 214 -v1 D language version 1\n\ |
214 -version=level compile in version code >= level\n\ | 215 -version=level compile in version code >= level\n\ |
215 -version=ident compile in version code identified by ident\n\ | 216 -version=ident compile in version code identified by ident\n\ |
216 -w enable warnings\n\ | 217 -w enable warnings\n\ |
218 -fp80 enable 80bit reals on x86 32bit (EXPERIMENTAL)\n\ | |
217 ", | 219 ", |
218 #if WIN32 | 220 #if WIN32 |
219 " @cmdfile read arguments from cmdfile\n" | 221 " @cmdfile read arguments from cmdfile\n" |
220 #else | 222 #else |
221 "" | 223 "" |
395 global.params.novalidate = 1; | 397 global.params.novalidate = 1; |
396 else if (strcmp(p + 1, "dis") == 0) | 398 else if (strcmp(p + 1, "dis") == 0) |
397 global.params.disassemble = 1; | 399 global.params.disassemble = 1; |
398 else if (strcmp(p + 1, "annotate") == 0) | 400 else if (strcmp(p + 1, "annotate") == 0) |
399 global.params.llvmAnnotate = 1; | 401 global.params.llvmAnnotate = 1; |
402 else if (strcmp(p + 1, "fp80") == 0) | |
403 global.params.useFP80 = 1; | |
400 else if (p[1] == 'o') | 404 else if (p[1] == 'o') |
401 { | 405 { |
402 switch (p[2]) | 406 switch (p[2]) |
403 { | 407 { |
404 case '-': | 408 case '-': |
420 case 'p': | 424 case 'p': |
421 if (p[3]) | 425 if (p[3]) |
422 goto Lerror; | 426 goto Lerror; |
423 global.params.preservePaths = 1; | 427 global.params.preservePaths = 1; |
424 break; | 428 break; |
429 | |
430 case 'q': | |
431 if (p[3]) | |
432 goto Lerror; | |
433 global.params.fqnPaths = 1; | |
434 break; | |
425 | 435 |
426 case 0: | 436 case 0: |
427 error("-o no longer supported, use -of or -od"); | 437 error("-o no longer supported, use -of or -od"); |
428 break; | 438 break; |
429 | 439 |
689 printf("valist.sizeof = %d\n", X); | 699 printf("valist.sizeof = %d\n", X); |
690 } | 700 } |
691 } | 701 } |
692 } | 702 } |
693 | 703 |
704 bool is_x86 = false; | |
694 if (strcmp(global.params.llvmArch,"x86")==0) { | 705 if (strcmp(global.params.llvmArch,"x86")==0) { |
695 VersionCondition::addPredefinedGlobalIdent("X86"); | 706 VersionCondition::addPredefinedGlobalIdent("X86"); |
696 //VersionCondition::addPredefinedGlobalIdent("LLVM_InlineAsm_X86"); | 707 //VersionCondition::addPredefinedGlobalIdent("LLVM_InlineAsm_X86"); |
697 global.params.isLE = true; | 708 global.params.isLE = true; |
698 global.params.is64bit = false; | 709 global.params.is64bit = false; |
699 tt_arch = "i686"; | 710 tt_arch = "i686"; |
700 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"; | 711 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"; |
712 is_x86 = true; | |
701 } | 713 } |
702 else if (strcmp(global.params.llvmArch,"x86-64")==0) { | 714 else if (strcmp(global.params.llvmArch,"x86-64")==0) { |
703 VersionCondition::addPredefinedGlobalIdent("X86_64"); | 715 VersionCondition::addPredefinedGlobalIdent("X86_64"); |
704 //VersionCondition::addPredefinedGlobalIdent("LLVM_InlineAsm_X86_64"); | 716 //VersionCondition::addPredefinedGlobalIdent("LLVM_InlineAsm_X86_64"); |
705 global.params.isLE = true; | 717 global.params.isLE = true; |
736 VersionCondition::addPredefinedGlobalIdent("BigEndian"); | 748 VersionCondition::addPredefinedGlobalIdent("BigEndian"); |
737 } | 749 } |
738 | 750 |
739 if (global.params.is64bit) { | 751 if (global.params.is64bit) { |
740 VersionCondition::addPredefinedGlobalIdent("LLVM64"); | 752 VersionCondition::addPredefinedGlobalIdent("LLVM64"); |
753 } | |
754 | |
755 if (global.params.useFP80) { | |
756 if (!is_x86) { | |
757 error("the -fp80 option is only valid for the x86 32bit architecture"); | |
758 fatal(); | |
759 } | |
760 VersionCondition::addPredefinedGlobalIdent("LLVM_X86_FP80"); | |
741 } | 761 } |
742 | 762 |
743 assert(tt_arch != 0); | 763 assert(tt_arch != 0); |
744 assert(tt_os != 0); | 764 assert(tt_os != 0); |
745 assert(data_layout != 0); | 765 assert(data_layout != 0); |