Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/tests/lib/libc/sys Instead of turning optimization off, use ...



details:   https://anonhg.NetBSD.org/src/rev/4cbcb52ed80c
branches:  trunk
changeset: 744832:4cbcb52ed80c
user:      christos <christos%NetBSD.org@localhost>
date:      Fri Feb 14 04:20:59 2020 +0000

description:
Instead of turning optimization off, use unique labels with %= (thanks joerg@)

diffstat:

 tests/lib/libc/sys/t_ptrace_x86_wait.h |  15 +++++----------
 1 files changed, 5 insertions(+), 10 deletions(-)

diffs (39 lines):

diff -r 9c0358406f17 -r 4cbcb52ed80c tests/lib/libc/sys/t_ptrace_x86_wait.h
--- a/tests/lib/libc/sys/t_ptrace_x86_wait.h    Fri Feb 14 01:52:35 2020 +0000
+++ b/tests/lib/libc/sys/t_ptrace_x86_wait.h    Fri Feb 14 04:20:59 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: t_ptrace_x86_wait.h,v 1.22 2020/02/13 18:31:54 tnn Exp $       */
+/*     $NetBSD: t_ptrace_x86_wait.h,v 1.23 2020/02/14 04:20:59 christos Exp $  */
 
 /*-
  * Copyright (c) 2016, 2017, 2018, 2019 The NetBSD Foundation, Inc.
@@ -1972,11 +1972,6 @@
 #define X86_CVE_2018_8897_PAGE 0x5000 /* page addressable by 32-bit registers */
 
 static void
-#ifdef __clang__
-__attribute__((optnone))
-#else
-__attribute__((__optimize__("O0")))
-#endif
 x86_cve_2018_8897_trigger(void)
 {
        /*
@@ -2077,13 +2072,13 @@
                );
 #else /* !__PIE__ */
        __asm__ __volatile__(
-               "       movq $farjmp32, %%rax\n\t"
+               "       movq $farjmp32%=, %%rax\n\t"
                "       ljmp *(%%rax)\n\t"
-               "farjmp32:\n\t"
-               "       .long trigger32\n\t"
+               "farjmp32%=:\n\t"
+               "       .long trigger32%=\n\t"
                "       .word 0x73\n\t"
                "       .code32\n\t"
-               "trigger32:\n\t"
+               "trigger32%=:\n\t"
                "       movl $0x5000, %%esp\n\t"
                "       pop %%ss\n\t"
                "       int $4\n\t"



Home | Main Index | Thread Index | Old Index