Mercurial > projects > ldc
comparison gen/tocall.cpp @ 720:e177ae483f8e
Added inreg attribute where appropriate on x86 to follow ABI docs.
Removed now unnecessary temporary variable in StringExp.
author | Tomas Lindquist Olsen <tomas.l.olsen@gmail.com> |
---|---|
date | Thu, 23 Oct 2008 00:34:46 +0200 |
parents | 7261ff0f95ff |
children | 55f6c2e454d7 |
comparison
equal
deleted
inserted
replaced
719:7261ff0f95ff | 720:e177ae483f8e |
---|---|
255 if (retinptr) | 255 if (retinptr) |
256 { | 256 { |
257 LLValue* retvar = DtoAlloca(argiter->get()->getContainedType(0), ".rettmp"); | 257 LLValue* retvar = DtoAlloca(argiter->get()->getContainedType(0), ".rettmp"); |
258 ++argiter; | 258 ++argiter; |
259 args.push_back(retvar); | 259 args.push_back(retvar); |
260 | |
261 // add attrs for hidden ptr | |
260 palist = palist.addAttr(1, llvm::Attribute::StructRet); | 262 palist = palist.addAttr(1, llvm::Attribute::StructRet); |
261 } | 263 } |
262 | 264 |
263 // then comes a context argument... | 265 // then comes a context argument... |
264 if(thiscall || delegatecall || nestedcall) | 266 if(thiscall || delegatecall || nestedcall) |
297 else | 299 else |
298 { | 300 { |
299 error(loc, "Context argument required but none given"); | 301 error(loc, "Context argument required but none given"); |
300 fatal(); | 302 fatal(); |
301 } | 303 } |
304 | |
305 // add attributes for context argument | |
306 if (tf->thisAttrs) | |
307 palist = palist.addAttr(retinptr?2:1, tf->thisAttrs); | |
302 } | 308 } |
303 | 309 |
304 // handle the rest of the arguments based on param passing style | 310 // handle the rest of the arguments based on param passing style |
305 | 311 |
306 // variadic instrinsics need some custom casts | 312 // variadic instrinsics need some custom casts |