mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-02-26 16:43:13 +01:00
- Fixed LLVM style CL args for D2.
- Moved main() into its own file gen/main.cpp - Fixed basic cross compilation - removed the option for setting OS - added support for llc's mattr, mcpu and mtriple switches - added basic ABI abstraction for return value rewrites, it's not perfect and will probably be completely rewritten once I get to handling parameter rewrites as well. - x86-64 extern(C) abi for cfloat returns now match (llvm-)gcc.
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
#include "gen/irstate.h"
|
||||
#include "gen/dvalue.h"
|
||||
#include "gen/functions.h"
|
||||
#include "gen/abi.h"
|
||||
|
||||
#include "gen/logger.h"
|
||||
|
||||
@@ -463,11 +464,8 @@ DValue* DtoCallFunction(Loc& loc, Type* resulttype, DValue* fnval, Expressions*
|
||||
// get return value
|
||||
LLValue* retllval = (retinptr) ? args[0] : call->get();
|
||||
|
||||
// swap real/imag parts on a x87
|
||||
if (global.params.cpu == ARCHx86 && tf->nextOf()->toBasetype()->iscomplex())
|
||||
{
|
||||
retllval = DtoAggrPairSwap(retllval);
|
||||
}
|
||||
// do abi specific return value fixups
|
||||
retllval = gABI->getRet(tf, retllval);
|
||||
|
||||
// repaint the type if necessary
|
||||
if (resulttype)
|
||||
|
||||
Reference in New Issue
Block a user