Mercurial > projects > ldc
diff gen/irstate.h @ 971:985104c0f1db
Fix the problems exposed by the callingconv1.d test case.
The first was that unless otherwise specified, inputs are assumed to be in
registers even if they specify a "matching output" that's in memory.
While testing that fix, I also ran into a bug causing the generated "matching
output" for any input was always the first one instead of the correct one.
author | Frits van Bommel <fvbommel wxs.nl> |
---|---|
date | Tue, 17 Feb 2009 00:08:20 +0100 |
parents | 7e669954db7d |
children | 2667e3a145be |
line wrap: on
line diff
--- a/gen/irstate.h Mon Feb 16 23:56:56 2009 +0100 +++ b/gen/irstate.h Tue Feb 17 00:08:20 2009 +0100 @@ -81,6 +81,7 @@ { std::deque<IRAsmStmt*> s; std::set<std::string> clobs; + size_t outputcount; // stores the labels within the asm block std::vector<Identifier*> internalLabels; @@ -92,7 +93,9 @@ LLValue* (*retfixup)(IRBuilderHelper b, LLValue* orig); // Modifies retval IRAsmBlock(AsmBlockStatement* b) - : asmBlock(b), retty(NULL), retn(0), retemu(false), retfixup(NULL) {} + : asmBlock(b), retty(NULL), retn(0), retemu(false), retfixup(NULL), + outputcount(0) + {} }; // llvm::CallInst and llvm::InvokeInst don't share a common base