another merge

This commit is contained in:
Moritz Warning
2011-02-27 20:11:13 +01:00
4 changed files with 11 additions and 2 deletions

View File

@@ -151,7 +151,7 @@ void AggregateDeclaration::alignmember(
unsigned size, // alignment requirement of field
unsigned *poffset)
{
//printf("salign = %d, size = %d, offset = %d\n",salign,size,offset);
//printf("salign = %d, size = %d, offset = %d\n",salign,size, *poffset);
if (salign > 1)
{
assert(size != 3);
@@ -160,7 +160,7 @@ void AggregateDeclaration::alignmember(
sa = salign;
*poffset = (*poffset + sa - 1) & ~(sa - 1);
}
//printf("result = %d\n",offset);
//printf("result = %d\n", *poffset);
}

View File

@@ -100,6 +100,10 @@ cl::opt<bool> output_s("output-s",
cl::opt<cl::boolOrDefault> output_o("output-o",
cl::desc("Write native object"));
// Disabling Red Zone
cl::opt<bool> disableRedZone("disable-red-zone",
cl::desc("Do not emit code that uses the red zone."),
cl::init(false));
// DDoc options
static cl::opt<bool, true> doDdoc("D",

View File

@@ -26,6 +26,7 @@ namespace opts {
extern cl::opt<bool> output_ll;
extern cl::opt<bool> output_s;
extern cl::opt<cl::boolOrDefault> output_o;
extern cl::opt<bool> disableRedZone;
extern cl::opt<std::string> ddocDir;
extern cl::opt<std::string> ddocFile;
extern cl::opt<std::string> jsonFile;

View File

@@ -22,6 +22,7 @@
#include "gen/dvalue.h"
#include "gen/abi.h"
#include "gen/nested.h"
#include "gen/cl_options.h"
using namespace llvm::Attribute;
@@ -494,6 +495,9 @@ void DtoDeclareFunction(FuncDeclaration* fdecl)
// parameter attributes
if (!fdecl->isIntrinsic()) {
set_param_attrs(f, func, fdecl);
if (opts::disableRedZone) {
func->addFnAttr(NoRedZone);
}
}
// main