From a4daa34db77dd7410bd710be99cc22dd9dc5a5ce Mon Sep 17 00:00:00 2001 From: Xianyi Zhang Date: Wed, 30 May 2012 20:25:01 +0800 Subject: [PATCH] Refs #75. Use ffreep opcode directly. Please check out http://www.sandpile.org/x86/opc_fpu.htm . --- common_x86.h | 5 +++++ common_x86_64.h | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/common_x86.h b/common_x86.h index 8f1a0308d..4c17f3a04 100644 --- a/common_x86.h +++ b/common_x86.h @@ -356,4 +356,9 @@ REALNAME: #ifndef ALIGN_6 #define ALIGN_6 .align 64 + +// ffreep %st(0). +// Because Clang didn't support ffreep, we directly use the opcode. +// Please check out http://www.sandpile.org/x86/opc_fpu.htm +#define ffreep .byte 0xdf, 0xc0 # #endif diff --git a/common_x86_64.h b/common_x86_64.h index 2dc788c93..e61e37e6b 100644 --- a/common_x86_64.h +++ b/common_x86_64.h @@ -448,4 +448,8 @@ REALNAME: #define ALIGN_6 .align 64 #endif +// ffreep %st(0). +// Because Clang didn't support ffreep, we directly use the opcode. +// Please check out http://www.sandpile.org/x86/opc_fpu.htm +#define ffreep .byte 0xdf, 0xc0 # #endif