Skip to content

Commit

Permalink
X86: add support for SSE2/AVX2 intrinsics (#1128)
Browse files Browse the repository at this point in the history
Co-authored-by: Zhengyang Liu <[email protected]>
  • Loading branch information
2 people authored and nunoplopes committed Dec 11, 2024
1 parent 33498f1 commit 5c27ca5
Show file tree
Hide file tree
Showing 87 changed files with 1,860 additions and 16 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ set(IR_SRCS
ir/state_value.cpp
ir/type.cpp
ir/value.cpp
ir/x86_intrinsics.cpp
)

add_library(ir STATIC ${IR_SRCS})
Expand Down
16 changes: 0 additions & 16 deletions ir/instr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,22 +19,6 @@ using namespace smt;
using namespace util;
using namespace std;

#define RAUW(val) \
if (val == &what) \
val = &with
#define DEFINE_AS_RETZERO(cls, method) \
uint64_t cls::method() const { return 0; }
#define DEFINE_AS_RETZEROALIGN(cls, method) \
pair<uint64_t, uint64_t> cls::method() const { return { 0, 1 }; }
#define DEFINE_AS_RETFALSE(cls, method) \
bool cls::method() const { return false; }
#define DEFINE_AS_EMPTYACCESS(cls) \
MemInstr::ByteAccessInfo cls::getByteAccessInfo() const \
{ return {}; }

// log2 of max number of var args per function
#define VARARG_BITS 8

namespace {
struct print_type {
IR::Type &ty;
Expand Down
23 changes: 23 additions & 0 deletions ir/instr.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,29 @@
#include <utility>
#include <vector>

#define RAUW(val) \
if (val == &what) \
val = &with
#define DEFINE_AS_RETZERO(cls, method) \
uint64_t cls::method() const { \
return 0; \
}
#define DEFINE_AS_RETZEROALIGN(cls, method) \
pair<uint64_t, uint64_t> cls::method() const { \
return {0, 1}; \
}
#define DEFINE_AS_RETFALSE(cls, method) \
bool cls::method() const { \
return false; \
}
#define DEFINE_AS_EMPTYACCESS(cls) \
MemInstr::ByteAccessInfo cls::getByteAccessInfo() const { \
return {}; \
}

// log2 of max number of var args per function
#define VARARG_BITS 8

namespace IR {

class Function;
Expand Down
Loading

0 comments on commit 5c27ca5

Please sign in to comment.