# HG changeset patch # User chrisphi # Date 1524673289 14400 # Wed Apr 25 12:21:29 2018 -0400 # Node ID 09c9160c27d7752e7b1083849061e6d89fa9cf84 # Parent 22d36f1c0994cd13770b3ae083cb311178441c4d 8201509: Zero : S390x (S390 and not _LP64) atomic_copy64 inline assembler is wrong. Summary: In os_linux_zero.hpp the inline assembler for the S390 (S390 and not _LP64) has src and dst reversed thereby corrupting data. Reviewed-by: Shade Contributed-by: MBalao diff --git a/src/hotspot/os_cpu/linux_zero/os_linux_zero.hpp b/src/hotspot/os_cpu/linux_zero/os_linux_zero.hpp --- a/src/hotspot/os_cpu/linux_zero/os_linux_zero.hpp +++ b/src/hotspot/os_cpu/linux_zero/os_linux_zero.hpp @@ -1,6 +1,6 @@ /* * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved. - * Copyright 2007, 2008, 2010 Red Hat, Inc. + * Copyright 2007, 2008, 2010, 2018, Red Hat, Inc. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -50,10 +50,10 @@ : "Q"(*(volatile long*)src)); #elif defined(S390) && !defined(_LP64) double tmp; - asm volatile ("ld %0, 0(%1)\n" - "std %0, 0(%2)\n" - : "=r"(tmp) - : "a"(src), "a"(dst)); + asm volatile ("ld %0, %2\n" + "std %0, %1\n" + : "=&f"(tmp), "=Q"(*(volatile double*)dst) + : "Q"(*(volatile double*)src)); #else *(jlong *) dst = *(const jlong *) src; #endif