diff options
author | MITSUNARI Shigeo <[email protected]> | 2023-07-05 18:28:52 +0900 |
---|---|---|
committer | MITSUNARI Shigeo <[email protected]> | 2023-07-05 18:28:52 +0900 |
commit | ce083a0dcc306c1717685a81f577a4e050193919 (patch) | |
tree | 31ecff50161b82b32b5945df5e0e455a8fff76b4 | |
parent | c0a932d7b0d0d2ad0c9b6b3feb5828aca30323cc (diff) | |
parent | b538485f32eeeb307c407d5e8f290bde2b1a49a9 (diff) | |
download | xbyak-6.70.tar.gz xbyak-6.70.zip |
Merge branch 'dev'v6.70
-rw-r--r-- | CMakeLists.txt | 2 | ||||
-rw-r--r-- | doc/changelog.md | 1 | ||||
-rw-r--r-- | gen/gen_code.cpp | 5 | ||||
-rw-r--r-- | meson.build | 2 | ||||
-rw-r--r-- | readme.md | 2 | ||||
-rw-r--r-- | readme.txt | 3 | ||||
-rw-r--r-- | test/make_nm.cpp | 30 | ||||
-rw-r--r-- | xbyak/xbyak.h | 2 | ||||
-rw-r--r-- | xbyak/xbyak_mnemonic.h | 10 | ||||
-rw-r--r-- | xbyak/xbyak_util.h | 7 |
10 files changed, 42 insertions, 22 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 15ed204..12323ef 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 2.6...3.0.2) -project(xbyak LANGUAGES CXX VERSION 6.69.2) +project(xbyak LANGUAGES CXX VERSION 6.70) file(GLOB headers xbyak/*.h) diff --git a/doc/changelog.md b/doc/changelog.md index acdccd8..20e6e09 100644 --- a/doc/changelog.md +++ b/doc/changelog.md @@ -1,5 +1,6 @@ # History +* 2023/Jul/05 ver 6.70 add alias of vclmulqdq, correct alias of pclmulqdq * 2023/Jun/27 ver 6.69.2 add constexpr to `TypeT operator|` (thanks to Wunkolo) * 2023/Mar/23 ver 6.69.1 add detection of xsave (thanks to Wunkolo) * 2023/Feb/20 ver 6.69 util::Cpu supports AMD CPUs. support UINTR diff --git a/gen/gen_code.cpp b/gen/gen_code.cpp index a074db3..f638016 100644 --- a/gen/gen_code.cpp +++ b/gen/gen_code.cpp @@ -974,12 +974,13 @@ void put() } tbl[] = { { "pclmullqlqdq", 0 }, { "pclmulhqlqdq", 1 }, - { "pclmullqhdq", 0x10 }, - { "pclmulhqhdq", 0x11 }, + { "pclmullqhqdq", 0x10 }, + { "pclmulhqhqdq", 0x11 }, }; for (size_t i = 0; i < NUM_OF_ARRAY(tbl); i++) { const Tbl *p = &tbl[i]; printf("void %s(const Xmm& xmm, const Operand& op) { pclmulqdq(xmm, op, 0x%02X); }\n", p->name, p->code); + printf("void v%s(const Xmm& x1, const Xmm& x2, const Operand& op) { vpclmulqdq(x1, x2, op, 0x%02X); }\n", p->name, p->code); } } { diff --git a/meson.build b/meson.build index 53afa96..325cdc5 100644 --- a/meson.build +++ b/meson.build @@ -5,7 +5,7 @@ project( 'xbyak', 'cpp', - version: '6.69.2', + version: '6.70', license: 'BSD-3-Clause', default_options: 'b_ndebug=if-release' ) @@ -1,5 +1,5 @@ -# Xbyak 6.69.2 [![Badge Build]][Build Status] +# Xbyak 6.70 [![Badge Build]][Build Status] *A C++ JIT assembler for x86 (IA32), x64 (AMD64, x86-64)* @@ -1,5 +1,5 @@ - C++用x86(IA-32), x64(AMD64, x86-64) JITアセンブラ Xbyak 6.69.2
+ C++用x86(IA-32), x64(AMD64, x86-64) JITアセンブラ Xbyak 6.70
-----------------------------------------------------------------------------
◎概要
@@ -402,6 +402,7 @@ sample/{echo,hello}.bfは http://www.kmonos.net/alang/etc/brainfuck.php から -----------------------------------------------------------------------------
◎履歴
+2023/07/05 ver 6.70 vpclmulqdqのailas追加
2023/06/27 ver 6.69.2 `TypeT operator|`にconstexpr追加(thanks to Wunkolo)
2023/03/23 ver 6.69.1 xsave判定追加(thanks to Wunkolo)
2023/02/20 ver 6.69 util::CpuがAMD対応 UINTR命令対応
diff --git a/test/make_nm.cpp b/test/make_nm.cpp index e5939eb..ec627af 100644 --- a/test/make_nm.cpp +++ b/test/make_nm.cpp @@ -1493,18 +1493,6 @@ class Test { put(p, XMM, XMM|MEM, IMM); } } - { - const char tbl[][16] = { - "pclmullqlqdq", - "pclmulhqlqdq", -// "pclmullqhdq", // QQQ : not supported by nasm/yasm -// "pclmulhqhdq", - }; - for (size_t i = 0; i < NUM_OF_ARRAY(tbl); i++) { - const char *p = tbl[i]; - put(p, XMM, XMM|MEM); - } - } put("extractps", REG32e|MEM, XMM, IMM); put("pextrw", REG32e|MEM, XMM, IMM); // pextrw for REG32 is for MMX2 put("pextrb", REG32e|MEM, XMM, IMM); @@ -1522,6 +1510,23 @@ class Test { #endif } + void putVpclmulqdq() + { + const char tbl[][16] = { + "vpclmullqlqdq", + "vpclmulhqlqdq", + "vpclmullqhqdq", + "vpclmulhqhqdq", + }; + for (size_t i = 0; i < NUM_OF_ARRAY(tbl); i++) { + const char *p = tbl[i] + 1; // remove the top 'v' + put(p, XMM, XMM|MEM); + p = tbl[i]; // use the top 'v' + put(p, XMM, XMM, XMM|MEM); + put(p, YMM, YMM, YMM|MEM); + put(p, ZMM, ZMM, ZMM|MEM); + } + } void putSHA() const { put("sha1rnds4", XMM, XMM|MEM, IMM); @@ -2569,6 +2574,7 @@ public: putPushPop8_16(); #else putSIMPLE(); + putVpclmulqdq(); putReg1(); putBt(); putRorM(); diff --git a/xbyak/xbyak.h b/xbyak/xbyak.h index 7660f3a..80627f1 100644 --- a/xbyak/xbyak.h +++ b/xbyak/xbyak.h @@ -155,7 +155,7 @@ namespace Xbyak { enum { DEFAULT_MAX_CODE_SIZE = 4096, - VERSION = 0x6692 /* 0xABCD = A.BC(.D) */ + VERSION = 0x6700 /* 0xABCD = A.BC(.D) */ }; #ifndef MIE_INTEGER_TYPE_DEFINED diff --git a/xbyak/xbyak_mnemonic.h b/xbyak/xbyak_mnemonic.h index 1a2ec1c..7b38aa1 100644 --- a/xbyak/xbyak_mnemonic.h +++ b/xbyak/xbyak_mnemonic.h @@ -1,4 +1,4 @@ -const char *getVersionString() const { return "6.69.2"; } +const char *getVersionString() const { return "6.70"; } void aadd(const Address& addr, const Reg32e ®) { opModM(addr, reg, 0x0F, 0x38, 0x0FC); } void aand(const Address& addr, const Reg32e ®) { db(0x66); opModM(addr, reg, 0x0F, 0x38, 0x0FC); } void adc(const Operand& op, uint32_t imm) { opRM_I(op, imm, 0x10, 2); } @@ -589,9 +589,9 @@ void pavgb(const Mmx& mmx, const Operand& op) { opMMX(mmx, op, 0xE0); } void pavgw(const Mmx& mmx, const Operand& op) { opMMX(mmx, op, 0xE3); } void pblendvb(const Xmm& xmm, const Operand& op) { opGen(xmm, op, 0x10, 0x66, isXMM_XMMorMEM, NONE, 0x38); } void pblendw(const Xmm& xmm, const Operand& op, int imm) { opGen(xmm, op, 0x0E, 0x66, isXMM_XMMorMEM, static_cast<uint8_t>(imm), 0x3A); } -void pclmulhqhdq(const Xmm& xmm, const Operand& op) { pclmulqdq(xmm, op, 0x11); } +void pclmulhqhqdq(const Xmm& xmm, const Operand& op) { pclmulqdq(xmm, op, 0x11); } void pclmulhqlqdq(const Xmm& xmm, const Operand& op) { pclmulqdq(xmm, op, 0x01); } -void pclmullqhdq(const Xmm& xmm, const Operand& op) { pclmulqdq(xmm, op, 0x10); } +void pclmullqhqdq(const Xmm& xmm, const Operand& op) { pclmulqdq(xmm, op, 0x10); } void pclmullqlqdq(const Xmm& xmm, const Operand& op) { pclmulqdq(xmm, op, 0x00); } void pclmulqdq(const Xmm& xmm, const Operand& op, int imm) { opGen(xmm, op, 0x44, 0x66, isXMM_XMMorMEM, static_cast<uint8_t>(imm), 0x3A); } void pcmpeqb(const Mmx& mmx, const Operand& op) { opMMX(mmx, op, 0x74); } @@ -1192,6 +1192,10 @@ void vpbroadcastb(const Xmm& x, const Operand& op) { if (!(op.isXMM() || op.isME void vpbroadcastd(const Xmm& x, const Operand& op) { if (!(op.isXMM() || op.isMEM())) XBYAK_THROW(ERR_BAD_COMBINATION) opAVX_X_XM_IMM(x, op, T_N4 | T_66 | T_0F38 | T_W0 | T_YMM | T_EVEX, 0x58); } void vpbroadcastq(const Xmm& x, const Operand& op) { if (!(op.isXMM() || op.isMEM())) XBYAK_THROW(ERR_BAD_COMBINATION) opAVX_X_XM_IMM(x, op, T_N8 | T_66 | T_0F38 | T_W0 | T_EW1 | T_YMM | T_EVEX, 0x59); } void vpbroadcastw(const Xmm& x, const Operand& op) { if (!(op.isXMM() || op.isMEM())) XBYAK_THROW(ERR_BAD_COMBINATION) opAVX_X_XM_IMM(x, op, T_N2 | T_66 | T_0F38 | T_W0 | T_YMM | T_EVEX, 0x79); } +void vpclmulhqhqdq(const Xmm& x1, const Xmm& x2, const Operand& op) { vpclmulqdq(x1, x2, op, 0x11); } +void vpclmulhqlqdq(const Xmm& x1, const Xmm& x2, const Operand& op) { vpclmulqdq(x1, x2, op, 0x01); } +void vpclmullqhqdq(const Xmm& x1, const Xmm& x2, const Operand& op) { vpclmulqdq(x1, x2, op, 0x10); } +void vpclmullqlqdq(const Xmm& x1, const Xmm& x2, const Operand& op) { vpclmulqdq(x1, x2, op, 0x00); } void vpclmulqdq(const Xmm& x1, const Xmm& x2, const Operand& op, uint8_t imm) { opAVX_X_X_XM(x1, x2, op, T_66 | T_0F3A | T_W0 | T_YMM | T_EVEX, 0x44, imm); } void vpcmpeqb(const Xmm& x1, const Xmm& x2, const Operand& op) { opAVX_X_X_XM(x1, x2, op, T_66 | T_0F | T_YMM, 0x74); } void vpcmpeqd(const Xmm& x1, const Xmm& x2, const Operand& op) { opAVX_X_X_XM(x1, x2, op, T_66 | T_0F | T_YMM, 0x76); } diff --git a/xbyak/xbyak_util.h b/xbyak/xbyak_util.h index d56b105..12c8b36 100644 --- a/xbyak/xbyak_util.h +++ b/xbyak/xbyak_util.h @@ -9,6 +9,13 @@ #define XBYAK_THROW(x) ; #define XBYAK_THROW_RET(x, y) return y; #endif +#ifndef XBYAK_CONSTEXPR +#if ((__cplusplus >= 201402L) && !(!defined(__clang__) && defined(__GNUC__) && (__GNUC__ <= 5))) || (defined(_MSC_VER) && _MSC_VER >= 1910) + #define XBYAK_CONSTEXPR constexpr +#else + #define XBYAK_CONSTEXPR +#endif +#endif #else #include <string.h> |