All of lore.kernel.org
 help / color / mirror / Atom feed
From: Max Filippov <jcmvbkbc@gmail.com>
To: qemu-devel@nongnu.org
Cc: Max Filippov <jcmvbkbc@gmail.com>
Subject: [Qemu-devel] [PATCH 2/2] tests/tcg/xtensa: only generate defined exception handlers
Date: Fri, 31 Aug 2018 19:13:41 -0700	[thread overview]
Message-ID: <20180901021341.18066-3-jcmvbkbc@gmail.com> (raw)
In-Reply-To: <20180901021341.18066-1-jcmvbkbc@gmail.com>

Don't generate handlers for IRQ levels that are not defined for the CPU
or for window overflow/underflow exceptions for configs w/o windowed
registers.

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
---
 tests/tcg/xtensa/vectors.S | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/tests/tcg/xtensa/vectors.S b/tests/tcg/xtensa/vectors.S
index 265a1812399b..6a9cb3cde466 100644
--- a/tests/tcg/xtensa/vectors.S
+++ b/tests/tcg/xtensa/vectors.S
@@ -1,3 +1,5 @@
+#include "core-isa.h"
+
 .macro vector name
 
 .section .vector.\name
@@ -20,19 +22,33 @@ handler_\name\(): .word 0
 
 .endm
 
+#if XCHAL_HAVE_WINDOWED
 vector window_overflow_4
 vector window_overflow_8
 vector window_overflow_12
 vector window_underflow_4
 vector window_underflow_8
 vector window_underflow_12
+#endif
 
+#if XCHAL_NUM_INTLEVELS + XCHAL_HAVE_NMI >= 2
 vector level2
+#endif
+#if XCHAL_NUM_INTLEVELS + XCHAL_HAVE_NMI >= 3
 vector level3
+#endif
+#if XCHAL_NUM_INTLEVELS + XCHAL_HAVE_NMI >= 4
 vector level4
+#endif
+#if XCHAL_NUM_INTLEVELS + XCHAL_HAVE_NMI >= 5
 vector level5
+#endif
+#if XCHAL_NUM_INTLEVELS + XCHAL_HAVE_NMI >= 6
 vector level6
+#endif
+#if XCHAL_NUM_INTLEVELS + XCHAL_HAVE_NMI >= 7
 vector level7
+#endif
 
 vector kernel
 vector user
-- 
2.11.0

      parent reply	other threads:[~2018-09-01  2:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-01  2:13 [Qemu-devel] [PATCH 0/2] tests/tcg/xtensa: exception vectors/handlers improvement Max Filippov
2018-09-01  2:13 ` [Qemu-devel] [PATCH 1/2] tests/tcg/xtensa: move exception handlers to separate section Max Filippov
2018-09-01  2:13 ` Max Filippov [this message]

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=20180901021341.18066-3-jcmvbkbc@gmail.com \
    --to=jcmvbkbc@gmail.com \
    --cc=qemu-devel@nongnu.org \
    /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.