mirror of
https://github.com/FEX-Emu/xbyak.git
synced 2025-02-23 14:50:45 +00:00
add jc/jnc
This commit is contained in:
parent
6c6c44207b
commit
412ddc63e0
94
COPYRIGHT
94
COPYRIGHT
@ -1,47 +1,47 @@
|
|||||||
|
|
||||||
Copyright (c) 2007-2009 MITSUNARI Shigeo
|
Copyright (c) 2007-2010 MITSUNARI Shigeo
|
||||||
All rights reserved.
|
All rights reserved.
|
||||||
|
|
||||||
Redistribution and use in source and binary forms, with or without
|
Redistribution and use in source and binary forms, with or without
|
||||||
modification, are permitted provided that the following conditions are met:
|
modification, are permitted provided that the following conditions are met:
|
||||||
|
|
||||||
Redistributions of source code must retain the above copyright notice, this
|
Redistributions of source code must retain the above copyright notice, this
|
||||||
list of conditions and the following disclaimer.
|
list of conditions and the following disclaimer.
|
||||||
Redistributions in binary form must reproduce the above copyright notice,
|
Redistributions in binary form must reproduce the above copyright notice,
|
||||||
this list of conditions and the following disclaimer in the documentation
|
this list of conditions and the following disclaimer in the documentation
|
||||||
and/or other materials provided with the distribution.
|
and/or other materials provided with the distribution.
|
||||||
Neither the name of the copyright owner nor the names of its contributors may
|
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
|
be used to endorse or promote products derived from this software without
|
||||||
specific prior written permission.
|
specific prior written permission.
|
||||||
|
|
||||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||||
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||||
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||||
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||||
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
||||||
THE POSSIBILITY OF SUCH DAMAGE.
|
THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
-----------------------------------------------------------------------------
|
-----------------------------------------------------------------------------
|
||||||
ソースコード形式かバイナリ形式か、変更するかしないかを問わず、以下の条件を満た
|
ソースコード形式かバイナリ形式か、変更するかしないかを問わず、以下の条件を満た
|
||||||
す場合に限り、再頒布および使用が許可されます。
|
す場合に限り、再頒布および使用が許可されます。
|
||||||
|
|
||||||
ソースコードを再頒布する場合、上記の著作権表示、本条件一覧、および下記免責条項
|
ソースコードを再頒布する場合、上記の著作権表示、本条件一覧、および下記免責条項
|
||||||
を含めること。
|
を含めること。
|
||||||
バイナリ形式で再頒布する場合、頒布物に付属のドキュメント等の資料に、上記の著作
|
バイナリ形式で再頒布する場合、頒布物に付属のドキュメント等の資料に、上記の著作
|
||||||
権表示、本条件一覧、および下記免責条項を含めること。
|
権表示、本条件一覧、および下記免責条項を含めること。
|
||||||
書面による特別の許可なしに、本ソフトウェアから派生した製品の宣伝または販売促進
|
書面による特別の許可なしに、本ソフトウェアから派生した製品の宣伝または販売促進
|
||||||
に、著作権者の名前またはコントリビューターの名前を使用してはならない。
|
に、著作権者の名前またはコントリビューターの名前を使用してはならない。
|
||||||
本ソフトウェアは、著作権者およびコントリビューターによって「現状のまま」提供さ
|
本ソフトウェアは、著作権者およびコントリビューターによって「現状のまま」提供さ
|
||||||
れており、明示黙示を問わず、商業的な使用可能性、および特定の目的に対する適合性
|
れており、明示黙示を問わず、商業的な使用可能性、および特定の目的に対する適合性
|
||||||
に関する暗黙の保証も含め、またそれに限定されない、いかなる保証もありません。
|
に関する暗黙の保証も含め、またそれに限定されない、いかなる保証もありません。
|
||||||
著作権者もコントリビューターも、事由のいかんを問わず、 損害発生の原因いかんを
|
著作権者もコントリビューターも、事由のいかんを問わず、 損害発生の原因いかんを
|
||||||
問わず、かつ責任の根拠が契約であるか厳格責任であるか(過失その他の)不法行為で
|
問わず、かつ責任の根拠が契約であるか厳格責任であるか(過失その他の)不法行為で
|
||||||
あるかを問わず、仮にそのような損害が発生する可能性を知らされていたとしても、
|
あるかを問わず、仮にそのような損害が発生する可能性を知らされていたとしても、
|
||||||
本ソフトウェアの使用によって発生した(代替品または代用サービスの調達、使用の
|
本ソフトウェアの使用によって発生した(代替品または代用サービスの調達、使用の
|
||||||
喪失、データの喪失、利益の喪失、業務の中断も含め、またそれに限定されない)直接
|
喪失、データの喪失、利益の喪失、業務の中断も含め、またそれに限定されない)直接
|
||||||
損害、間接損害、偶発的な損害、特別損害、懲罰的損害、または結果損害について、
|
損害、間接損害、偶発的な損害、特別損害、懲罰的損害、または結果損害について、
|
||||||
一切責任を負わないものとします。
|
一切責任を負わないものとします。
|
||||||
|
@ -361,9 +361,11 @@ void put()
|
|||||||
{ 0, "o" },
|
{ 0, "o" },
|
||||||
{ 1, "no" },
|
{ 1, "no" },
|
||||||
{ 2, "b" },
|
{ 2, "b" },
|
||||||
|
{ 2, "c" },
|
||||||
{ 2, "nae" },
|
{ 2, "nae" },
|
||||||
{ 3, "nb" },
|
{ 3, "nb" },
|
||||||
{ 3, "ae" },
|
{ 3, "ae" },
|
||||||
|
{ 3, "nc" },
|
||||||
{ 4, "e" },
|
{ 4, "e" },
|
||||||
{ 4, "z" },
|
{ 4, "z" },
|
||||||
{ 5, "ne" },
|
{ 5, "ne" },
|
||||||
|
@ -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]
|
(ptr|dword|word|byte) [base + index * (1|2|4|8) + displacement]
|
||||||
|
[rip + 32bit disp] ; x64 only
|
||||||
という形で指定します.サイズを指定する必要がない限りptrを使えばよいです.
|
という形で指定します.サイズを指定する必要がない限り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/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/04/15 ver 2.23 fix align() and xbyak_util.h for Mac
|
||||||
2010/02/16 ver 2.22 fix inLocalLabel()/outLocalLabel()
|
2010/02/16 ver 2.22 fix inLocalLabel()/outLocalLabel()
|
||||||
|
@ -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>
|
<Abstract>
|
||||||
@ -48,6 +48,7 @@ ret --> ret();
|
|||||||
Addressing
|
Addressing
|
||||||
|
|
||||||
(ptr|dword|word|byte) [base + index * (1|2|4|8) + displacement]
|
(ptr|dword|word|byte) [base + index * (1|2|4|8) + displacement]
|
||||||
|
[rip + 32bit disp] ; x64 only
|
||||||
|
|
||||||
NASM Xbyak
|
NASM Xbyak
|
||||||
mov eax, [ebx+ecx] --> mov (eax, ptr[ebx+ecx]);
|
mov eax, [ebx+ecx] --> mov (eax, ptr[ebx+ecx]);
|
||||||
@ -147,6 +148,7 @@ http://www.opensource.org/licenses/bsd-license.php
|
|||||||
-----------------------------------------------------------------------------
|
-----------------------------------------------------------------------------
|
||||||
<History>
|
<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/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/Apr/15 ver 2.23 fix align() and xbyak_util.h for Mac
|
||||||
2010/Feb/16 ver 2.22 fix inLocalLabel()/outLocalLabel()
|
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)
|
MITSUNARI Shigeo(herumi at nifty dot com)
|
||||||
|
|
||||||
---
|
---
|
||||||
$Revision: 1.43 $
|
$Revision: 1.45 $
|
||||||
$Date: 2010/04/16 03:48:59 $
|
$Date: 2010/04/26 06:40:29 $
|
||||||
|
@ -682,8 +682,10 @@ class Test {
|
|||||||
"o",
|
"o",
|
||||||
"no",
|
"no",
|
||||||
"b",
|
"b",
|
||||||
|
"c",
|
||||||
"nae",
|
"nae",
|
||||||
"nb",
|
"nb",
|
||||||
|
"nc",
|
||||||
"ae",
|
"ae",
|
||||||
"e",
|
"e",
|
||||||
"z",
|
"z",
|
||||||
|
@ -4,9 +4,9 @@
|
|||||||
@file xbyak.h
|
@file xbyak.h
|
||||||
@brief Xbyak ; JIT assembler for x86(IA32)/x64 by C++
|
@brief Xbyak ; JIT assembler for x86(IA32)/x64 by C++
|
||||||
@author herumi
|
@author herumi
|
||||||
@version $Revision: 1.185 $
|
@version $Revision: 1.186 $
|
||||||
@url http://homepage1.nifty.com/herumi/soft/xbyak.html
|
@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
|
@note modified new BSD license
|
||||||
http://www.opensource.org/licenses/bsd-license.php
|
http://www.opensource.org/licenses/bsd-license.php
|
||||||
*/
|
*/
|
||||||
@ -55,7 +55,7 @@ namespace Xbyak {
|
|||||||
|
|
||||||
enum {
|
enum {
|
||||||
DEFAULT_MAX_CODE_SIZE = 2048,
|
DEFAULT_MAX_CODE_SIZE = 2048,
|
||||||
VERSION = 0x2240, /* 0xABCD = A.BC(D) */
|
VERSION = 0x2250, /* 0xABCD = A.BC(D) */
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifndef MIE_INTEGER_TYPE_DEFINED
|
#ifndef MIE_INTEGER_TYPE_DEFINED
|
||||||
|
@ -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 packssdw(const Mmx& mmx, const Operand& op) { opMMX(mmx, op, 0x6B); }
|
||||||
void packsswb(const Mmx& mmx, const Operand& op) { opMMX(mmx, op, 0x63); }
|
void packsswb(const Mmx& mmx, const Operand& op) { opMMX(mmx, op, 0x63); }
|
||||||
void packuswb(const Mmx& mmx, const Operand& op) { opMMX(mmx, op, 0x67); }
|
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 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 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 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 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 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); }
|
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 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 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 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 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 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); }
|
void sete(const Operand& op) { opR_ModM(op, 8, 3, 0, 0x0F, B10010000 | 4); }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user