MimIR
MimIR is my Intermediate Representation
Loading...
Searching...
No Matches
normalizers.cpp
Go to the documentation of this file.
1#include <mim/world.h>
2
3#include <mim/plug/x86/imm.h>
4
6
7namespace mim::plug::x86_isel {
8
9const Def* normalize_imm(const Def* type, const Def*, const Def* arg) {
10 return Lit::isa(arg) ? type->world().lit_bool(x86::fits_imm(arg)) : nullptr;
11}
12
14
15} // namespace mim::plug::x86_isel
Base class for all Defs.
Definition def.h:285
static std::optional< T > isa(const Def *def)
Definition def.h:974
The x86_isel Plugin
Definition gen.h:5
const Def * normalize_imm(const Def *type, const Def *, const Def *arg)
bool fits_imm(std::optional< nat_t > size, nat_t val)
Does the literal val fit a sign-extended 32-bit immediate, if it is an Idx size?
Definition imm.h:19
#define MIM_x86_isel_NORMALIZER_IMPL
Definition autogen.h:435