aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorMITSUNARI Shigeo <[email protected]>2015-08-18 17:52:02 +0900
committerMITSUNARI Shigeo <[email protected]>2015-08-18 17:52:02 +0900
commit8c9059fbd7832dde605e09f4b19a418a497f44d3 (patch)
tree93ccec62b548a4a02794ef5ad5fe608ee62238aa
parentfd16a35fd955b72c962240892284fc9afbbd10de (diff)
downloadxbyak-8c9059fbd7832dde605e09f4b19a418a497f44d3.tar.gz
xbyak-8c9059fbd7832dde605e09f4b19a418a497f44d3.zip
add test of ripv4.86
-rw-r--r--readme.md3
-rw-r--r--readme.txt3
-rw-r--r--test/rip-label-imm.cpp58
-rw-r--r--xbyak/xbyak.h2
-rw-r--r--xbyak/xbyak_mnemonic.h2
5 files changed, 48 insertions, 20 deletions
diff --git a/readme.md b/readme.md
index a8fa375..1eac7ea 100644
--- a/readme.md
+++ b/readme.md
@@ -1,5 +1,5 @@
-Xbyak 4.85 ; JIT assembler for x86(IA32), x64(AMD64, x86-64) by C++
+Xbyak 4.86 ; JIT assembler for x86(IA32), x64(AMD64, x86-64) by C++
=============
Abstract
@@ -277,6 +277,7 @@ The header files under xbyak/ are independent of cybozulib.
History
-------------
+* 2015/Aug/18 ver 4.86 fix [rip + label] addressing with immediate value(thanks to whyisthisfieldhere)
* 2015/Aug/10 ver 4.85 Address::operator==() is not correct(thanks to inolen)
* 2015/Jun/22 ver 4.84 call() support variadic template if available(thanks to randomstuff)
* 2015/Jun/16 ver 4.83 support movbe(thanks to benvanik)
diff --git a/readme.txt b/readme.txt
index 5c698c9..22c9d1c 100644
--- a/readme.txt
+++ b/readme.txt
@@ -1,5 +1,5 @@
- C++用x86(IA-32), x64(AMD64, x86-64) JITアセンブラ Xbyak 4.85
+ C++用x86(IA-32), x64(AMD64, x86-64) JITアセンブラ Xbyak 4.86
-----------------------------------------------------------------------------
◎概要
@@ -296,6 +296,7 @@ cybozulibは単体テストでのみ利用されていて、xbyak/ディレク�
-----------------------------------------------------------------------------
◎履歴
+2015/08/16 ver 4.86 [rip + label]アドレッシングで即値を使うと壊れる(thanks to whyisthisfieldhere)
2015/08/10 ver 4.85 Address::operator==()が間違っている(thanks to inolen)
2015/07/22 ver 4.84 call()がvariadic template対応
2015/05/24 ver 4.83 mobveサポート(thanks to benvanik)
diff --git a/test/rip-label-imm.cpp b/test/rip-label-imm.cpp
index a4016fd..4ed208e 100644
--- a/test/rip-label-imm.cpp
+++ b/test/rip-label-imm.cpp
@@ -3,22 +3,35 @@
/*
dump of vc
-0000000000450000 F3 0F C2 05 77 00 00 00 00 cmpeqss xmm0,dword ptr [450080h]
-0000000000450009 F7 05 6D 00 00 00 21 00 00 00 test dword ptr [450080h],21h
-0000000000450013 0F BA 25 65 00 00 00 03 bt dword ptr [450080h],3
-000000000045001B C4 E3 79 0D 05 5B 00 00 00 03 vblendpd xmm0,xmm0,xmmword ptr [450080h],3
-0000000000450025 C4 E3 79 0F 05 51 00 00 00 04 vpalignr xmm0,xmm0,xmmword ptr [450080h],4
-000000000045002F C4 E3 7D 19 1D 47 00 00 00 0C vextractf128 xmmword ptr [450080h],ymm3,0Ch
-0000000000450039 C4 E3 75 46 05 3D 00 00 00 0D vperm2i128 ymm0,ymm1,ymmword ptr [450080h],0Dh
-0000000000450043 C4 E3 79 1D 15 33 00 00 00 2C vcvtps2ph mmword ptr [450080h],xmm2,2Ch
-000000000045004D C7 05 29 00 00 00 34 12 00 00 mov dword ptr [450080h],1234h
-0000000000450057 C1 25 22 00 00 00 03 shl dword ptr [450080h],3
-000000000045005E D1 2D 1C 00 00 00 shr dword ptr [450080h],1
-0000000000450064 48 0F A4 05 13 00 00 00 03 shld qword ptr [450080h],rax,3
-000000000045006D 48 6B 05 0B 00 00 00 15 imul rax,qword ptr [450080h],15h
-0000000000450075 C4 E3 FB F0 05 01 00 00 00 15 rorx rax,qword ptr [450080h],15h
-000000000045007F C3 ret
-0000000000450080 F0 DE BC 9A 78 56 34 12
+00000000003A0000 F3 0F C2 05 F1 00 00 00 00 cmpeqss xmm0,dword ptr [3A00FAh]
+00000000003A0009 F7 05 E7 00 00 00 21 00 00 00 test dword ptr [3A00FAh],21h
+00000000003A0013 0F BA 25 DF 00 00 00 03 bt dword ptr [3A00FAh],3
+00000000003A001B C4 E3 79 0D 05 D5 00 00 00 03 vblendpd xmm0,xmm0,xmmword ptr [3A00FAh],3
+00000000003A0025 C4 E3 79 0F 05 CB 00 00 00 04 vpalignr xmm0,xmm0,xmmword ptr [3A00FAh],4
+00000000003A002F C4 E3 7D 19 1D C1 00 00 00 0C vextractf128 xmmword ptr [3A00FAh],ymm3,0Ch
+00000000003A0039 C4 E3 75 46 05 B7 00 00 00 0D vperm2i128 ymm0,ymm1,ymmword ptr [3A00FAh],0Dh
+00000000003A0043 C4 E3 79 1D 15 AD 00 00 00 2C vcvtps2ph mmword ptr [3A00FAh],xmm2,2Ch
+00000000003A004D C7 05 A3 00 00 00 34 12 00 00 mov dword ptr [3A00FAh],1234h
+00000000003A0057 C1 25 9C 00 00 00 03 shl dword ptr [3A00FAh],3
+00000000003A005E D1 2D 96 00 00 00 shr dword ptr [3A00FAh],1
+00000000003A0064 48 0F A4 05 8D 00 00 00 03 shld qword ptr [3A00FAh],rax,3
+00000000003A006D 48 6B 05 85 00 00 00 15 imul rax,qword ptr [3A00FAh],15h
+00000000003A0075 C4 E3 FB F0 05 7B 00 00 00 15 rorx rax,qword ptr [3A00FAh],15h
+00000000003A007F F7 05 71 00 00 00 05 00 00 00 test dword ptr [3A00FAh],5
+00000000003A0089 66 48 0F 3A 16 05 66 00 00 00 03 pextrq qword ptr [3A00FAh],xmm0,3
+00000000003A0094 66 48 0F 3A 22 15 5B 00 00 00 05 pinsrq xmm2,qword ptr [3A00FAh],5
+00000000003A009F 66 0F 3A 15 0D 51 00 00 00 04 pextrw word ptr [3A00FAh],xmm1,4
+00000000003A00A9 81 15 47 00 00 00 45 23 01 00 adc dword ptr [3A00FAh],12345h
+00000000003A00B3 0F BA 25 3F 00 00 00 34 bt dword ptr [3A00FAh],34h
+00000000003A00BB 66 0F BA 3D 36 00 00 00 34 btc word ptr [3A00FAh],34h
+00000000003A00C4 0F BA 35 2E 00 00 00 34 btr dword ptr [3A00FAh],34h
+00000000003A00CC C1 15 27 00 00 00 04 rcl dword ptr [3A00FAh],4
+00000000003A00D3 48 0F A4 05 1E 00 00 00 04 shld qword ptr [3A00FAh],rax,4
+00000000003A00DC 0F 3A 0F 05 15 00 00 00 04 palignr mm0,mmword ptr [3A00FAh],4
+00000000003A00E5 66 0F 3A DF 1D 0B 00 00 00 04 aeskeygenassist xmm3,xmmword ptr [3A00FAh],4
+00000000003A00EF C4 E3 79 60 15 01 00 00 00 07 vpcmpestrm xmm2,xmmword ptr [3A00FAh],7
+00000000003A00F9 C3 ret
+00000000003A00FA F0 DE BC 9A 78 56 34 12
*/
struct Code : Xbyak::CodeGenerator {
Code()
@@ -38,6 +51,19 @@ struct Code : Xbyak::CodeGenerator {
shld(qword[rip + label], rax, 3);
imul(rax, qword[rip + label], 21);
rorx(rax, qword[rip + label], 21);
+ test(dword[rip + label], 5);
+ pextrq(ptr[rip + label], xmm0, 3);
+ pinsrq(xmm2, ptr[rip + label], 5);
+ pextrw(ptr[rip + label], xmm1, 4);
+ adc(dword[rip + label], 0x12345);
+ bt(byte[rip + label], 0x34);
+ btc(word[rip + label], 0x34);
+ btr(dword[rip + label], 0x34);
+ rcl(dword[rip + label], 4);
+ shld(qword[rip + label], rax, 4);
+ palignr(mm0, ptr[rip + label], 4);
+ aeskeygenassist(xmm3, ptr[rip + label], 4);
+ vpcmpestrm(xmm2, ptr[rip + label], 7);
ret();
L(label);
dq(0x123456789abcdef0ull);
diff --git a/xbyak/xbyak.h b/xbyak/xbyak.h
index 5ef3419..ae9c16c 100644
--- a/xbyak/xbyak.h
+++ b/xbyak/xbyak.h
@@ -100,7 +100,7 @@ namespace Xbyak {
enum {
DEFAULT_MAX_CODE_SIZE = 4096,
- VERSION = 0x4851 /* 0xABCD = A.BC(D) */
+ VERSION = 0x4860 /* 0xABCD = A.BC(D) */
};
#ifndef MIE_INTEGER_TYPE_DEFINED
diff --git a/xbyak/xbyak_mnemonic.h b/xbyak/xbyak_mnemonic.h
index c07ce78..8bd6eb6 100644
--- a/xbyak/xbyak_mnemonic.h
+++ b/xbyak/xbyak_mnemonic.h
@@ -1,4 +1,4 @@
-const char *getVersionString() const { return "4.851"; }
+const char *getVersionString() const { return "4.86"; }
void packssdw(const Mmx& mmx, const Operand& op) { opMMX(mmx, op, 0x6B); }
void packsswb(const Mmx& mmx, const Operand& op) { opMMX(mmx, op, 0x63); }
void packuswb(const Mmx& mmx, const Operand& op) { opMMX(mmx, op, 0x67); }