From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755267AbbITL30 (ORCPT ); Sun, 20 Sep 2015 07:29:26 -0400 Received: from terminus.zytor.com ([198.137.202.10]:44407 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754984AbbITL3U (ORCPT ); Sun, 20 Sep 2015 07:29:20 -0400 Date: Sun, 20 Sep 2015 04:28:13 -0700 From: tip-bot for Denys Vlasenko Message-ID: Cc: brgerst@gmail.com, linux-kernel@vger.kernel.org, torvalds@linux-foundation.org, dvlasenk@redhat.com, hpa@zytor.com, peterz@infradead.org, bp@alien8.de, keescook@chromium.org, luto@amacapital.net, mingo@kernel.org, tglx@linutronix.de Reply-To: mingo@kernel.org, tglx@linutronix.de, luto@amacapital.net, keescook@chromium.org, bp@alien8.de, peterz@infradead.org, hpa@zytor.com, dvlasenk@redhat.com, brgerst@gmail.com, torvalds@linux-foundation.org, linux-kernel@vger.kernel.org In-Reply-To: <1442588010-20055-1-git-send-email-dvlasenk@redhat.com> References: <1442588010-20055-1-git-send-email-dvlasenk@redhat.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:x86/fpu] x86/fpu/math-emu: Remove define layer for undocumented opcodes Git-Commit-ID: 4aef363e48177d451b4d263c69dd2c86437e988b X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 4aef363e48177d451b4d263c69dd2c86437e988b Gitweb: http://git.kernel.org/tip/4aef363e48177d451b4d263c69dd2c86437e988b Author: Denys Vlasenko AuthorDate: Fri, 18 Sep 2015 16:53:28 +0200 Committer: Ingo Molnar CommitDate: Sun, 20 Sep 2015 10:19:52 +0200 x86/fpu/math-emu: Remove define layer for undocumented opcodes No code changes. Signed-off-by: Denys Vlasenko Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: H. Peter Anvin Cc: Kees Cook Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Link: http://lkml.kernel.org/r/1442588010-20055-1-git-send-email-dvlasenk@redhat.com Signed-off-by: Ingo Molnar --- arch/x86/math-emu/fpu_entry.c | 43 +++++++++++++++++++++---------------------- 1 file changed, 21 insertions(+), 22 deletions(-) diff --git a/arch/x86/math-emu/fpu_entry.c b/arch/x86/math-emu/fpu_entry.c index 929b1d5..65afd46 100644 --- a/arch/x86/math-emu/fpu_entry.c +++ b/arch/x86/math-emu/fpu_entry.c @@ -40,30 +40,29 @@ #define __BAD__ FPU_illegal /* Illegal on an 80486, causes SIGILL */ -/* WARNING: These codes are not documented by Intel in their 80486 manual - and may not work on FPU clones or later Intel FPUs. */ - -/* Changes to support the un-doc codes provided by Linus Torvalds. */ - -#define _d9_d8_ fstp_i /* unofficial code (19) */ -#define _dc_d0_ fcom_st /* unofficial code (14) */ -#define _dc_d8_ fcompst /* unofficial code (1c) */ -#define _dd_c8_ fxch_i /* unofficial code (0d) */ -#define _de_d0_ fcompst /* unofficial code (16) */ -#define _df_c0_ ffreep /* unofficial code (07) ffree + pop */ -#define _df_c8_ fxch_i /* unofficial code (0f) */ -#define _df_d0_ fstp_i /* unofficial code (17) */ -#define _df_d8_ fstp_i /* unofficial code (1f) */ +/* WARNING: "u" entries are not documented by Intel in their 80486 manual + and may not work on FPU clones or later Intel FPUs. + Changes to support them provided by Linus Torvalds. */ static FUNC const st_instr_table[64] = { - fadd__, fld_i_, __BAD__, __BAD__, fadd_i, ffree_, faddp_, _df_c0_, - fmul__, fxch_i, __BAD__, __BAD__, fmul_i, _dd_c8_, fmulp_, _df_c8_, - fcom_st, fp_nop, __BAD__, __BAD__, _dc_d0_, fst_i_, _de_d0_, _df_d0_, - fcompst, _d9_d8_, __BAD__, __BAD__, _dc_d8_, fstp_i, fcompp, _df_d8_, - fsub__, FPU_etc, __BAD__, finit_, fsubri, fucom_, fsubrp, fstsw_, - fsubr_, fconst, fucompp, __BAD__, fsub_i, fucomp, fsubp_, __BAD__, - fdiv__, FPU_triga, __BAD__, __BAD__, fdivri, __BAD__, fdivrp, __BAD__, - fdivr_, FPU_trigb, __BAD__, __BAD__, fdiv_i, __BAD__, fdivp_, __BAD__, +/* Opcode: d8 d9 da db */ +/* dc dd de df */ +/* c0..7 */ fadd__, fld_i_, __BAD__, __BAD__, +/* c0..7 */ fadd_i, ffree_, faddp_, ffreep,/*u*/ +/* c8..f */ fmul__, fxch_i, __BAD__, __BAD__, +/* c8..f */ fmul_i, fxch_i,/*u*/ fmulp_, fxch_i,/*u*/ +/* d0..7 */ fcom_st, fp_nop, __BAD__, __BAD__, +/* d0..7 */ fcom_st,/*u*/ fst_i_, fcompst,/*u*/ fstp_i,/*u*/ +/* d8..f */ fcompst, fstp_i,/*u*/ __BAD__, __BAD__, +/* d8..f */ fcompst,/*u*/ fstp_i, fcompp, fstp_i,/*u*/ +/* e0..7 */ fsub__, FPU_etc, __BAD__, finit_, +/* e0..7 */ fsubri, fucom_, fsubrp, fstsw_, +/* e8..f */ fsubr_, fconst, fucompp, __BAD__, +/* e8..f */ fsub_i, fucomp, fsubp_, __BAD__, +/* f0..7 */ fdiv__, FPU_triga, __BAD__, __BAD__, +/* f0..7 */ fdivri, __BAD__, fdivrp, __BAD__, +/* f8..f */ fdivr_, FPU_trigb, __BAD__, __BAD__, +/* f8..f */ fdiv_i, __BAD__, fdivp_, __BAD__, }; #define _NONE_ 0 /* Take no special action */