Patchwork [5/6] s390x: add TR function for EXECUTE

login
register
mail settings
Submitter Alexander Graf
Date Jan. 4, 2012, 2:13 a.m.
Message ID <1325643192-15941-6-git-send-email-agraf@suse.de>
Download mbox | patch
Permalink /patch/134184/
State New
Headers show

Comments

Alexander Graf - Jan. 4, 2012, 2:13 a.m.
Newer gcc versions (or glibc?) also generate code that tries to EXECUTE
the TR opcode. Implement it so that we don't break valid guests.

Reported-by: Andreas Faerber <afaerber@suse.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
---
 target-s390x/op_helper.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

Patch

diff --git a/target-s390x/op_helper.c b/target-s390x/op_helper.c
index b8a1a8a..cf26b29 100644
--- a/target-s390x/op_helper.c
+++ b/target-s390x/op_helper.c
@@ -636,6 +636,9 @@  uint32_t HELPER(ex)(uint32_t cc, uint64_t v1, uint64_t addr, uint64_t ret)
         case 0x700:
             cc = helper_xc(l, get_address(0, b1, d1), get_address(0, b2, d2));
             break;
+        case 0xc00:
+            helper_tr(l, get_address(0, b1, d1), get_address(0, b2, d2));
+            break;
         default:
             goto abort;
             break;