MimIR
0.6-dev
MimIR is my Intermediate Representation
Toggle main menu visibility
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
5
#include "
mim/plug/x86_isel/x86_isel.h
"
6
7
namespace
mim::plug::x86_isel
{
8
9
const
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
13
MIM_x86_isel_NORMALIZER_IMPL
14
15
}
// namespace mim::plug::x86_isel
mim::Def
Base class for all Defs.
Definition
def.h:285
mim::Lit::isa
static std::optional< T > isa(const Def *def)
Definition
def.h:974
imm.h
mim::plug::x86_isel
The x86_isel Plugin
Definition
gen.h:5
mim::plug::x86_isel::normalize_imm
const Def * normalize_imm(const Def *type, const Def *, const Def *arg)
Definition
normalizers.cpp:9
mim::plug::x86::fits_imm
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
world.h
MIM_x86_isel_NORMALIZER_IMPL
#define MIM_x86_isel_NORMALIZER_IMPL
Definition
autogen.h:435
x86_isel.h
src
mim
plug
x86_isel
normalizers.cpp
Generated by
1.18.0