Skip to contentSkip to conversation

x86/math-emu, selftests: Add tests for FCMOV and FCOMI insns

PATCH New Denys Vlasenko 2 participants 2 messages Sep 17, 2015 – Sep 20, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86/math-emu, selftests: Add tests for FCMOV and FCOMI insns

CC Ingo Molnar <[email protected]>
CC Borislav Petkov <[email protected]>
CC "H. Peter Anvin" <[email protected]>
CC Andy Lutomirski <[email protected]>
CC Kees Cook <[email protected]>
---
 tools/testing/selftests/x86/Makefile     |   5 +-
 tools/testing/selftests/x86/test_FCMOV.c |  93 +++++++++
 tools/testing/selftests/x86/test_FCOMI.c | 331 +++++++++++++++++++++++++++++++
 3 files changed, 427 insertions(+), 2 deletions(-)
 create mode 100644 tools/testing/selftests/x86/test_FCMOV.c
 create mode 100644 tools/testing/selftests/x86/test_FCOMI.c
tools/testing/selftests/x86/Makefile +3 -2
index fd55bc3..7de4684 100644
@@ -5,7 +5,8 @@ include ../lib.mk
 .PHONY: all all_32 all_64 warn_32bit_failure clean
 
 TARGETS_C_BOTHBITS := single_step_syscall sysret_ss_attrs ldt_gdt syscall_nt
-TARGETS_C_32BIT_ONLY := entry_from_vm86 syscall_arg_fault sigreturn test_syscall_vdso
+TARGETS_C_32BIT_ONLY := entry_from_vm86 syscall_arg_fault sigreturn test_syscall_vdso \
+    test_FCMOV test_FCOMI
 
 TARGETS_C_32BIT_ALL := $(TARGETS_C_BOTHBITS) $(TARGETS_C_32BIT_ONLY)
 BINARIES_32 := $(TARGETS_C_32BIT_ALL:%=%_32)
@@ -35,7 +36,7 @@ clean:
 	$(RM) $(BINARIES_32) $(BINARIES_64)
 
 $(TARGETS_C_32BIT_ALL:%=%_32): %_32: %.c
-	$(CC) -m32 -o $@ $(CFLAGS) $(EXTRA_CFLAGS) $^ -lrt -ldl
+	$(CC) -m32 -o $@ $(CFLAGS) $(EXTRA_CFLAGS) $^ -lrt -ldl -lm
 
 $(TARGETS_C_BOTHBITS:%=%_64): %_64: %.c
 	$(CC) -m64 -o $@ $(CFLAGS) $(EXTRA_CFLAGS) $^ -lrt -ldl
tools/testing/selftests/x86/test_FCMOV.c new file +93 -0

93 lines not on this page · raw message

tools/testing/selftests/x86/test_FCOMI.c new file +331 -0

331 lines not on this page · raw message

Signature · 1 line
1.8.1.4
#1 lore raw

[tip:x86/fpu] x86/fpu/math-emu, selftests: Add tests for FCMOV and FCOMI insns

x86/fpu/math-emu, selftests: Add tests for FCMOV and FCOMI insns
Commit-ID:  57ca6897cd134efd8914cc230f602abad431c7db
Gitweb:     http://git.kernel.org/tip/57ca6897cd134efd8914cc230f602abad431c7db
Author:     Denys Vlasenko <[email protected]>
AuthorDate: Thu, 17 Sep 2015 15:02:13 +0200
Committer:  Ingo Molnar <[email protected]>
CommitDate: Sun, 20 Sep 2015 10:19:52 +0200

x86/fpu/math-emu, selftests: Add tests for FCMOV and FCOMI insns

Cc Andy Lutomirski <[email protected]>
Cc Borislav Petkov <[email protected]>
Cc Brian Gerst <[email protected]>
Cc H. Peter Anvin <[email protected]>
Cc Kees Cook <[email protected]>
Cc Linus Torvalds <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Shuah Khan <[email protected]>
Cc Thomas Gleixner <[email protected]>
---
 tools/testing/selftests/x86/Makefile     |   5 +-
 tools/testing/selftests/x86/test_FCMOV.c |  93 +++++++++
 tools/testing/selftests/x86/test_FCOMI.c | 331 +++++++++++++++++++++++++++++++
 3 files changed, 427 insertions(+), 2 deletions(-)
tools/testing/selftests/x86/Makefile +3 -2
index 29089b2..c4c9b90 100644
@@ -5,7 +5,8 @@ include ../lib.mk
 .PHONY: all all_32 all_64 warn_32bit_failure clean
 
 TARGETS_C_BOTHBITS := single_step_syscall sysret_ss_attrs ldt_gdt syscall_nt
-TARGETS_C_32BIT_ONLY := entry_from_vm86 syscall_arg_fault sigreturn
+TARGETS_C_32BIT_ONLY := entry_from_vm86 syscall_arg_fault sigreturn \
+			test_FCMOV test_FCOMI
 
 TARGETS_C_32BIT_ALL := $(TARGETS_C_BOTHBITS) $(TARGETS_C_32BIT_ONLY)
 BINARIES_32 := $(TARGETS_C_32BIT_ALL:%=%_32)
@@ -35,7 +36,7 @@ clean:
 	$(RM) $(BINARIES_32) $(BINARIES_64)
 
 $(TARGETS_C_32BIT_ALL:%=%_32): %_32: %.c
-	$(CC) -m32 -o $@ $(CFLAGS) $(EXTRA_CFLAGS) $^ -lrt -ldl
+	$(CC) -m32 -o $@ $(CFLAGS) $(EXTRA_CFLAGS) $^ -lrt -ldl -lm
 
 $(TARGETS_C_BOTHBITS:%=%_64): %_64: %.c
 	$(CC) -m64 -o $@ $(CFLAGS) $(EXTRA_CFLAGS) $^ -lrt -ldl
tools/testing/selftests/x86/test_FCMOV.c new file +93 -0

93 lines not on this page · raw message

tools/testing/selftests/x86/test_FCOMI.c new file +331 -0

331 lines not on this page · raw message