All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Hildenbrand <david@redhat.com>
To: qemu-devel@nongnu.org
Cc: qemu-s390x@nongnu.org, "Thomas Huth" <thuth@redhat.com>,
	"Cornelia Huck" <cohuck@redhat.com>,
	"Richard Henderson" <rth@twiddle.net>,
	"Alex Bennée" <alex.bennee@linaro.org>,
	"Philippe Mathieu-Daudé" <f4bug@amsat.org>,
	"David Hildenbrand" <david@redhat.com>
Subject: [Qemu-devel] [PATCH RFC 1/2] tests/tcg: Allow targets to set the optimization level
Date: Wed, 27 Feb 2019 12:14:10 +0100	[thread overview]
Message-ID: <20190227111411.22890-2-david@redhat.com> (raw)
In-Reply-To: <20190227111411.22890-1-david@redhat.com>

We sometimes want basic optimizations, e.g. for constant propagation
into inlined functions.

Especially for inline asm with immediates;

static inline void some_instr(uint8_t imm)
{
    asm volatile("...", :: "i" (imm));
}

static void test()
{
    some_instr(1);
}

Which is impossible with -O0. So make -O0 the default but let
targets override it.

Signed-off-by: David Hildenbrand <david@redhat.com>
---
 tests/tcg/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/tcg/Makefile b/tests/tcg/Makefile
index bf06415390..bd0bace0d5 100644
--- a/tests/tcg/Makefile
+++ b/tests/tcg/Makefile
@@ -47,7 +47,7 @@ skip-test = @printf "  SKIPPED %s on $(TARGET_NAME) because %s\n" $1 $2
 TESTS=
 
 # Start with a blank slate, the build targets get to add stuff first
-CFLAGS=
+CFLAGS=-O0
 QEMU_CFLAGS=
 LDFLAGS=
 
@@ -70,7 +70,7 @@ ifneq ($(TARGET_BASE_ARCH),$(TARGET_NAME))
 endif
 
 # Add the common build options
-CFLAGS+=-Wall -O0 -g -fno-strict-aliasing
+CFLAGS+=-Wall -g -fno-strict-aliasing
 ifeq ($(BUILD_STATIC),y)
 LDFLAGS+=-static
 endif
-- 
2.17.2

  reply	other threads:[~2019-02-27 11:29 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-27 11:14 [Qemu-devel] [PATCH RFC 0/2] tests/tcg: Vector instruction tests for target/s390x David Hildenbrand
2019-02-27 11:14 ` David Hildenbrand [this message]
2019-02-27 11:46   ` [Qemu-devel] [PATCH RFC 1/2] tests/tcg: Allow targets to set the optimization level Alex Bennée
2019-02-27 11:58     ` David Hildenbrand
2019-02-27 12:42     ` David Hildenbrand
2019-02-27 13:44       ` David Hildenbrand
2019-02-28  0:26   ` Richard Henderson
2019-02-27 11:14 ` [Qemu-devel] [PATCH RFC 2/2] tests/tcg: target/s390: Add test for VECTOR LOAD GR FROM VR ELEMENT David Hildenbrand
2019-02-27 11:19   ` David Hildenbrand
2019-02-27 19:37   ` David Hildenbrand
2019-02-27 20:19     ` Alex Bennée
2019-02-27 20:20       ` David Hildenbrand
2019-02-27 21:40         ` Alex Bennée
2019-02-28  0:24           ` Richard Henderson
2019-02-28  7:11             ` David Hildenbrand
2019-02-28  0:17     ` Richard Henderson
2019-02-28  7:14       ` David Hildenbrand
2019-02-28 17:39         ` Richard Henderson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190227111411.22890-2-david@redhat.com \
    --to=david@redhat.com \
    --cc=alex.bennee@linaro.org \
    --cc=cohuck@redhat.com \
    --cc=f4bug@amsat.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-s390x@nongnu.org \
    --cc=rth@twiddle.net \
    --cc=thuth@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.