mirror of
https://github.com/herumi/xbyak
synced 2024-11-21 16:09:11 -07:00
extend setDefaultEncoding for mpsadbw
This commit is contained in:
parent
749aa31dd4
commit
7af7abbf95
1 changed files with 9 additions and 7 deletions
|
@ -2661,13 +2661,13 @@ private:
|
|||
if (addr.getRegExp().getIndex().getKind() != kind) XBYAK_THROW(ERR_BAD_VSIB_ADDRESSING)
|
||||
opVex(x, 0, addr, type, code);
|
||||
}
|
||||
void opEncoding(const Xmm& x1, const Xmm& x2, const Operand& op, uint64_t type, int code, PreferredEncoding encoding)
|
||||
void opEncoding(const Xmm& x1, const Xmm& x2, const Operand& op, uint64_t type, int code, PreferredEncoding encoding, int sel = 0)
|
||||
{
|
||||
opAVX_X_X_XM(x1, x2, op, type | orEvexIf(encoding), code);
|
||||
opAVX_X_X_XM(x1, x2, op, type | orEvexIf(encoding, sel), code);
|
||||
}
|
||||
int orEvexIf(PreferredEncoding encoding) {
|
||||
int orEvexIf(PreferredEncoding encoding, int sel = 0) {
|
||||
if (encoding == DefaultEncoding) {
|
||||
encoding = defaultEncoding_;
|
||||
encoding = defaultEncoding_[sel];
|
||||
}
|
||||
if (encoding == EvexEncoding) {
|
||||
#ifdef XBYAK_DISABLE_AVX512
|
||||
|
@ -2845,7 +2845,7 @@ public:
|
|||
#endif
|
||||
private:
|
||||
bool isDefaultJmpNEAR_;
|
||||
PreferredEncoding defaultEncoding_;
|
||||
PreferredEncoding defaultEncoding_[2]; // 0:vnni, 1:vmpsadbw
|
||||
public:
|
||||
void L(const std::string& label) { labelMgr_.defineSlabel(label); }
|
||||
void L(Label& label) { labelMgr_.defineClabel(label); }
|
||||
|
@ -3131,8 +3131,9 @@ public:
|
|||
, es(Segment::es), cs(Segment::cs), ss(Segment::ss), ds(Segment::ds), fs(Segment::fs), gs(Segment::gs)
|
||||
#endif
|
||||
, isDefaultJmpNEAR_(false)
|
||||
, defaultEncoding_(EvexEncoding)
|
||||
{
|
||||
defaultEncoding_[0] = EvexEncoding; // use avx512-vnni not avx-vnni
|
||||
defaultEncoding_[1] = VexEncoding; // use vmpsadbw(avx) not avx10.2
|
||||
labelMgr_.set(this);
|
||||
}
|
||||
void reset()
|
||||
|
@ -3170,7 +3171,8 @@ public:
|
|||
#endif
|
||||
|
||||
// set default encoding to select Vex or Evex
|
||||
void setDefaultEncoding(PreferredEncoding encoding) { defaultEncoding_ = encoding; }
|
||||
void setDefaultEncoding(PreferredEncoding vnniEnc, PreferredEncoding mpsadbwEnc = VexEncoding)
|
||||
{ defaultEncoding_[0] = vnniEnc; defaultEncoding_[1] = mpsadbwEnc; }
|
||||
|
||||
void sha1msg12(const Xmm& x, const Operand& op)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue