Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

X86: add support for SSE2/AVX2 intrinsics #1128

Merged
merged 19 commits into from
Dec 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading