changeset 62099:c461ae40bc45

8247695: PPC/S390: compiler/intrinsics/math/TestFpMinMaxIntrinsics.java fails Reviewed-by: goetz, lucy
author rrich
date Mon, 13 Jul 2020 10:33:14 +0200
parents efc74b005823
children bd2d67951061
files src/hotspot/cpu/ppc/ppc.ad src/hotspot/cpu/s390/s390.ad
diffstat 2 files changed, 25 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/hotspot/cpu/ppc/ppc.ad	Mon Jul 13 07:39:39 2020 +0200
+++ b/src/hotspot/cpu/ppc/ppc.ad	Mon Jul 13 10:33:14 2020 +0200
@@ -9203,6 +9203,19 @@
   ins_pipe(pipe_class_default);
 %}
 
+instruct absL_reg_Ex(iRegLdst dst, iRegLsrc src) %{
+  match(Set dst (AbsL src));
+  ins_cost(DEFAULT_COST*3);
+
+  expand %{
+    iRegLdst tmp1;
+    iRegLdst tmp2;
+    signmask64L_regL(tmp1, src);
+    xorL_reg_reg(tmp2, tmp1, src);
+    subL_reg_reg(dst, tmp2, tmp1);
+  %}
+%}
+
 // Long negation
 instruct negL_reg_reg(iRegLdst dst, immL_0 zero, iRegLsrc src2) %{
   match(Set dst (SubL zero src2));
--- a/src/hotspot/cpu/s390/s390.ad	Mon Jul 13 07:39:39 2020 +0200
+++ b/src/hotspot/cpu/s390/s390.ad	Mon Jul 13 10:33:14 2020 +0200
@@ -1,6 +1,6 @@
 //
 // Copyright (c) 2017, 2020, Oracle and/or its affiliates. All rights reserved.
-// Copyright (c) 2017, 2019 SAP SE. All rights reserved.
+// Copyright (c) 2017, 2020 SAP SE. All rights reserved.
 // DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 //
 // This code is free software; you can redistribute it and/or modify it
@@ -9050,6 +9050,17 @@
   ins_pipe(pipe_class_dummy);
 %}
 
+instruct absL_reg(iRegL dst, iRegL src, flagsReg cr) %{
+  match(Set dst (AbsL src));
+  effect(KILL cr);
+  ins_cost(DEFAULT_COST_LOW);
+  // TODO: s390 port size(FIXED_SIZE);
+  format %{ "LPGR     $dst, $src" %}
+  opcode(LPGR_ZOPC);
+  ins_encode(z_rreform(dst, src));
+  ins_pipe(pipe_class_dummy);
+%}
+
 instruct negabsI_reg(iRegI dst, iRegI src, immI_0 zero, flagsReg cr) %{
   match(Set dst (SubI zero (AbsI src)));
   effect(KILL cr);