From: Alexander Graf <agraf@suse.de>
To: qemu-devel Developers <qemu-devel@nongnu.org>
Cc: Blue Swirl <blauwirbel@gmail.com>
Subject: [Qemu-devel] [PATCH 02/13] s390x: add ldeb instruction
Date: Sun, 13 Nov 2011 16:33:43 +0100 [thread overview]
Message-ID: <1321198434-2347-3-git-send-email-agraf@suse.de> (raw)
In-Reply-To: <1321198434-2347-1-git-send-email-agraf@suse.de>
While running perl, we encountered the ldeb instruction to be used,
so we implement it :).
Signed-off-by: Alexander Graf <agraf@suse.de>
---
target-s390x/helpers.h | 1 +
target-s390x/op_helper.c | 9 +++++++++
target-s390x/translate.c | 4 ++++
3 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/target-s390x/helpers.h b/target-s390x/helpers.h
index 6ca48eb..01c8d0e 100644
--- a/target-s390x/helpers.h
+++ b/target-s390x/helpers.h
@@ -102,6 +102,7 @@ DEF_HELPER_3(madb, void, i32, i64, i32)
DEF_HELPER_3(maebr, void, i32, i32, i32)
DEF_HELPER_3(madbr, void, i32, i32, i32)
DEF_HELPER_3(msdbr, void, i32, i32, i32)
+DEF_HELPER_2(ldeb, void, i32, i64)
DEF_HELPER_2(lxdb, void, i32, i64)
DEF_HELPER_FLAGS_2(tceb, TCG_CALL_PURE, i32, i32, i64)
DEF_HELPER_FLAGS_2(tcdb, TCG_CALL_PURE, i32, i32, i64)
diff --git a/target-s390x/op_helper.c b/target-s390x/op_helper.c
index cd57678..e594118 100644
--- a/target-s390x/op_helper.c
+++ b/target-s390x/op_helper.c
@@ -1631,6 +1631,15 @@ void HELPER(maebr)(uint32_t f1, uint32_t f3, uint32_t f2)
&env->fpu_status);
}
+/* convert 32-bit float to 64-bit float */
+void HELPER(ldeb)(uint32_t f1, uint64_t a2)
+{
+ uint32_t v2;
+ v2 = ldl(a2);
+ env->fregs[f1].d = float32_to_float64(v2,
+ &env->fpu_status);
+}
+
/* convert 64-bit float to 128-bit float */
void HELPER(lxdb)(uint32_t f1, uint64_t a2)
{
diff --git a/target-s390x/translate.c b/target-s390x/translate.c
index 6a22fde..ee15672 100644
--- a/target-s390x/translate.c
+++ b/target-s390x/translate.c
@@ -2214,6 +2214,10 @@ static void disas_ed(DisasContext *s, int op, int r1, int x2, int b2, int d2,
addr = get_address(s, x2, b2, d2);
tmp_r1 = tcg_const_i32(r1);
switch (op) {
+ case 0x4: /* LDEB R1,D2(X2,B2) [RXE] */
+ potential_page_fault(s);
+ gen_helper_ldeb(tmp_r1, addr);
+ break;
case 0x5: /* LXDB R1,D2(X2,B2) [RXE] */
potential_page_fault(s);
gen_helper_lxdb(tmp_r1, addr);
--
1.6.0.2
next prev parent reply other threads:[~2011-11-13 15:33 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-13 15:33 [Qemu-devel] [PULL 00/13] s390 patch queue 2011-11-13 1.0 Alexander Graf
2011-11-13 15:33 ` [Qemu-devel] [PATCH 01/13] [S390] Add hotplug support Alexander Graf
2011-11-13 17:14 ` Anthony Liguori
2011-11-13 17:23 ` Alexander Graf
2011-11-13 15:33 ` Alexander Graf [this message]
2011-11-13 15:33 ` [Qemu-devel] [PATCH 03/13] s390x: make ipte 31-bit aware Alexander Graf
2011-11-13 15:33 ` [Qemu-devel] [PATCH 04/13] s390x: update R and C bits in storage key Alexander Graf
2011-11-13 15:33 ` [Qemu-devel] [PATCH 05/13] s390x: implement rrbe instruction properly Alexander Graf
2011-11-13 15:33 ` [Qemu-devel] [PATCH 06/13] s390x: implement SIGP restart and shutdown Alexander Graf
2011-11-13 15:33 ` [Qemu-devel] [PATCH 07/13] s390: fix reset hypercall to reset the status Alexander Graf
2011-11-13 15:33 ` [Qemu-devel] [PATCH 08/13] s390: fix short kernel command lines Alexander Graf
2011-11-13 15:33 ` [Qemu-devel] [PATCH 09/13] s390: Fix cpu shutdown for KVM Alexander Graf
2011-11-13 15:33 ` [Qemu-devel] [PATCH 10/13] s390x: Add shutdown for TCG s390-virtio machine Alexander Graf
2011-11-13 15:33 ` [Qemu-devel] [PATCH 11/13] tcg: Standardize on TCGReg as the enum for hard registers Alexander Graf
2011-11-13 15:33 ` [Qemu-devel] [PATCH 12/13] tcg: Use TCGReg for standard tcg-target entry points Alexander Graf
2011-11-13 15:33 ` [Qemu-devel] [PATCH 13/13] s390x: initialize virtio dev region Alexander Graf
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=1321198434-2347-3-git-send-email-agraf@suse.de \
--to=agraf@suse.de \
--cc=blauwirbel@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.