From 9e0af6d2b513ed7ee2f6221bbdf85a8e54e00fc1 Mon Sep 17 00:00:00 2001 From: Michael Matz Date: Mon, 8 Aug 2016 20:28:21 +0200 Subject: [PATCH] x86-64-asm: Implement cmpxchg16b --- tests/asmtest.S | 3 +++ x86_64-asm.h | 3 +++ 2 files changed, 6 insertions(+) diff --git a/tests/asmtest.S b/tests/asmtest.S index dbc6c15a..c19db064 100644 --- a/tests/asmtest.S +++ b/tests/asmtest.S @@ -535,6 +535,9 @@ cmpxchgw %ax, 0x1000 cmpxchgl %eax, 0x1000 invlpg 0x1000 cmpxchg8b 0x1002 +#ifdef __x86_64__ +cmpxchg16b (%rax) +#endif fcmovb %st(5), %st fcmove %st(5), %st diff --git a/x86_64-asm.h b/x86_64-asm.h index 4db32687..675e7df8 100644 --- a/x86_64-asm.h +++ b/x86_64-asm.h @@ -394,6 +394,9 @@ ALT(DEF_ASM_OP2(cmpxchgb, 0x0fb0, 0, OPC_MODRM | OPC_BWLX, OPT_REG, OPT_REG | OP /* pentium */ DEF_ASM_OP1(cmpxchg8b, 0x0fc7, 1, OPC_MODRM, OPT_EA ) + /* AMD 64 */ + DEF_ASM_OP1(cmpxchg16b, 0x480fc7, 1, OPC_MODRM, OPT_EA ) + /* pentium pro */ ALT(DEF_ASM_OP2(cmovo, 0x0f40, 0, OPC_MODRM | OPC_TEST | OPC_WLX, OPT_REGW | OPT_EA, OPT_REGW))