Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
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
Prev Previous commit
Next Next commit
Setting Resets_ZF to right value.
  • Loading branch information
DeepakRajendrakumaran committed Apr 6, 2023
commit 27e46cd56a84c9092a26df76f12035a32f619798
61 changes: 29 additions & 32 deletions src/coreclr/jit/instr.h
Original file line number Diff line number Diff line change
Expand Up @@ -119,64 +119,61 @@ enum insFlags : uint64_t
// Resets
Resets_OF = 1ULL << 12,
Resets_SF = 1ULL << 13,
Resets_ZF = 1ULL << 39,
Resets_AF = 1ULL << 14,
Resets_PF = 1ULL << 15,
Resets_CF = 1ULL << 16,
Resets_ZF = 1ULL << 14,
Resets_AF = 1ULL << 15,
Resets_PF = 1ULL << 16,
Resets_CF = 1ULL << 17,

// Undefined
Undefined_OF = 1ULL << 17,
Undefined_SF = 1ULL << 18,
Undefined_ZF = 1ULL << 19,
Undefined_AF = 1ULL << 20,
Undefined_PF = 1ULL << 21,
Undefined_CF = 1ULL << 22,
Undefined_OF = 1ULL << 18,
Undefined_SF = 1ULL << 19,
Undefined_ZF = 1ULL << 20,
Undefined_AF = 1ULL << 21,
Undefined_PF = 1ULL << 22,
Undefined_CF = 1ULL << 23,

// Restore
Restore_SF_ZF_AF_PF_CF = 1ULL << 23,
Restore_SF_ZF_AF_PF_CF = 1ULL << 24,

// x87 instruction
INS_FLAGS_x87Instr = 1ULL << 24,
INS_FLAGS_x87Instr = 1ULL << 25,

// Avx
INS_Flags_IsDstDstSrcAVXInstruction = 1ULL << 25,
INS_Flags_IsDstSrcSrcAVXInstruction = 1ULL << 26,
INS_Flags_IsMskSrcSrcEvexInstruction = 1ULL << 27,
INS_Flags_IsDstDstSrcAVXInstruction = 1ULL << 26,
INS_Flags_IsDstSrcSrcAVXInstruction = 1ULL << 27,
INS_Flags_IsMskSrcSrcEvexInstruction = 1ULL << 28,
INS_Flags_Is3OperandInstructionMask = (INS_Flags_IsDstDstSrcAVXInstruction | INS_Flags_IsDstSrcSrcAVXInstruction | INS_Flags_IsMskSrcSrcEvexInstruction),

// w and s bits
INS_FLAGS_Has_Wbit = 1ULL << 28,
INS_FLAGS_Has_Sbit = 1ULL << 29,
INS_FLAGS_Has_Wbit = 1ULL << 29,
INS_FLAGS_Has_Sbit = 1ULL << 30,

// instruction input size
// if not input size is set, instruction defaults to using
// the emitAttr for size
Input_8Bit = 1ULL << 30,
Input_16Bit = 1ULL << 31,
Input_32Bit = 1ULL << 32,
Input_64Bit = 1ULL << 33,
Input_Mask = (0xFULL) << 30,
Input_8Bit = 1ULL << 31,
Input_16Bit = 1ULL << 32,
Input_32Bit = 1ULL << 33,
Input_64Bit = 1ULL << 34,
Input_Mask = (0xFULL) << 31,

// encoding of the REX.W-bit
REX_W0 = 1ULL << 34,
REX_W1 = 1ULL << 35,
REX_WX = 1ULL << 36,
REX_W0 = 1ULL << 35,
REX_W1 = 1ULL << 36,
REX_WX = 1ULL << 37,

// encoding of the REX.W-bit is considered for EVEX only and W0 or WIG otherwise
REX_W0_EVEX = REX_W0,
REX_W1_EVEX = 1ULL << 37,
REX_W1_EVEX = 1ULL << 38,

// encoding of the REX.W-bit is ignored
REX_WIG = REX_W0,

// whether VEX or EVEX encodings are directly supported
Encoding_VEX = 1ULL << 38,
Encoding_EVEX = 1ULL << 39,
Encoding_VEX = 1ULL << 39,
Encoding_EVEX = 1ULL << 40,

KInstruction = 1ULL << 40,

// Listed above so it is "inline" with the other Resets_* flags
// Resets_ZF = 1ULL << 39,
KInstruction = 1ULL << 41,

// TODO-Cleanup: Remove this flag and its usage from TARGET_XARCH
INS_FLAGS_DONT_CARE = 0x00ULL,
Expand Down