Mercurial > projects > ldc
comparison gen/abi-x86-64.cpp @ 1439:679ac907c82f
Add `nest` attribute to `this` parameters on x86-64. This is a free extra
parameter register :).
author | Frits van Bommel <fvbommel wxs.nl> |
---|---|
date | Sun, 31 May 2009 10:41:20 +0200 |
parents | cc2d8a7388c7 |
children | a5526b7a5ae6 |
comparison
equal
deleted
inserted
replaced
1438:c363d131c1ef | 1439:679ac907c82f |
---|---|
675 Logger::println("x86-64 D ABI: Transforming return type"); | 675 Logger::println("x86-64 D ABI: Transforming return type"); |
676 fixup_D(*fty.ret); | 676 fixup_D(*fty.ret); |
677 } | 677 } |
678 } | 678 } |
679 | 679 |
680 if (fty.arg_this) { | |
681 fty.arg_this->attrs |= llvm::Attribute::Nest; | |
682 } | |
683 if (fty.arg_nest) { | |
684 fty.arg_nest->attrs |= llvm::Attribute::Nest; | |
685 } | |
686 | |
680 Logger::println("x86-64 D ABI: Transforming arguments"); | 687 Logger::println("x86-64 D ABI: Transforming arguments"); |
681 LOG_SCOPE; | 688 LOG_SCOPE; |
682 | 689 |
683 for (IrFuncTy::ArgIter I = fty.args.begin(), E = fty.args.end(); I != E; ++I) { | 690 for (IrFuncTy::ArgIter I = fty.args.begin(), E = fty.args.end(); I != E; ++I) { |
684 IrFuncTyArg& arg = **I; | 691 IrFuncTyArg& arg = **I; |