Mercurial > projects > ldc
changeset 1182:5e8f7ad442ba
Fix one more naked asm output problem for mingw32 and remove some
duplicate code
author | Kelly Wilson <wilsonk cpsc.ucalgary.ca> |
---|---|
date | Mon, 30 Mar 2009 18:22:30 -0600 |
parents | 204197eb9eb5 |
children | df386fd4030e |
files | gen/naked.cpp |
diffstat | 1 files changed, 2 insertions(+), 19 deletions(-) [+] |
line wrap: on
line diff
--- a/gen/naked.cpp Mon Mar 30 18:18:23 2009 -0600 +++ b/gen/naked.cpp Mon Mar 30 18:22:30 2009 -0600 @@ -167,30 +167,13 @@ asmstr << mangle << ":" << std::endl; } - /* - else - { - const char* linkage = "globl"; - std::string section = "text"; - if (DtoIsTemplateInstance(fd)) - { - linkage = "weak"; - tmpstr << "section\t.gnu.linkonce.t." << mangle << ",\"ax\",@progbits"; - section = tmpstr.str(); - } - asmstr << "\t." << section << std::endl; - asmstr << "\t.align\t16" << std::endl; - asmstr << "\t." << linkage << "\t" << mangle << std::endl; - asmstr << "\t.type\t" << mangle << ",@function" << std::endl; - asmstr << mangle << ":" << std::endl; - }*/ // emit body fd->fbody->toNakedIR(gIR); // emit size after body - // llvm does this on linux, but not on osx - if (global.params.os != OSMacOSX) + // llvm does this on linux, but not on osx or Win + if (global.params.os != OSMacOSX && global.params.os != OSWindows) { asmstr << "\t.size\t" << mangle << ", .-" << mangle << std::endl << std::endl; }