aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorMITSUNARI Shigeo <[email protected]>2010-04-26 15:53:54 +0900
committerMITSUNARI Shigeo <[email protected]>2010-04-26 15:53:54 +0900
commit412ddc63e0496b2343fc610d553db09a4b6de0c3 (patch)
tree97320b036325ba6bbbcb2732739d659a3860ec87
parent6c6c44207b517463e18703001c4a6c568d15d76f (diff)
downloadxbyak-412ddc63e0496b2343fc610d553db09a4b6de0c3.tar.gz
xbyak-412ddc63e0496b2343fc610d553db09a4b6de0c3.zip
add jc/jnc
-rw-r--r--COPYRIGHT94
-rw-r--r--gen/gen_code.cpp2
-rw-r--r--readme.txt4
-rw-r--r--readme_e.txt8
-rw-r--r--test/make_nm.cpp2
-rw-r--r--xbyak/xbyak.h6
-rw-r--r--xbyak/xbyak_mnemonic.h8
7 files changed, 69 insertions, 55 deletions
diff --git a/COPYRIGHT b/COPYRIGHT
index bf32901..ed08fcd 100644
--- a/COPYRIGHT
+++ b/COPYRIGHT
@@ -1,47 +1,47 @@
-
-Copyright (c) 2007-2009 MITSUNARI Shigeo
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
-Redistributions of source code must retain the above copyright notice, this
-list of conditions and the following disclaimer.
-Redistributions in binary form must reproduce the above copyright notice,
-this list of conditions and the following disclaimer in the documentation
-and/or other materials provided with the distribution.
-Neither the name of the copyright owner nor the names of its contributors may
-be used to endorse or promote products derived from this software without
-specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
-LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
-THE POSSIBILITY OF SUCH DAMAGE.
------------------------------------------------------------------------------
-�����������ɷ������Х��ʥ���������ѹ����뤫���ʤ�������鷺���ʲ��ξ�������
-�����˸¤ꡢ�����ۤ���ӻ��Ѥ����Ĥ���ޤ���
-
-�����������ɤ�����ۤ����硢�嵭�����ɽ�����ܾ�����������Ӳ������վ��
-��ޤ�뤳�ȡ�
-�Х��ʥ�����Ǻ����ۤ����硢����ʪ����°�Υɥ���������λ����ˡ��嵭������
-��ɽ�����ܾ�����������Ӳ������վ���ޤ�뤳�ȡ�
-���̤ˤ�����̤ε��Ĥʤ��ˡ��ܥ��եȥ��������������������ʤ������ޤ�������¥��
-�ˡ�����Ԥ�̾���ޤ��ϥ���ȥ�ӥ塼������̾������Ѥ��ƤϤʤ�ʤ���
-�ܥ��եȥ������ϡ�����Ԥ���ӥ���ȥ�ӥ塼�����ˤ�äơָ����Τޤޡ��󶡤�
-��Ƥ��ꡢ�����ۼ�����鷺������Ū�ʻ��Ѳ�ǽ����������������Ū���Ф���Ŭ����
-�˴ؤ�����ۤ��ݾڤ�ޤᡢ�ޤ�����˸��ꤵ��ʤ��������ʤ��ݾڤ⤢��ޤ���
-����Ԥ⥳��ȥ�ӥ塼�����⡢��ͳ�Τ��������鷺�� »��ȯ���θ����������
-��鷺��������Ǥ�κ��򤬷���Ǥ��뤫������Ǥ�Ǥ��뤫�ʲἺ����¾�Ρ���ˡ�԰٤�
-���뤫����鷺�����ˤ��Τ褦��»����ȯ�������ǽ�����Τ餵��Ƥ����Ȥ��Ƥ⡢
-�ܥ��եȥ������λ��Ѥˤ�ä�ȯ�������������ʤޤ������ѥ����ӥ���Ĵã�����Ѥ�
-�Ӽ����ǡ������Ӽ������פ��Ӽ�����̳�����Ǥ�ޤᡢ�ޤ�����˸��ꤵ��ʤ���ľ��
-»��������»������ȯŪ��»��������»����ĨȳŪ»�����ޤ��Ϸ��»���ˤĤ��ơ�
-������Ǥ�����ʤ���ΤȤ��ޤ���
+
+Copyright (c) 2007-2010 MITSUNARI Shigeo
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+Redistributions of source code must retain the above copyright notice, this
+list of conditions and the following disclaimer.
+Redistributions in binary form must reproduce the above copyright notice,
+this list of conditions and the following disclaimer in the documentation
+and/or other materials provided with the distribution.
+Neither the name of the copyright owner nor the names of its contributors may
+be used to endorse or promote products derived from this software without
+specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+THE POSSIBILITY OF SUCH DAMAGE.
+-----------------------------------------------------------------------------
+ソースコード形式かバイナリ形式か、変更するかしないかを問わず、以下の条件を満た
+す場合に限り、再頒布および使用が許可されます。
+
+ソースコードを再頒布する場合、上記の著作権表示、本条件一覧、および下記免責条項
+を含めること。
+バイナリ形式で再頒布する場合、頒布物に付属のドキュメント等の資料に、上記の著作
+権表示、本条件一覧、および下記免責条項を含めること。
+書面による特別の許可なしに、本ソフトウェアから派生した製品の宣伝または販売促進
+に、著作権者の名前またはコントリビューターの名前を使用してはならない。
+本ソフトウェアは、著作権者およびコントリビューターによって「現状のまま」提供さ
+れており、明示黙示を問わず、商業的な使用可能性、および特定の目的に対する適合性
+に関する暗黙の保証も含め、またそれに限定されない、いかなる保証もありません。
+著作権者もコントリビューターも、事由のいかんを問わず、 損害発生の原因いかんを
+問わず、かつ責任の根拠が契約であるか厳格責任であるか(過失その他の)不法行為で
+あるかを問わず、仮にそのような損害が発生する可能性を知らされていたとしても、
+本ソフトウェアの使用によって発生した(代替品または代用サービスの調達、使用の
+喪失、データの喪失、利益の喪失、業務の中断も含め、またそれに限定されない)直接
+損害、間接損害、偶発的な損害、特別損害、懲罰的損害、または結果損害について、
+一切責任を負わないものとします。
diff --git a/gen/gen_code.cpp b/gen/gen_code.cpp
index f3af429..57512bf 100644
--- a/gen/gen_code.cpp
+++ b/gen/gen_code.cpp
@@ -361,9 +361,11 @@ void put()
{ 0, "o" },
{ 1, "no" },
{ 2, "b" },
+ { 2, "c" },
{ 2, "nae" },
{ 3, "nb" },
{ 3, "ae" },
+ { 3, "nc" },
{ 4, "e" },
{ 4, "z" },
{ 5, "ne" },
diff --git a/readme.txt b/readme.txt
index 7885d5f..10da356 100644
--- a/readme.txt
+++ b/readme.txt
@@ -1,5 +1,5 @@
- C++用x86(IA-32), x64(AMD64, x86-64) JITアセンブラ Xbyak version 2.24
+ C++用x86(IA-32), x64(AMD64, x86-64) JITアセンブラ Xbyak version 2.25
-----------------------------------------------------------------------------
◎概要
@@ -51,6 +51,7 @@ ret --> ret();
・アドレッシング
(ptr|dword|word|byte) [base + index * (1|2|4|8) + displacement]
+ [rip + 32bit disp] ; x64 only
という形で指定します.サイズを指定する必要がない限りptrを使えばよいです.
セレクタはサポートしていません.
@@ -198,6 +199,7 @@ sample/{echo,hello}.bfは http://www.kmonos.net/alang/etc/brainfuck.php から
-----------------------------------------------------------------------------
◎履歴
+2010/04/26 ver 2.25 add jc/jnc(I forgot to implement them...)
2010/04/16 ver 2.24 change the prototype of rewrite() method
2010/04/15 ver 2.23 fix align() and xbyak_util.h for Mac
2010/02/16 ver 2.22 fix inLocalLabel()/outLocalLabel()
diff --git a/readme_e.txt b/readme_e.txt
index 3f4d5cc..63be433 100644
--- a/readme_e.txt
+++ b/readme_e.txt
@@ -1,5 +1,5 @@
- Xbyak 2.24 ; JIT assembler for x86(IA32), x64(AMD64, x86-64) by C++
+ Xbyak 2.25 ; JIT assembler for x86(IA32), x64(AMD64, x86-64) by C++
-----------------------------------------------------------------------------
<Abstract>
@@ -48,6 +48,7 @@ ret --> ret();
Addressing
(ptr|dword|word|byte) [base + index * (1|2|4|8) + displacement]
+ [rip + 32bit disp] ; x64 only
NASM Xbyak
mov eax, [ebx+ecx] --> mov (eax, ptr[ebx+ecx]);
@@ -147,6 +148,7 @@ http://www.opensource.org/licenses/bsd-license.php
-----------------------------------------------------------------------------
<History>
+2010/Apr/26 ver 2.25 add jc/jnc(I forgot to implement them...)
2010/Apr/16 ver 2.24 change the prototype of rewrite() method
2010/Apr/15 ver 2.23 fix align() and xbyak_util.h for Mac
2010/Feb/16 ver 2.22 fix inLocalLabel()/outLocalLabel()
@@ -181,5 +183,5 @@ http://www.opensource.org/licenses/bsd-license.php
MITSUNARI Shigeo(herumi at nifty dot com)
---
-$Revision: 1.43 $
-$Date: 2010/04/16 03:48:59 $
+$Revision: 1.45 $
+$Date: 2010/04/26 06:40:29 $
diff --git a/test/make_nm.cpp b/test/make_nm.cpp
index 51a4add..0d0cc0b 100644
--- a/test/make_nm.cpp
+++ b/test/make_nm.cpp
@@ -682,8 +682,10 @@ class Test {
"o",
"no",
"b",
+ "c",
"nae",
"nb",
+ "nc",
"ae",
"e",
"z",
diff --git a/xbyak/xbyak.h b/xbyak/xbyak.h
index 1e4b459..abef889 100644
--- a/xbyak/xbyak.h
+++ b/xbyak/xbyak.h
@@ -4,9 +4,9 @@
@file xbyak.h
@brief Xbyak ; JIT assembler for x86(IA32)/x64 by C++
@author herumi
- @version $Revision: 1.185 $
+ @version $Revision: 1.186 $
@url http://homepage1.nifty.com/herumi/soft/xbyak.html
- @date $Date: 2010/04/16 06:00:21 $
+ @date $Date: 2010/04/26 06:40:29 $
@note modified new BSD license
http://www.opensource.org/licenses/bsd-license.php
*/
@@ -55,7 +55,7 @@ namespace Xbyak {
enum {
DEFAULT_MAX_CODE_SIZE = 2048,
- VERSION = 0x2240, /* 0xABCD = A.BC(D) */
+ VERSION = 0x2250, /* 0xABCD = A.BC(D) */
};
#ifndef MIE_INTEGER_TYPE_DEFINED
diff --git a/xbyak/xbyak_mnemonic.h b/xbyak/xbyak_mnemonic.h
index abe3b4b..6fb7779 100644
--- a/xbyak/xbyak_mnemonic.h
+++ b/xbyak/xbyak_mnemonic.h
@@ -1,4 +1,4 @@
-const char *getVersionString() const { return "2.24"; }
+const char *getVersionString() const { return "2.25"; }
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); }
@@ -191,6 +191,9 @@ void setno(const Operand& op) { opR_ModM(op, 8, 3, 0, 0x0F, B10010000 | 1); }
void cmovb(const Reg32e& reg, const Operand& op) { opModRM(reg, op, op.isREG(i32e), op.isMEM(), 0x0F, B01000000 | 2); }
void jb(const char *label, LabelType type = T_AUTO) { opJmp(label, type, 0x72, 0x82, 0x0F); }
void setb(const Operand& op) { opR_ModM(op, 8, 3, 0, 0x0F, B10010000 | 2); }
+void cmovc(const Reg32e& reg, const Operand& op) { opModRM(reg, op, op.isREG(i32e), op.isMEM(), 0x0F, B01000000 | 2); }
+void jc(const char *label, LabelType type = T_AUTO) { opJmp(label, type, 0x72, 0x82, 0x0F); }
+void setc(const Operand& op) { opR_ModM(op, 8, 3, 0, 0x0F, B10010000 | 2); }
void cmovnae(const Reg32e& reg, const Operand& op) { opModRM(reg, op, op.isREG(i32e), op.isMEM(), 0x0F, B01000000 | 2); }
void jnae(const char *label, LabelType type = T_AUTO) { opJmp(label, type, 0x72, 0x82, 0x0F); }
void setnae(const Operand& op) { opR_ModM(op, 8, 3, 0, 0x0F, B10010000 | 2); }
@@ -200,6 +203,9 @@ void setnb(const Operand& op) { opR_ModM(op, 8, 3, 0, 0x0F, B10010000 | 3); }
void cmovae(const Reg32e& reg, const Operand& op) { opModRM(reg, op, op.isREG(i32e), op.isMEM(), 0x0F, B01000000 | 3); }
void jae(const char *label, LabelType type = T_AUTO) { opJmp(label, type, 0x73, 0x83, 0x0F); }
void setae(const Operand& op) { opR_ModM(op, 8, 3, 0, 0x0F, B10010000 | 3); }
+void cmovnc(const Reg32e& reg, const Operand& op) { opModRM(reg, op, op.isREG(i32e), op.isMEM(), 0x0F, B01000000 | 3); }
+void jnc(const char *label, LabelType type = T_AUTO) { opJmp(label, type, 0x73, 0x83, 0x0F); }
+void setnc(const Operand& op) { opR_ModM(op, 8, 3, 0, 0x0F, B10010000 | 3); }
void cmove(const Reg32e& reg, const Operand& op) { opModRM(reg, op, op.isREG(i32e), op.isMEM(), 0x0F, B01000000 | 4); }
void je(const char *label, LabelType type = T_AUTO) { opJmp(label, type, 0x74, 0x84, 0x0F); }
void sete(const Operand& op) { opR_ModM(op, 8, 3, 0, 0x0F, B10010000 | 4); }