| Index: src/IceIntrinsics.cpp
|
| diff --git a/src/IceIntrinsics.cpp b/src/IceIntrinsics.cpp
|
| index ffeed21a6fb6830b60f28697cac66be9fea3fc5d..26a81dea7eaa10b5836e1aac95d29011c9396db9 100644
|
| --- a/src/IceIntrinsics.cpp
|
| +++ b/src/IceIntrinsics.cpp
|
| @@ -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
|
|
|