|
|
43ae3d |
# HG changeset patch
|
|
|
43ae3d |
# User mbalao
|
|
|
43ae3d |
# Date 1525317412 -3600
|
|
|
43ae3d |
# Thu May 03 04:16:52 2018 +0100
|
|
|
43ae3d |
# Node ID de79964656fc652f2085dac4fe99bcc128b5a3b1
|
|
|
43ae3d |
# Parent ffd5260fe5adcb26f87a14f1aaaf3e1a075d712a
|
|
|
43ae3d |
8201509, PR3579: Zero: S390 31bit atomic_copy64 inline assembler is wrong
|
|
|
43ae3d |
Summary: The inline assembler for the S390 (S390 and not _LP64) has src and dst reversed thereby corrupting data
|
|
|
43ae3d |
Reviewed-by: shade
|
|
|
43ae3d |
|
|
|
43ae3d |
diff --git openjdk.orig/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.hpp openjdk/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.hpp
|
|
|
43ae3d |
--- openjdk.orig/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.hpp
|
|
|
43ae3d |
+++ openjdk/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.hpp
|
|
|
43ae3d |
@@ -1,6 +1,6 @@
|
|
|
43ae3d |
/*
|
|
|
43ae3d |
* Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
|
|
|
43ae3d |
- * Copyright 2007, 2008, 2010 Red Hat, Inc.
|
|
|
43ae3d |
+ * Copyright 2007, 2008, 2010, 2018, Red Hat, Inc.
|
|
|
43ae3d |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
|
43ae3d |
*
|
|
|
43ae3d |
* This code is free software; you can redistribute it and/or modify it
|
|
|
43ae3d |
@@ -50,10 +50,10 @@
|
|
|
43ae3d |
: "Q"(*(volatile long*)src));
|
|
|
43ae3d |
#elif defined(S390) && !defined(_LP64)
|
|
|
43ae3d |
double tmp;
|
|
|
43ae3d |
- asm volatile ("ld %0, 0(%1)\n"
|
|
|
43ae3d |
- "std %0, 0(%2)\n"
|
|
|
43ae3d |
- : "=r"(tmp)
|
|
|
43ae3d |
- : "a"(src), "a"(dst));
|
|
|
43ae3d |
+ asm volatile ("ld %0, %2\n"
|
|
|
43ae3d |
+ "std %0, %1\n"
|
|
|
43ae3d |
+ : "=&f"(tmp), "=Q"(*(volatile double*)dst)
|
|
|
43ae3d |
+ : "Q"(*(volatile double*)src));
|
|
|
43ae3d |
#elif defined(__ARM_ARCH_7A__)
|
|
|
43ae3d |
jlong tmp;
|
|
|
43ae3d |
asm volatile ("ldrexd %0, [%1]\n"
|