support prefetchwt1
This commit is contained in:
parent
1a9d92842f
commit
b7ae2f8e82
8 changed files with 19 additions and 9 deletions
|
@ -536,15 +536,17 @@ void put()
|
||||||
const struct Tbl {
|
const struct Tbl {
|
||||||
int ext;
|
int ext;
|
||||||
const char *name;
|
const char *name;
|
||||||
|
int code;
|
||||||
} tbl[] = {
|
} tbl[] = {
|
||||||
{ 1, "t0" },
|
{ 1, "t0", 0x18},
|
||||||
{ 2, "t1" },
|
{ 2, "t1", 0x18},
|
||||||
{ 3, "t2" },
|
{ 3, "t2", 0x18},
|
||||||
{ 0, "nta" },
|
{ 0, "nta", 0x18},
|
||||||
|
{ 2, "wt1", 0x0D},
|
||||||
};
|
};
|
||||||
for (int i = 0; i < NUM_OF_ARRAY(tbl); i++) {
|
for (int i = 0; i < NUM_OF_ARRAY(tbl); i++) {
|
||||||
const Tbl *p = &tbl[i];
|
const Tbl *p = &tbl[i];
|
||||||
printf("void prefetch%s(const Address& addr) { opModM(addr, Reg32(%d), 0x0F, 0x18); }\n", p->name, p->ext);
|
printf("void prefetch%s(const Address& addr) { opModM(addr, Reg32(%d), 0x0F, 0x%02X); }\n", p->name, p->ext, p->code);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
|
|
||||||
Xbyak 5.40 ; JIT assembler for x86(IA32), x64(AMD64, x86-64) by C++
|
Xbyak 5.41 ; JIT assembler for x86(IA32), x64(AMD64, x86-64) by C++
|
||||||
=============
|
=============
|
||||||
|
|
||||||
Abstract
|
Abstract
|
||||||
|
@ -332,6 +332,7 @@ The header files under xbyak/ are independent of cybozulib.
|
||||||
|
|
||||||
History
|
History
|
||||||
-------------
|
-------------
|
||||||
|
* 2017/Jan/26 ver 5.41 add prefetchwt1 and support for scale == 0(thanks to rsdubtso)
|
||||||
* 2016/Dec/14 ver 5.40 add Label::getAddress() method to get the pointer specified by the label
|
* 2016/Dec/14 ver 5.40 add Label::getAddress() method to get the pointer specified by the label
|
||||||
* 2016/Dec/09 ver 5.34 fix handling of negative offsets when encoding disp8N(thanks to rsdubtso)
|
* 2016/Dec/09 ver 5.34 fix handling of negative offsets when encoding disp8N(thanks to rsdubtso)
|
||||||
* 2016/Dec/08 ver 5.33 fix encoding of vpbroadcast{b,w,d,q}, vpinsr{b,w}, vpextr{b,w} for disp8N
|
* 2016/Dec/08 ver 5.33 fix encoding of vpbroadcast{b,w,d,q}, vpinsr{b,w}, vpextr{b,w} for disp8N
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
|
|
||||||
C++用x86(IA-32), x64(AMD64, x86-64) JITアセンブラ Xbyak 5.40
|
C++用x86(IA-32), x64(AMD64, x86-64) JITアセンブラ Xbyak 5.41
|
||||||
|
|
||||||
-----------------------------------------------------------------------------
|
-----------------------------------------------------------------------------
|
||||||
◎概要
|
◎概要
|
||||||
|
@ -343,6 +343,7 @@ cybozulibは単体テストでのみ利用されていて、xbyak/ディレク
|
||||||
-----------------------------------------------------------------------------
|
-----------------------------------------------------------------------------
|
||||||
◎履歴
|
◎履歴
|
||||||
|
|
||||||
|
2017/01/26 ver 5.41 prefetcwt1追加とscale == 0対応(thanks to rsdubtso)
|
||||||
2016/12/14 ver 5.40 Labelが示すアドレスを取得するLabel::getAddress()追加
|
2016/12/14 ver 5.40 Labelが示すアドレスを取得するLabel::getAddress()追加
|
||||||
2016/12/07 ver 5.34 disp8N時の負のオフセット処理の修正(thanks to rsdubtso)
|
2016/12/07 ver 5.34 disp8N時の負のオフセット処理の修正(thanks to rsdubtso)
|
||||||
2016/12/06 ver 5.33 disp8N時のvpbroadcast{b,w,d,q}, vpinsr{b,w}, vpextr{b,w}のバグ修正
|
2016/12/06 ver 5.33 disp8N時のvpbroadcast{b,w,d,q}, vpinsr{b,w}, vpextr{b,w}のバグ修正
|
||||||
|
|
|
@ -53,6 +53,7 @@ void putCPUinfo()
|
||||||
{ Cpu::tSMAP, "smap" },
|
{ Cpu::tSMAP, "smap" },
|
||||||
{ Cpu::tHLE, "hle" },
|
{ Cpu::tHLE, "hle" },
|
||||||
{ Cpu::tRTM, "rtm" },
|
{ Cpu::tRTM, "rtm" },
|
||||||
|
{ Cpu::tPREFETCHWT1, "prefetchwt1" },
|
||||||
{ Cpu::tF16C, "f16c" },
|
{ Cpu::tF16C, "f16c" },
|
||||||
{ Cpu::tMOVBE, "movbe" },
|
{ Cpu::tMOVBE, "movbe" },
|
||||||
{ Cpu::tAVX512F, "avx512f" },
|
{ Cpu::tAVX512F, "avx512f" },
|
||||||
|
|
|
@ -611,6 +611,7 @@ class Test {
|
||||||
put("prefetcht1", MEM);
|
put("prefetcht1", MEM);
|
||||||
put("prefetcht2", MEM);
|
put("prefetcht2", MEM);
|
||||||
put("prefetchnta", MEM);
|
put("prefetchnta", MEM);
|
||||||
|
put("prefetchwt1", MEM);
|
||||||
|
|
||||||
// SSE2 misc
|
// SSE2 misc
|
||||||
put("maskmovdqu", XMM, XMM);
|
put("maskmovdqu", XMM, XMM);
|
||||||
|
@ -1114,6 +1115,7 @@ class Test {
|
||||||
put(p, "qword [rax], 1000000");
|
put(p, "qword [rax], 1000000");
|
||||||
put(p, "rdx, qword [rax]");
|
put(p, "rdx, qword [rax]");
|
||||||
#endif
|
#endif
|
||||||
|
put("mov", EAX, "ptr [eax + ecx * 0]", "[eax + ecx * 0]"); // ignore scale = 0
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
const char tbl[][8] = {
|
const char tbl[][8] = {
|
||||||
|
|
|
@ -105,7 +105,7 @@ namespace Xbyak {
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
DEFAULT_MAX_CODE_SIZE = 4096,
|
DEFAULT_MAX_CODE_SIZE = 4096,
|
||||||
VERSION = 0x5400 /* 0xABCD = A.BC(D) */
|
VERSION = 0x5410 /* 0xABCD = A.BC(D) */
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifndef MIE_INTEGER_TYPE_DEFINED
|
#ifndef MIE_INTEGER_TYPE_DEFINED
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
const char *getVersionString() const { return "5.34"; }
|
const char *getVersionString() const { return "5.41"; }
|
||||||
void adc(const Operand& op, uint32 imm) { opRM_I(op, imm, 0x10, 2); }
|
void adc(const Operand& op, uint32 imm) { opRM_I(op, imm, 0x10, 2); }
|
||||||
void adc(const Operand& op1, const Operand& op2) { opRM_RM(op1, op2, 0x10); }
|
void adc(const Operand& op1, const Operand& op2) { opRM_RM(op1, op2, 0x10); }
|
||||||
void adcx(const Reg32e& reg, const Operand& op) { opGen(reg, op, 0xF6, 0x66, isREG32_REG32orMEM, NONE, 0x38); }
|
void adcx(const Reg32e& reg, const Operand& op) { opGen(reg, op, 0xF6, 0x66, isREG32_REG32orMEM, NONE, 0x38); }
|
||||||
|
@ -588,6 +588,7 @@ void prefetchnta(const Address& addr) { opModM(addr, Reg32(0), 0x0F, 0x18); }
|
||||||
void prefetcht0(const Address& addr) { opModM(addr, Reg32(1), 0x0F, 0x18); }
|
void prefetcht0(const Address& addr) { opModM(addr, Reg32(1), 0x0F, 0x18); }
|
||||||
void prefetcht1(const Address& addr) { opModM(addr, Reg32(2), 0x0F, 0x18); }
|
void prefetcht1(const Address& addr) { opModM(addr, Reg32(2), 0x0F, 0x18); }
|
||||||
void prefetcht2(const Address& addr) { opModM(addr, Reg32(3), 0x0F, 0x18); }
|
void prefetcht2(const Address& addr) { opModM(addr, Reg32(3), 0x0F, 0x18); }
|
||||||
|
void prefetchwt1(const Address& addr) { opModM(addr, Reg32(2), 0x0F, 0x0D); }
|
||||||
void psadbw(const Mmx& mmx, const Operand& op) { opMMX(mmx, op, 0xF6); }
|
void psadbw(const Mmx& mmx, const Operand& op) { opMMX(mmx, op, 0xF6); }
|
||||||
void pshufb(const Mmx& mmx, const Operand& op) { opMMX(mmx, op, 0x00, 0x66, NONE, 0x38); }
|
void pshufb(const Mmx& mmx, const Operand& op) { opMMX(mmx, op, 0x00, 0x66, NONE, 0x38); }
|
||||||
void pshufd(const Mmx& mmx, const Operand& op, uint8 imm8) { opMMX(mmx, op, 0x70, 0x66, imm8); }
|
void pshufd(const Mmx& mmx, const Operand& op, uint8 imm8) { opMMX(mmx, op, 0x70, 0x66, imm8); }
|
||||||
|
|
|
@ -174,6 +174,7 @@ public:
|
||||||
static const Type tAVX512VBMI = uint64(1) << 43;
|
static const Type tAVX512VBMI = uint64(1) << 43;
|
||||||
static const Type tAVX512_4VNNIW = uint64(1) << 44;
|
static const Type tAVX512_4VNNIW = uint64(1) << 44;
|
||||||
static const Type tAVX512_4FMAPS = uint64(1) << 45;
|
static const Type tAVX512_4FMAPS = uint64(1) << 45;
|
||||||
|
static const Type tPREFETCHWT1 = uint64(1) << 46;
|
||||||
|
|
||||||
Cpu()
|
Cpu()
|
||||||
: type_(NONE)
|
: type_(NONE)
|
||||||
|
@ -251,6 +252,7 @@ public:
|
||||||
if (data[1] & (1U << 20)) type_ |= tSMAP;
|
if (data[1] & (1U << 20)) type_ |= tSMAP;
|
||||||
if (data[1] & (1U << 4)) type_ |= tHLE;
|
if (data[1] & (1U << 4)) type_ |= tHLE;
|
||||||
if (data[1] & (1U << 11)) type_ |= tRTM;
|
if (data[1] & (1U << 11)) type_ |= tRTM;
|
||||||
|
if (data[2] & (1U << 0)) type_ |= tPREFETCHWT1;
|
||||||
}
|
}
|
||||||
setFamily();
|
setFamily();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue