Commit d9dc82e4 by Jim Stichnoth

Subzero: Rerun clang-format after LLVM 3.6 merge.

BUG= none R=jvoung@chromium.org Review URL: https://codereview.chromium.org/974113002
parent a67fc448
......@@ -64,14 +64,14 @@ void testsInt(size_t &TotalTests, size_t &Passes, size_t &Failures) {
#define X(inst, op, isdiv, isshift) \
{ STR(inst), test##inst, Subzero_::test##inst, NULL, NULL, isdiv } \
,
UINTOP_TABLE
UINTOP_TABLE
#undef X
#define X(inst, op, isdiv, isshift) \
{ STR(inst), NULL, NULL, test##inst, Subzero_::test##inst, isdiv } \
,
SINTOP_TABLE
SINTOP_TABLE
#undef X
};
};
const static size_t NumFuncs = sizeof(Funcs) / sizeof(*Funcs);
if (sizeof(TypeUnsigned) <= sizeof(uint32_t)) {
......@@ -177,14 +177,14 @@ void testsVecInt(size_t &TotalTests, size_t &Passes, size_t &Failures) {
#define X(inst, op, isdiv, isshift) \
{ STR(inst), test##inst, Subzero_::test##inst, NULL, NULL, isdiv, isshift } \
,
UINTOP_TABLE
UINTOP_TABLE
#undef X
#define X(inst, op, isdiv, isshift) \
{ STR(inst), NULL, NULL, test##inst, Subzero_::test##inst, isdiv, isshift } \
,
SINTOP_TABLE
SINTOP_TABLE
#undef X
};
};
const static size_t NumFuncs = sizeof(Funcs) / sizeof(*Funcs);
const static size_t NumElementsInType = Vectors<TypeUnsigned>::NumElements;
for (size_t f = 0; f < NumFuncs; ++f) {
......@@ -247,9 +247,9 @@ void testsFp(size_t &TotalTests, size_t &Passes, size_t &Failures) {
#define X(inst, op, func) \
{ STR(inst), (FuncType)test##inst, (FuncType)Subzero_::test##inst } \
,
FPOP_TABLE
FPOP_TABLE
#undef X
};
};
const static size_t NumFuncs = sizeof(Funcs) / sizeof(*Funcs);
for (size_t f = 0; f < NumFuncs; ++f) {
......@@ -306,9 +306,9 @@ void testsVecFp(size_t &TotalTests, size_t &Passes, size_t &Failures) {
#define X(inst, op, func) \
{ STR(inst), (FuncType)test##inst, (FuncType)Subzero_::test##inst } \
,
FPOP_TABLE
FPOP_TABLE
#undef X
};
};
const static size_t NumFuncs = sizeof(Funcs) / sizeof(*Funcs);
const static size_t NumElementsInType = 4;
for (size_t f = 0; f < NumFuncs; ++f) {
......
......@@ -28,31 +28,18 @@ namespace Subzero_ {
}
volatile uint64_t Values[] = {
0, 1,
0x7e, 0x7f,
0x80, 0x81,
0xfe, 0xff,
0x7ffe, 0x7fff,
0x8000, 0x8001,
0xfffe, 0xffff,
0xc0de, 0xabcd,
0xdcba, 0x007fffff /*Max subnormal + */,
0x00800000 /*Min+ */, 0x7f7fffff /*Max+ */,
0x7f800000 /*+Inf*/, 0xff800000 /*-Inf*/,
0x7fa00000 /*SNaN*/, 0x7fc00000 /*QNaN*/,
0x7ffffffe, 0x7fffffff,
0x80000000, 0x80000001,
0xfffffffe, 0xffffffff,
0x12345678, 0xabcd1234,
0x1234dcba, 0x100000000ll,
0x100000001ll, 0x123456789abcdef1ll,
0x987654321ab1fedcll, 0x000fffffffffffffll /*Max subnormal + */,
0, 1, 0x7e, 0x7f, 0x80, 0x81, 0xfe, 0xff, 0x7ffe, 0x7fff, 0x8000, 0x8001,
0xfffe, 0xffff, 0xc0de, 0xabcd, 0xdcba, 0x007fffff /*Max subnormal + */,
0x00800000 /*Min+ */, 0x7f7fffff /*Max+ */, 0x7f800000 /*+Inf*/,
0xff800000 /*-Inf*/, 0x7fa00000 /*SNaN*/, 0x7fc00000 /*QNaN*/, 0x7ffffffe,
0x7fffffff, 0x80000000, 0x80000001, 0xfffffffe, 0xffffffff, 0x12345678,
0xabcd1234, 0x1234dcba, 0x100000000ll, 0x100000001ll, 0x123456789abcdef1ll,
0x987654321ab1fedcll, 0x000fffffffffffffll /*Max subnormal + */,
0x0010000000000000ll /*Min+ */, 0x7fefffffffffffffll /*Max+ */,
0x7ff0000000000000ll /*+Inf*/, 0xfff0000000000000ll /*-Inf*/,
0x7ff0000000000001ll /*SNaN*/, 0x7ff8000000000000ll /*QNaN*/,
0x7ffffffffffffffell, 0x7fffffffffffffffll,
0x8000000000000000ll, 0x8000000000000001ll,
0xfffffffffffffffell, 0xffffffffffffffffll};
0x7ff0000000000000ll /*+Inf*/, 0xfff0000000000000ll /*-Inf*/,
0x7ff0000000000001ll /*SNaN*/, 0x7ff8000000000000ll /*QNaN*/,
0x7ffffffffffffffell, 0x7fffffffffffffffll, 0x8000000000000000ll,
0x8000000000000001ll, 0xfffffffffffffffell, 0xffffffffffffffffll};
const static size_t NumValues = sizeof(Values) / sizeof(*Values);
......@@ -68,9 +55,9 @@ void testBitManip(size_t &TotalTests, size_t &Passes, size_t &Failures) {
{ STR(inst), test_##inst, Subzero_::test_##inst } \
, {STR(inst) "_alloca", test_alloca_##inst, Subzero_::test_alloca_##inst}, \
{STR(inst) "_const", test_const_##inst, Subzero_::test_const_##inst},
BMI_OPS
BMI_OPS
#undef X
};
};
const static size_t NumFuncs = sizeof(Funcs) / sizeof(*Funcs);
for (size_t f = 0; f < NumFuncs; ++f) {
......@@ -100,8 +87,8 @@ void testByteSwap(size_t &TotalTests, size_t &Passes, size_t &Failures) {
FuncType FuncLlc;
FuncType FuncSz;
} Funcs[] = {
{"bswap", test_bswap, Subzero_::test_bswap},
{"bswap_alloca", test_bswap_alloca, Subzero_::test_bswap_alloca}};
{"bswap", test_bswap, Subzero_::test_bswap},
{"bswap_alloca", test_bswap_alloca, Subzero_::test_bswap_alloca}};
const static size_t NumFuncs = sizeof(Funcs) / sizeof(*Funcs);
for (size_t f = 0; f < NumFuncs; ++f) {
for (size_t i = 0; i < NumValues; ++i) {
......
......@@ -75,9 +75,9 @@ void testCaller(size_t &TotalTests, size_t &Passes, size_t &Failures) {
reinterpret_cast<CalleePtrTy>(&callee), \
} \
,
TEST_FUNC_TABLE
TEST_FUNC_TABLE
#undef X
};
};
const static size_t NumFuncs = sizeof(Funcs) / sizeof(*Funcs);
......@@ -125,9 +125,9 @@ void testCallee(size_t &TotalTests, size_t &Passes, size_t &Failures) {
reinterpret_cast<CalleePtrTy>(&Subzero_::callee) \
} \
,
TEST_FUNC_TABLE
TEST_FUNC_TABLE
#undef X
};
};
const static size_t NumFuncs = sizeof(Funcs) / sizeof(*Funcs);
......
......@@ -148,29 +148,19 @@ int main(int argc, char **argv) {
static const size_t NumValsSi32 = sizeof(ValsSi32) / sizeof(*ValsSi32);
volatile uint64_t ValsUi64[] = {
0, 1, 0x7e,
0x7f, 0x80, 0x81,
0xfe, 0xff, 0x7ffe,
0x7fff, 0x8000, 0x8001,
0xfffe, 0xffff, 0x7ffffffe,
0x7fffffff, 0x80000000, 0x80000001,
0xfffffffe, 0xffffffff, 0x100000000ull,
0x100000001ull, 0x7ffffffffffffffeull, 0x7fffffffffffffffull,
0x8000000000000000ull, 0x8000000000000001ull, 0xfffffffffffffffeull,
0xffffffffffffffffull};
0, 1, 0x7e, 0x7f, 0x80, 0x81, 0xfe, 0xff, 0x7ffe, 0x7fff, 0x8000, 0x8001,
0xfffe, 0xffff, 0x7ffffffe, 0x7fffffff, 0x80000000, 0x80000001,
0xfffffffe, 0xffffffff, 0x100000000ull, 0x100000001ull,
0x7ffffffffffffffeull, 0x7fffffffffffffffull, 0x8000000000000000ull,
0x8000000000000001ull, 0xfffffffffffffffeull, 0xffffffffffffffffull};
static const size_t NumValsUi64 = sizeof(ValsUi64) / sizeof(*ValsUi64);
volatile int64_t ValsSi64[] = {
0, 1, 0x7e,
0x7f, 0x80, 0x81,
0xfe, 0xff, 0x7ffe,
0x7fff, 0x8000, 0x8001,
0xfffe, 0xffff, 0x7ffffffe,
0x7fffffff, 0x80000000, 0x80000001,
0xfffffffe, 0xffffffff, 0x100000000ll,
0x100000001ll, 0x7ffffffffffffffell, 0x7fffffffffffffffll,
0x8000000000000000ll, 0x8000000000000001ll, 0xfffffffffffffffell,
0xffffffffffffffffll};
0, 1, 0x7e, 0x7f, 0x80, 0x81, 0xfe, 0xff, 0x7ffe, 0x7fff, 0x8000, 0x8001,
0xfffe, 0xffff, 0x7ffffffe, 0x7fffffff, 0x80000000, 0x80000001,
0xfffffffe, 0xffffffff, 0x100000000ll, 0x100000001ll,
0x7ffffffffffffffell, 0x7fffffffffffffffll, 0x8000000000000000ll,
0x8000000000000001ll, 0xfffffffffffffffell, 0xffffffffffffffffll};
static const size_t NumValsSi64 = sizeof(ValsSi64) / sizeof(*ValsSi64);
static const double NegInf = -1.0 / 0.0;
......
......@@ -72,9 +72,9 @@ void testsScalar(size_t &TotalTests, size_t &Passes, size_t &Failures) {
Subzero_fcmp##cmp##Double, fcmp##cmp##Double \
} \
,
FCMP_TABLE
FCMP_TABLE
#undef X
};
};
const static size_t NumFuncs = sizeof(Funcs) / sizeof(*Funcs);
bool ResultSz, ResultLlc;
......@@ -125,9 +125,9 @@ void testsVector(size_t &TotalTests, size_t &Passes, size_t &Failures) {
#define X(cmp) \
{ "fcmp" STR(cmp), Subzero_fcmp##cmp##Vector, fcmp##cmp##Vector } \
,
FCMP_TABLE
FCMP_TABLE
#undef X
};
};
const static size_t NumFuncs = sizeof(Funcs) / sizeof(*Funcs);
const static size_t NumElementsInType = 4;
const static size_t MaxTestsPerFunc = 100000;
......
......@@ -43,12 +43,12 @@ static struct {
} NestedStuff;
uint8_t *Pointer5;
} StructEx = {
{10, 20, 30, 40, 50},
ExternName1,
{0.5, 1.5, 2.5},
ExternName4,
{ExternName3, {1000, 1010, 1020}, ExternName2},
ExternName5,
{10, 20, 30, 40, 50},
ExternName1,
{0.5, 1.5, 2.5},
ExternName4,
{ExternName3, {1000, 1010, 1020}, ExternName2},
ExternName5,
};
#define ARRAY(a) \
......@@ -61,13 +61,13 @@ struct {
uint8_t *ArrayAddress;
size_t ArraySizeInBytes;
} Arrays[] = {
ARRAY(ArrayInitPartial),
ARRAY(ArrayInitFull),
ARRAY(ArrayConst),
ARRAY(ArrayDouble),
{(uint8_t *)(ArrayInitPartial + 2),
sizeof(ArrayInitPartial) - 2 * sizeof(int)},
{(uint8_t *)(&StructEx), sizeof(StructEx)},
ARRAY(ArrayInitPartial),
ARRAY(ArrayInitFull),
ARRAY(ArrayConst),
ARRAY(ArrayDouble),
{(uint8_t *)(ArrayInitPartial + 2),
sizeof(ArrayInitPartial) - 2 * sizeof(int)},
{(uint8_t *)(&StructEx), sizeof(StructEx)},
};
size_t NumArraysElements = sizeof(Arrays) / sizeof(*Arrays);
......
......@@ -50,17 +50,17 @@ void testsInt(size_t &TotalTests, size_t &Passes, size_t &Failures) {
(FuncTypeUnsigned)Subzero_::icmp##cmp \
} \
,
ICMP_U_TABLE
ICMP_U_TABLE
#undef X
#define X(cmp, op) \
{ \
STR(cmp), (FuncTypeUnsigned)(FuncTypeSigned) icmp##cmp, \
(FuncTypeUnsigned)(FuncTypeSigned) Subzero_::icmp##cmp \
STR(cmp), (FuncTypeUnsigned)(FuncTypeSigned)icmp##cmp, \
(FuncTypeUnsigned)(FuncTypeSigned)Subzero_::icmp##cmp \
} \
,
ICMP_S_TABLE
ICMP_S_TABLE
#undef X
};
};
const static size_t NumFuncs = sizeof(Funcs) / sizeof(*Funcs);
if (sizeof(TypeUnsigned) <= sizeof(uint32_t)) {
......@@ -137,17 +137,17 @@ void testsVecInt(size_t &TotalTests, size_t &Passes, size_t &Failures) {
(FuncTypeUnsigned)Subzero_::icmp##cmp \
} \
,
ICMP_U_TABLE
ICMP_U_TABLE
#undef X
#define X(cmp, op) \
{ \
STR(cmp), (FuncTypeUnsigned)(FuncTypeSigned) icmp##cmp, \
(FuncTypeUnsigned)(FuncTypeSigned) Subzero_::icmp##cmp \
STR(cmp), (FuncTypeUnsigned)(FuncTypeSigned)icmp##cmp, \
(FuncTypeUnsigned)(FuncTypeSigned)Subzero_::icmp##cmp \
} \
,
ICMP_S_TABLE
ICMP_S_TABLE
#undef X
};
};
const static size_t NumFuncs = sizeof(Funcs) / sizeof(*Funcs);
const static size_t NumElementsInType = Vectors<TypeUnsigned>::NumElements;
for (size_t f = 0; f < NumFuncs; ++f) {
......@@ -206,7 +206,7 @@ void testsVecI1(size_t &TotalTests, size_t &Passes, size_t &Failures) {
#define X(cmp, op) \
{ STR(cmp), (FuncType)icmpi1##cmp, (FuncType)Subzero_::icmpi1##cmp } \
,
ICMP_U_TABLE ICMP_S_TABLE};
ICMP_U_TABLE ICMP_S_TABLE};
const static size_t NumFuncs = sizeof(Funcs) / sizeof(*Funcs);
const static size_t NumElements = Vectors<T>::NumElements;
const static size_t MAX_NUMBER_OF_ELEMENTS_FOR_EXHAUSTIVE_TESTING = 8;
......
......@@ -33,27 +33,17 @@ namespace Subzero_ {
}
volatile uint64_t Values[] = {
0, 1,
0x7e, 0x7f,
0x80, 0x81,
0xfe, 0xff,
0x7ffe, 0x7fff,
0x8000, 0x8001,
0xfffe, 0xffff,
0x007fffff /*Max subnormal + */, 0x00800000 /*Min+ */,
0x7f7fffff /*Max+ */, 0x7f800000 /*+Inf*/,
0xff800000 /*-Inf*/, 0x7fa00000 /*SNaN*/,
0x7fc00000 /*QNaN*/, 0x7ffffffe,
0x7fffffff, 0x80000000,
0x80000001, 0xfffffffe,
0xffffffff, 0x100000000ll,
0x100000001ll, 0x000fffffffffffffll /*Max subnormal + */,
0x0010000000000000ll /*Min+ */, 0x7fefffffffffffffll /*Max+ */,
0x7ff0000000000000ll /*+Inf*/, 0xfff0000000000000ll /*-Inf*/,
0x7ff0000000000001ll /*SNaN*/, 0x7ff8000000000000ll /*QNaN*/,
0x7ffffffffffffffell, 0x7fffffffffffffffll,
0x8000000000000000ll, 0x8000000000000001ll,
0xfffffffffffffffell, 0xffffffffffffffffll};
0, 1, 0x7e, 0x7f, 0x80, 0x81, 0xfe, 0xff, 0x7ffe, 0x7fff, 0x8000, 0x8001,
0xfffe, 0xffff, 0x007fffff /*Max subnormal + */, 0x00800000 /*Min+ */,
0x7f7fffff /*Max+ */, 0x7f800000 /*+Inf*/, 0xff800000 /*-Inf*/,
0x7fa00000 /*SNaN*/, 0x7fc00000 /*QNaN*/, 0x7ffffffe, 0x7fffffff,
0x80000000, 0x80000001, 0xfffffffe, 0xffffffff, 0x100000000ll,
0x100000001ll, 0x000fffffffffffffll /*Max subnormal + */,
0x0010000000000000ll /*Min+ */, 0x7fefffffffffffffll /*Max+ */,
0x7ff0000000000000ll /*+Inf*/, 0xfff0000000000000ll /*-Inf*/,
0x7ff0000000000001ll /*SNaN*/, 0x7ff8000000000000ll /*QNaN*/,
0x7ffffffffffffffell, 0x7fffffffffffffffll, 0x8000000000000000ll,
0x8000000000000001ll, 0xfffffffffffffffell, 0xffffffffffffffffll};
const static size_t NumValues = sizeof(Values) / sizeof(*Values);
......@@ -77,9 +67,9 @@ void testAtomicRMW(volatile Type *AtomicLoc, size_t &TotalTests, size_t &Passes,
{ STR(inst), test_##inst, Subzero_::test_##inst } \
, {STR(inst) "_alloca", test_alloca_##inst, Subzero_::test_alloca_##inst}, \
{STR(inst) "_const", test_const_##inst, Subzero_::test_const_##inst},
RMWOP_TABLE
RMWOP_TABLE
#undef X
};
};
const static size_t NumFuncs = sizeof(Funcs) / sizeof(*Funcs);
for (size_t f = 0; f < NumFuncs; ++f) {
......@@ -188,9 +178,9 @@ void testAtomicRMWThreads(volatile Type *AtomicLoc, size_t &TotalTests,
#define X(inst) \
{ STR(inst), test_##inst, Subzero_::test_##inst } \
, {STR(inst) "_alloca", test_alloca_##inst, Subzero_::test_alloca_##inst},
RMWOP_TABLE
RMWOP_TABLE
#undef X
};
};
const static size_t NumFuncs = sizeof(Funcs) / sizeof(*Funcs);
// Just test a few values, otherwise it takes a *really* long time.
......
......@@ -36,7 +36,7 @@ struct {
#define X(tag, str, is_elf64, e_machine, e_flags) \
{ is_elf64, e_machine, e_flags } \
,
TARGETARCH_TABLE
TARGETARCH_TABLE
#undef X
};
......
......@@ -30,7 +30,7 @@ const struct InstArithmeticAttributes_ {
#define X(tag, str, commutative) \
{ str, commutative } \
,
ICEINSTARITHMETIC_TABLE
ICEINSTARITHMETIC_TABLE
#undef X
};
......@@ -41,7 +41,7 @@ const struct InstCastAttributes_ {
#define X(tag, str) \
{ str } \
,
ICEINSTCAST_TABLE
ICEINSTCAST_TABLE
#undef X
};
......@@ -52,7 +52,7 @@ const struct InstFcmpAttributes_ {
#define X(tag, str) \
{ str } \
,
ICEINSTFCMP_TABLE
ICEINSTFCMP_TABLE
#undef X
};
......@@ -63,7 +63,7 @@ const struct InstIcmpAttributes_ {
#define X(tag, str) \
{ str } \
,
ICEINSTICMP_TABLE
ICEINSTICMP_TABLE
#undef X
};
......
......@@ -34,7 +34,7 @@ const struct InstX8632BrAttributes_ {
#define X(tag, encode, opp, dump, emit) \
{ CondX86::opp, dump, emit } \
,
ICEINSTX8632BR_TABLE
ICEINSTX8632BR_TABLE
#undef X
};
......@@ -44,7 +44,7 @@ const struct InstX8632CmppsAttributes_ {
#define X(tag, emit) \
{ emit } \
,
ICEINSTX8632CMPPS_TABLE
ICEINSTX8632CMPPS_TABLE
#undef X
};
......@@ -58,7 +58,7 @@ const struct TypeX8632Attributes_ {
#define X(tag, elementty, cvt, sdss, pack, width, fld) \
{ cvt, sdss, pack, width, fld } \
,
ICETYPEX8632_TABLE
ICETYPEX8632_TABLE
#undef X
};
......@@ -1256,9 +1256,9 @@ void emitVariableBlendInst(const char *Opcode, const Inst *Inst,
Inst->getDest()->emit(Func);
}
void
emitIASVariableBlendInst(const Inst *Inst, const Cfg *Func,
const x86::AssemblerX86::XmmEmitterRegOp &Emitter) {
void emitIASVariableBlendInst(
const Inst *Inst, const Cfg *Func,
const x86::AssemblerX86::XmmEmitterRegOp &Emitter) {
assert(Inst->getSrcSize() == 3);
assert(llvm::cast<Variable>(Inst->getSrc(2))->getRegNum() ==
RegX8632::Reg_xmm0);
......
......@@ -51,24 +51,22 @@ const struct IceIntrinsicsEntry_ {
} \
, "nacl.atomic.cmpxchg." NameSuffix \
}
AtomicCmpxchgInit(IceType_i8, "i8"),
AtomicCmpxchgInit(IceType_i16, "i16"),
AtomicCmpxchgInit(IceType_i32, "i32"),
AtomicCmpxchgInit(IceType_i64, "i64"),
AtomicCmpxchgInit(IceType_i8, "i8"),
AtomicCmpxchgInit(IceType_i16, "i16"),
AtomicCmpxchgInit(IceType_i32, "i32"),
AtomicCmpxchgInit(IceType_i64, "i64"),
#undef AtomicCmpxchgInit
{{INTRIN(AtomicFence, SideEffects_T, ReturnsTwice_F),
{IceType_void, IceType_i32},
2},
"nacl.atomic.fence"},
{{INTRIN(AtomicFenceAll, SideEffects_T, ReturnsTwice_F),
{IceType_void},
1},
"nacl.atomic.fence.all"},
{{INTRIN(AtomicIsLockFree, SideEffects_F, ReturnsTwice_F),
{IceType_i1, IceType_i32, IceType_i32},
3},
"nacl.atomic.is.lock.free"},
{{INTRIN(AtomicFence, SideEffects_T, ReturnsTwice_F),
{IceType_void, IceType_i32},
2},
"nacl.atomic.fence"},
{{INTRIN(AtomicFenceAll, SideEffects_T, ReturnsTwice_F), {IceType_void}, 1},
"nacl.atomic.fence.all"},
{{INTRIN(AtomicIsLockFree, SideEffects_F, ReturnsTwice_F),
{IceType_i1, IceType_i32, IceType_i32},
3},
"nacl.atomic.is.lock.free"},
#define AtomicLoadInit(Overload, NameSuffix) \
{ \
......@@ -78,10 +76,10 @@ const struct IceIntrinsicsEntry_ {
} \
, "nacl.atomic.load." NameSuffix \
}
AtomicLoadInit(IceType_i8, "i8"),
AtomicLoadInit(IceType_i16, "i16"),
AtomicLoadInit(IceType_i32, "i32"),
AtomicLoadInit(IceType_i64, "i64"),
AtomicLoadInit(IceType_i8, "i8"),
AtomicLoadInit(IceType_i16, "i16"),
AtomicLoadInit(IceType_i32, "i32"),
AtomicLoadInit(IceType_i64, "i64"),
#undef AtomicLoadInit
#define AtomicRMWInit(Overload, NameSuffix) \
......@@ -92,10 +90,10 @@ const struct IceIntrinsicsEntry_ {
} \
, "nacl.atomic.rmw." NameSuffix \
}
AtomicRMWInit(IceType_i8, "i8"),
AtomicRMWInit(IceType_i16, "i16"),
AtomicRMWInit(IceType_i32, "i32"),
AtomicRMWInit(IceType_i64, "i64"),
AtomicRMWInit(IceType_i8, "i8"),
AtomicRMWInit(IceType_i16, "i16"),
AtomicRMWInit(IceType_i32, "i32"),
AtomicRMWInit(IceType_i64, "i64"),
#undef AtomicRMWInit
#define AtomicStoreInit(Overload, NameSuffix) \
......@@ -106,10 +104,10 @@ const struct IceIntrinsicsEntry_ {
} \
, "nacl.atomic.store." NameSuffix \
}
AtomicStoreInit(IceType_i8, "i8"),
AtomicStoreInit(IceType_i16, "i16"),
AtomicStoreInit(IceType_i32, "i32"),
AtomicStoreInit(IceType_i64, "i64"),
AtomicStoreInit(IceType_i8, "i8"),
AtomicStoreInit(IceType_i16, "i16"),
AtomicStoreInit(IceType_i32, "i32"),
AtomicStoreInit(IceType_i64, "i64"),
#undef AtomicStoreInit
#define BswapInit(Overload, NameSuffix) \
......@@ -120,9 +118,9 @@ const struct IceIntrinsicsEntry_ {
} \
, "bswap." NameSuffix \
}
BswapInit(IceType_i16, "i16"),
BswapInit(IceType_i32, "i32"),
BswapInit(IceType_i64, "i64"),
BswapInit(IceType_i16, "i16"),
BswapInit(IceType_i32, "i32"),
BswapInit(IceType_i64, "i64"),
#undef BswapInit
#define CtlzInit(Overload, NameSuffix) \
......@@ -133,8 +131,8 @@ const struct IceIntrinsicsEntry_ {
} \
, "ctlz." NameSuffix \
}
CtlzInit(IceType_i32, "i32"),
CtlzInit(IceType_i64, "i64"),
CtlzInit(IceType_i32, "i32"),
CtlzInit(IceType_i64, "i64"),
#undef CtlzInit
#define CtpopInit(Overload, NameSuffix) \
......@@ -145,8 +143,8 @@ const struct IceIntrinsicsEntry_ {
} \
, "ctpop." NameSuffix \
}
CtpopInit(IceType_i32, "i32"),
CtpopInit(IceType_i64, "i64"),
CtpopInit(IceType_i32, "i32"),
CtpopInit(IceType_i64, "i64"),
#undef CtpopInit
#define CttzInit(Overload, NameSuffix) \
......@@ -157,53 +155,52 @@ const struct IceIntrinsicsEntry_ {
} \
, "cttz." NameSuffix \
}
CttzInit(IceType_i32, "i32"),
CttzInit(IceType_i64, "i64"),
CttzInit(IceType_i32, "i32"),
CttzInit(IceType_i64, "i64"),
#undef CttzInit
{{INTRIN(Longjmp, SideEffects_T, ReturnsTwice_F),
{IceType_void, IceType_i32, IceType_i32},
3},
"nacl.longjmp"},
{{INTRIN(Memcpy, SideEffects_T, ReturnsTwice_F),
{IceType_void, IceType_i32, IceType_i32, IceType_i32, IceType_i32,
IceType_i1},
6},
"memcpy.p0i8.p0i8.i32"},
{{INTRIN(Memmove, SideEffects_T, ReturnsTwice_F),
{IceType_void, IceType_i32, IceType_i32, IceType_i32, IceType_i32,
IceType_i1},
6},
"memmove.p0i8.p0i8.i32"},
{{INTRIN(Memset, SideEffects_T, ReturnsTwice_F),
{IceType_void, IceType_i32, IceType_i8, IceType_i32, IceType_i32,
IceType_i1},
6},
"memset.p0i8.i32"},
{{INTRIN(NaClReadTP, SideEffects_F, ReturnsTwice_F), {IceType_i32}, 1},
"nacl.read.tp"},
{{INTRIN(Setjmp, SideEffects_T, ReturnsTwice_T),
{IceType_i32, IceType_i32},
2},
"nacl.setjmp"},
{{INTRIN(Longjmp, SideEffects_T, ReturnsTwice_F),
{IceType_void, IceType_i32, IceType_i32},
3},
"nacl.longjmp"},
{{INTRIN(Memcpy, SideEffects_T, ReturnsTwice_F),
{IceType_void, IceType_i32, IceType_i32, IceType_i32, IceType_i32,
IceType_i1},
6},
"memcpy.p0i8.p0i8.i32"},
{{INTRIN(Memmove, SideEffects_T, ReturnsTwice_F),
{IceType_void, IceType_i32, IceType_i32, IceType_i32, IceType_i32,
IceType_i1},
6},
"memmove.p0i8.p0i8.i32"},
{{INTRIN(Memset, SideEffects_T, ReturnsTwice_F),
{IceType_void, IceType_i32, IceType_i8, IceType_i32, IceType_i32,
IceType_i1},
6},
"memset.p0i8.i32"},
{{INTRIN(NaClReadTP, SideEffects_F, ReturnsTwice_F), {IceType_i32}, 1},
"nacl.read.tp"},
{{INTRIN(Setjmp, SideEffects_T, ReturnsTwice_T),
{IceType_i32, IceType_i32},
2},
"nacl.setjmp"},
#define SqrtInit(Overload, NameSuffix) \
{ \
{ INTRIN(Sqrt, SideEffects_F, ReturnsTwice_F), {Overload, Overload}, 2 } \
, "sqrt." NameSuffix \
}
SqrtInit(IceType_f32, "f32"),
SqrtInit(IceType_f64, "f64"),
SqrtInit(IceType_f32, "f32"),
SqrtInit(IceType_f64, "f64"),
#undef SqrtInit
{{INTRIN(Stacksave, SideEffects_T, ReturnsTwice_F), {IceType_i32}, 1},
"stacksave"},
{{INTRIN(Stackrestore, SideEffects_T, ReturnsTwice_F),
{IceType_void, IceType_i32},
2},
"stackrestore"},
{{INTRIN(Trap, SideEffects_T, ReturnsTwice_F), {IceType_void}, 1},
"trap"}};
{{INTRIN(Stacksave, SideEffects_T, ReturnsTwice_F), {IceType_i32}, 1},
"stacksave"},
{{INTRIN(Stackrestore, SideEffects_T, ReturnsTwice_F),
{IceType_void, IceType_i32},
2},
"stackrestore"},
{{INTRIN(Trap, SideEffects_T, ReturnsTwice_F), {IceType_void}, 1}, "trap"}};
const size_t IceIntrinsicsTableSize = llvm::array_lengthof(IceIntrinsicsTable);
#undef INTRIN
......
......@@ -61,7 +61,7 @@ const struct TableFcmp_ {
#define X(val, dflt, swapS, C1, C2, swapV, pred) \
{ dflt, swapS, CondX86::C1, CondX86::C2, swapV, CondX86::pred } \
,
FCMPX8632_TABLE
FCMPX8632_TABLE
#undef X
};
const size_t TableFcmpSize = llvm::array_lengthof(TableFcmp);
......@@ -76,7 +76,7 @@ const struct TableIcmp32_ {
#define X(val, C_32, C1_64, C2_64, C3_64) \
{ CondX86::C_32 } \
,
ICMPX8632_TABLE
ICMPX8632_TABLE
#undef X
};
const size_t TableIcmp32Size = llvm::array_lengthof(TableIcmp32);
......@@ -91,7 +91,7 @@ const struct TableIcmp64_ {
#define X(val, C_32, C1_64, C2_64, C3_64) \
{ CondX86::C1_64, CondX86::C2_64, CondX86::C3_64 } \
,
ICMPX8632_TABLE
ICMPX8632_TABLE
#undef X
};
const size_t TableIcmp64Size = llvm::array_lengthof(TableIcmp64);
......@@ -108,7 +108,7 @@ const struct TableTypeX8632Attributes_ {
#define X(tag, elementty, cvt, sdss, pack, width, fld) \
{ elementty } \
,
ICETYPEX8632_TABLE
ICETYPEX8632_TABLE
#undef X
};
const size_t TableTypeX8632AttributesSize =
......@@ -4120,8 +4120,8 @@ void TargetX8632::scalarizeArithmetic(InstArithmetic::OpKind Kind,
// We can eliminate the sext operation by copying the result of pcmpeqd,
// pcmpgtd, or cmpps (which produce sign extended results) to the result
// of the sext operation.
void
TargetX8632::eliminateNextVectorSextInstruction(Variable *SignExtendedResult) {
void TargetX8632::eliminateNextVectorSextInstruction(
Variable *SignExtendedResult) {
if (InstCast *NextCast =
llvm::dyn_cast_or_null<InstCast>(Context.getNextInst())) {
if (NextCast->getCastKind() == InstCast::Sext &&
......
......@@ -386,9 +386,8 @@ int main(int argc, char **argv) {
SMDiagnostic Err;
Ice::TimerMarker T1(Ice::TimerStack::TT_parse, &Ctx);
raw_ostream *Verbose = LLVMVerboseErrors ? &errs() : nullptr;
std::unique_ptr<Module> Mod =
NaClParseIRFile(IRFilename, InputFileFormat, Err, Verbose,
getGlobalContext());
std::unique_ptr<Module> Mod = NaClParseIRFile(
IRFilename, InputFileFormat, Err, Verbose, getGlobalContext());
if (!Mod) {
Err.print(argv[0], errs());
return GetReturnValue(Ice::EC_Bitcode);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment