Removed redundant global.params.cpu field.

Now that we have global.params.targetTriple, the information
is only duplicated.
This commit is contained in:
David Nadlinger
2013-02-07 15:12:52 +01:00
parent bee0b9eba1
commit 5f3ba41574
13 changed files with 55 additions and 57 deletions

View File

@@ -140,18 +140,7 @@ the target object file format:
struct OutBuffer;
// LDC
enum ARCH
{
ARCHinvalid = llvm::Triple::UnknownArch,
ARCHx86 = llvm::Triple::x86,
ARCHx86_64 = llvm::Triple::x86_64,
ARCHppc = llvm::Triple::ppc,
ARCHppc_64 = llvm::Triple::ppc64,
ARCHarm = llvm::Triple::arm,
ARCHthumb = llvm::Triple::thumb,
};
#if IN_LLVM
enum OUTPUTFLAG
{
OUTPUTFLAGno,
@@ -169,6 +158,7 @@ enum OS
OSFreeBSD = llvm::Triple::FreeBSD,
OSSolaris = llvm::Triple::Solaris,
};
#endif
typedef unsigned char ubyte;
@@ -191,7 +181,6 @@ struct Param
#endif
char vtls; // identify thread local variables
// KN Start merge conflict
ARCH cpu; // target CPU
OS os; // target OS
bool is64bit; // generate 64 bit code
bool useDeprecated; // allow use of deprecated features

View File

@@ -276,12 +276,12 @@ void Type::init()
}
// set real size and padding
if (global.params.cpu == ARCHx86)
if (global.params.targetTriple.getArch() == llvm::Triple::x86)
{
REALSIZE = 12;
REALPAD = 2;
}
else if (global.params.cpu == ARCHx86_64)
else if (global.params.targetTriple.getArch() == llvm::Triple::x86_64)
{
REALSIZE = 16;
REALPAD = 6;
@@ -1175,8 +1175,11 @@ unsigned TypeBasic::alignsize()
#if IN_LLVM
unsigned TypeBasic::memalign(unsigned salign)
{
if (global.params.cpu == ARCHx86_64 && (ty == Tfloat80 || ty == Timaginary80))
if (global.params.targetTriple.getArch() == llvm::Triple::x86_64 &&
(ty == Tfloat80 || ty == Timaginary80))
{
return 16;
}
return Type::memalign(salign);
}
#endif