#include "X86EncodingOptimization.h"
#include "X86BaseInfo.h"
#include "llvm/MC/MCExpr.h"
#include "llvm/MC/MCInst.h"
#include "llvm/MC/MCInstrDesc.h"
#include "llvm/Support/Casting.h"
#include "X86EncodingOptimizationForImmediate.def"
Go to the source code of this file.
|
#define | FROM_TO(FROM, TO, IDX1, IDX2) |
|
#define | TO_REV(FROM) FROM_TO(FROM, FROM##_REV, 0, 1) |
|
#define | TO_REV(FROM) FROM_TO(FROM, FROM##_REV, 0, 2) |
|
#define | TO_IMM1(FROM) |
|
#define | TO_IMM1(FROM) |
|
#define | FROM_TO(FROM, TO1, TO2) |
|
#define | FROM_TO(FROM, TO, R0, R1) |
|
#define | FROM_TO(FROM, TO) |
|
#define | ENTRY(LONG, SHORT) |
|
#define | ENTRY(LONG, SHORT) |
|
#define | ENTRY(LONG, SHORT) |
|
◆ ENTRY [1/3]
#define ENTRY |
( |
|
LONG, |
|
|
|
SHORT |
|
) |
| |
Value: case X86::LONG: \
return X86::SHORT;
◆ ENTRY [2/3]
#define ENTRY |
( |
|
LONG, |
|
|
|
SHORT |
|
) |
| |
Value: case X86::SHORT: \
return X86::LONG;
◆ ENTRY [3/3]
#define ENTRY |
( |
|
LONG, |
|
|
|
SHORT |
|
) |
| |
Value: case X86::LONG: \
NewOpc = X86::SHORT; \
break;
◆ FROM_TO [1/4]
#define FROM_TO |
( |
|
FROM, |
|
|
|
TO |
|
) |
| |
Value: case X86::FROM: \
NewOpc = X86::TO; \
break;
◆ FROM_TO [2/4]
#define FROM_TO |
( |
|
FROM, |
|
|
|
TO, |
|
|
|
IDX1, |
|
|
|
IDX2 |
|
) |
| |
Value: case X86::FROM: \
NewOpc = X86::TO; \
OpIdx1 = IDX1; \
OpIdx2 = IDX2; \
break;
◆ FROM_TO [3/4]
#define FROM_TO |
( |
|
FROM, |
|
|
|
TO, |
|
|
|
R0, |
|
|
|
R1 |
|
) |
| |
Value: case X86::FROM: \
if (
MI.getOperand(0).getReg() != X86::R0 || \
MI.getOperand(1).getReg() != X86::R1) \
return false; \
NewOpc = X86::TO; \
break;
◆ FROM_TO [4/4]
#define FROM_TO |
( |
|
FROM, |
|
|
|
TO1, |
|
|
|
TO2 |
|
) |
| |
Value: case X86::FROM: \
Opc1 = X86::TO1; \
Opc2 = X86::TO2; \
break;
◆ TO_IMM1 [1/2]
Value: case X86::FROM##i: \
NewOpc = X86::FROM##1; \
break; \
case X86::FROM##i_EVEX: \
NewOpc = X86::FROM##1_EVEX; \
break; \
case X86::FROM##i_ND: \
NewOpc = X86::FROM##1_ND; \
break;
◆ TO_IMM1 [2/2]
Value: case X86::FROM##i: \
NewOpc = X86::FROM##1; \
break; \
case X86::FROM##i_EVEX: \
NewOpc = X86::FROM##1_EVEX; \
break; \
case X86::FROM##i_NF: \
NewOpc = X86::FROM##1_NF; \
break; \
case X86::FROM##i_ND: \
NewOpc = X86::FROM##1_ND; \
break; \
case X86::FROM##i_NF_ND: \
NewOpc = X86::FROM##1_NF_ND; \
break;
◆ TO_REV [1/2]
#define TO_REV |
( |
|
FROM | ) |
FROM_TO(FROM, FROM##_REV, 0, 1) |
◆ TO_REV [2/2]
#define TO_REV |
( |
|
FROM | ) |
FROM_TO(FROM, FROM##_REV, 0, 2) |
◆ isARegister()
◆ optimizeToFixedRegisterForm()
static bool optimizeToFixedRegisterForm |
( |
MCInst & |
MI | ) |
|
|
static |
◆ optimizeToShortImmediateForm()
static bool optimizeToShortImmediateForm |
( |
MCInst & |
MI | ) |
|
|
static |