Skip to content

Commit

Permalink
increase the room of type
Browse files Browse the repository at this point in the history
  • Loading branch information
herumi committed Oct 30, 2023
1 parent 710e39b commit 77d6ace
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 12 deletions.
9 changes: 4 additions & 5 deletions gen/avx_type.hpp
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
#include <assert.h>
// copy CodeGenerator::AVXtype
enum AVXtype {
// low 3 bit
T_N1 = 1,
T_N2 = 2,
T_N4 = 3,
T_N8 = 4,
T_N16 = 5,
T_N32 = 6,
T_NX_MASK = 7,
//
T_DUP = T_NX_MASK,//1 << 4, // N = (8, 32, 64)
T_N_VL = 1 << 3, // N * (1, 2, 4) for VL
T_DUP = 1 << 4, // N = (8, 32, 64)
// 1 << 4 is free
T_66 = 1 << 5, // pp = 1
T_F3 = 1 << 6, // pp = 2
T_F2 = T_66 | T_F3, // pp = 3
Expand Down Expand Up @@ -55,7 +54,7 @@ std::string type2String(int type)
{
std::string str;
int low = type & T_NX_MASK;
if (0 < low) {
if (0 < low && low < 7) {
const char *tbl[8] = {
"T_N1", "T_N2", "T_N4", "T_N8", "T_N16", "T_N32"
};
Expand All @@ -66,7 +65,7 @@ std::string type2String(int type)
if (!str.empty()) str += " | ";
str += "T_N_VL";
}
if (type & T_DUP) {
if ((type & T_NX_MASK) == T_DUP) {
if (!str.empty()) str += " | ";
str += "T_DUP";
}
Expand Down
10 changes: 3 additions & 7 deletions xbyak/xbyak.h
Original file line number Diff line number Diff line change
Expand Up @@ -1757,9 +1757,9 @@ class CodeGenerator : public CodeArray {
T_N16 = 5,
T_N32 = 6,
T_NX_MASK = 7,
//
T_DUP = T_NX_MASK,//1 << 4, // N = (8, 32, 64)
T_N_VL = 1 << 3, // N * (1, 2, 4) for VL
T_DUP = 1 << 4, // N = (8, 32, 64)
// 1 << 4 is free
T_66 = 1 << 5, // pp = 1
T_F3 = 1 << 6, // pp = 2
T_F2 = T_66 | T_F3, // pp = 3
Expand Down Expand Up @@ -1861,7 +1861,7 @@ class CodeGenerator : public CodeArray {
LL = (VL == 512) ? 2 : (VL == 256) ? 1 : 0;
if (b) {
disp8N = ((type & T_B16) == T_B16) ? 2 : (type & T_B32) ? 4 : 8;
} else if (type & T_DUP) {
} else if ((type & T_NX_MASK) == T_DUP) {
disp8N = VL == 128 ? 8 : VL == 256 ? 32 : 64;
} else {
if ((type & (T_NX_MASK | T_N_VL)) == 0) {
Expand Down Expand Up @@ -3010,10 +3010,6 @@ class CodeGenerator : public CodeArray {
size -= len;
}
}
void adcx2(const Reg32e& r1, const Operand& op)
{
opROO(Reg(), op, r1, T_66, 0x66);
}
#ifndef XBYAK_DONT_READ_LIST
#include "xbyak_mnemonic.h"
/*
Expand Down

0 comments on commit 77d6ace

Please sign in to comment.