author | jmasa |
Tue, 24 Nov 2015 15:56:40 -0800 | |
changeset 35043 | 30543d2a0a20 |
parent 34653 | 3c3efc6243a8 |
child 46619 | a3919f5e8d2b |
permissions | -rw-r--r-- |
32598
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
1 |
/* |
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
2 |
* Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. |
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
4 |
* |
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
5 |
* This code is free software; you can redistribute it and/or modify it |
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
7 |
* published by the Free Software Foundation. |
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
8 |
* |
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
9 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
10 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
11 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
12 |
* version 2 for more details (a copy is included in the LICENSE file that |
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
13 |
* accompanied this code). |
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
14 |
* |
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
15 |
* You should have received a copy of the GNU General Public License version |
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
16 |
* 2 along with this work; if not, write to the Free Software Foundation, |
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
17 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
18 |
* |
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
20 |
* or visit www.oracle.com if you need additional information or have any |
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
21 |
* questions. |
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
22 |
* |
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
23 |
*/ |
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
24 |
|
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
25 |
#include "precompiled.hpp" |
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
26 |
|
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
27 |
#include "gc/shared/memset_with_concurrent_readers.hpp" |
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
28 |
#include "runtime/prefetch.inline.hpp" |
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
29 |
#include "utilities/debug.hpp" |
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
30 |
#include "utilities/globalDefinitions.hpp" |
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
31 |
#include "utilities/macros.hpp" |
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
32 |
|
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
33 |
#if INCLUDE_ALL_GCS |
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
34 |
|
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
35 |
// An implementation of memset, for use when there may be concurrent |
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
36 |
// readers of the region being stored into. |
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
37 |
// |
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
38 |
// We can't use the standard library memset if it is implemented using |
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
39 |
// block initializing stores. Doing so can result in concurrent readers |
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
40 |
// seeing spurious zeros. |
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
41 |
// |
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
42 |
// We can't use the obvious C/C++ for-loop, because the compiler may |
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
43 |
// recognize the idiomatic loop and optimize it into a call to the |
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
44 |
// standard library memset; we've seen exactly this happen with, for |
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
45 |
// example, Solaris Studio 12.3. Hence the use of inline assembly |
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
46 |
// code, hiding loops from the compiler's optimizer. |
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
47 |
// |
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
48 |
// We don't attempt to use the standard library memset when it is safe |
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
49 |
// to do so. We could conservatively do so by detecting the presence |
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
50 |
// of block initializing stores (VM_Version::has_blk_init()), but the |
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
51 |
// implementation provided here should be sufficient. |
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
52 |
|
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
53 |
inline void fill_subword(void* start, void* end, int value) { |
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
54 |
STATIC_ASSERT(BytesPerWord == 8); |
34653
3c3efc6243a8
8144663: Invalid constraints in memset_with_concurrent_readers_sparc.cpp inline assembly
mikael
parents:
33147
diff
changeset
|
55 |
assert(pointer_delta(end, start, 1) < (size_t)BytesPerWord, "precondition"); |
32598
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
56 |
// Dispatch on (end - start). |
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
57 |
void* pc; |
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
58 |
__asm__ volatile( |
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
59 |
// offset := (7 - (end - start)) + 3 |
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
60 |
// 3 instructions from rdpc to DISPATCH |
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
61 |
" sub %[offset], %[end], %[offset]\n\t" // offset := start - end |
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
62 |
" sllx %[offset], 2, %[offset]\n\t" // scale offset for instruction size of 4 |
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
63 |
" add %[offset], 40, %[offset]\n\t" // offset += 10 * instruction size |
33147
52e5fbc71615
8139086: Solaris/Sparc slowdebug build fails for memset_with_concurrent_readers.cpp
mgerdin
parents:
32598
diff
changeset
|
64 |
" rd %%pc, %[pc]\n\t" // dispatch on scaled offset |
52e5fbc71615
8139086: Solaris/Sparc slowdebug build fails for memset_with_concurrent_readers.cpp
mgerdin
parents:
32598
diff
changeset
|
65 |
" jmpl %[pc]+%[offset], %%g0\n\t" |
32598
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
66 |
" nop\n\t" |
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
67 |
// DISPATCH: no direct reference, but without it the store block may be elided. |
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
68 |
"1:\n\t" |
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
69 |
" stb %[value], [%[end]-7]\n\t" // end[-7] = value |
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
70 |
" stb %[value], [%[end]-6]\n\t" |
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
71 |
" stb %[value], [%[end]-5]\n\t" |
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
72 |
" stb %[value], [%[end]-4]\n\t" |
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
73 |
" stb %[value], [%[end]-3]\n\t" |
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
74 |
" stb %[value], [%[end]-2]\n\t" |
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
75 |
" stb %[value], [%[end]-1]\n\t" // end[-1] = value |
34653
3c3efc6243a8
8144663: Invalid constraints in memset_with_concurrent_readers_sparc.cpp inline assembly
mikael
parents:
33147
diff
changeset
|
76 |
: /* only temporaries/overwritten outputs */ |
3c3efc6243a8
8144663: Invalid constraints in memset_with_concurrent_readers_sparc.cpp inline assembly
mikael
parents:
33147
diff
changeset
|
77 |
[pc] "=&r" (pc), // temp |
3c3efc6243a8
8144663: Invalid constraints in memset_with_concurrent_readers_sparc.cpp inline assembly
mikael
parents:
33147
diff
changeset
|
78 |
[offset] "+&r" (start) |
3c3efc6243a8
8144663: Invalid constraints in memset_with_concurrent_readers_sparc.cpp inline assembly
mikael
parents:
33147
diff
changeset
|
79 |
: [end] "r" (end), |
32598
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
80 |
[value] "r" (value) |
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
81 |
: "memory"); |
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
82 |
} |
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
83 |
|
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
84 |
void memset_with_concurrent_readers(void* to, int value, size_t size) { |
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
85 |
Prefetch::write(to, 0); |
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
86 |
void* end = static_cast<char*>(to) + size; |
34653
3c3efc6243a8
8144663: Invalid constraints in memset_with_concurrent_readers_sparc.cpp inline assembly
mikael
parents:
33147
diff
changeset
|
87 |
if (size >= (size_t)BytesPerWord) { |
32598
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
88 |
// Fill any partial word prefix. |
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
89 |
uintx* aligned_to = static_cast<uintx*>(align_ptr_up(to, BytesPerWord)); |
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
90 |
fill_subword(to, aligned_to, value); |
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
91 |
|
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
92 |
// Compute fill word. |
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
93 |
STATIC_ASSERT(BitsPerByte == 8); |
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
94 |
STATIC_ASSERT(BitsPerWord == 64); |
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
95 |
uintx xvalue = value & 0xff; |
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
96 |
xvalue |= (xvalue << 8); |
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
97 |
xvalue |= (xvalue << 16); |
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
98 |
xvalue |= (xvalue << 32); |
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
99 |
|
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
100 |
uintx* aligned_end = static_cast<uintx*>(align_ptr_down(end, BytesPerWord)); |
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
101 |
assert(aligned_to <= aligned_end, "invariant"); |
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
102 |
|
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
103 |
// for ( ; aligned_to < aligned_end; ++aligned_to) { |
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
104 |
// *aligned_to = xvalue; |
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
105 |
// } |
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
106 |
uintptr_t temp; |
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
107 |
__asm__ volatile( |
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
108 |
// Unroll loop x8. |
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
109 |
" sub %[aend], %[ato], %[temp]\n\t" |
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
110 |
" cmp %[temp], 56\n\t" // cc := (aligned_end - aligned_to) > 7 words |
33147
52e5fbc71615
8139086: Solaris/Sparc slowdebug build fails for memset_with_concurrent_readers.cpp
mgerdin
parents:
32598
diff
changeset
|
111 |
" ba %%xcc, 2f\n\t" // goto TEST always |
32598
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
112 |
" sub %[aend], 56, %[temp]\n\t" // limit := aligned_end - 7 words |
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
113 |
// LOOP: |
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
114 |
"1:\n\t" // unrolled x8 store loop top |
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
115 |
" cmp %[temp], %[ato]\n\t" // cc := limit > (next) aligned_to |
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
116 |
" stx %[xvalue], [%[ato]-64]\n\t" // store 8 words, aligned_to pre-incremented |
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
117 |
" stx %[xvalue], [%[ato]-56]\n\t" |
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
118 |
" stx %[xvalue], [%[ato]-48]\n\t" |
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
119 |
" stx %[xvalue], [%[ato]-40]\n\t" |
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
120 |
" stx %[xvalue], [%[ato]-32]\n\t" |
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
121 |
" stx %[xvalue], [%[ato]-24]\n\t" |
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
122 |
" stx %[xvalue], [%[ato]-16]\n\t" |
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
123 |
" stx %[xvalue], [%[ato]-8]\n\t" |
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
124 |
// TEST: |
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
125 |
"2:\n\t" |
33147
52e5fbc71615
8139086: Solaris/Sparc slowdebug build fails for memset_with_concurrent_readers.cpp
mgerdin
parents:
32598
diff
changeset
|
126 |
" bgu,a %%xcc, 1b\n\t" // goto LOOP if more than 7 words remaining |
32598
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
127 |
" add %[ato], 64, %[ato]\n\t" // aligned_to += 8, for next iteration |
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
128 |
// Fill remaining < 8 full words. |
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
129 |
// Dispatch on (aligned_end - aligned_to). |
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
130 |
// offset := (7 - (aligned_end - aligned_to)) + 3 |
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
131 |
// 3 instructions from rdpc to DISPATCH |
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
132 |
" sub %[ato], %[aend], %[ato]\n\t" // offset := aligned_to - aligned_end |
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
133 |
" srax %[ato], 1, %[ato]\n\t" // scale offset for instruction size of 4 |
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
134 |
" add %[ato], 40, %[ato]\n\t" // offset += 10 * instruction size |
33147
52e5fbc71615
8139086: Solaris/Sparc slowdebug build fails for memset_with_concurrent_readers.cpp
mgerdin
parents:
32598
diff
changeset
|
135 |
" rd %%pc, %[temp]\n\t" // dispatch on scaled offset |
52e5fbc71615
8139086: Solaris/Sparc slowdebug build fails for memset_with_concurrent_readers.cpp
mgerdin
parents:
32598
diff
changeset
|
136 |
" jmpl %[temp]+%[ato], %%g0\n\t" |
32598
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
137 |
" nop\n\t" |
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
138 |
// DISPATCH: no direct reference, but without it the store block may be elided. |
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
139 |
"3:\n\t" |
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
140 |
" stx %[xvalue], [%[aend]-56]\n\t" // aligned_end[-7] = xvalue |
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
141 |
" stx %[xvalue], [%[aend]-48]\n\t" |
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
142 |
" stx %[xvalue], [%[aend]-40]\n\t" |
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
143 |
" stx %[xvalue], [%[aend]-32]\n\t" |
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
144 |
" stx %[xvalue], [%[aend]-24]\n\t" |
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
145 |
" stx %[xvalue], [%[aend]-16]\n\t" |
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
146 |
" stx %[xvalue], [%[aend]-8]\n\t" // aligned_end[-1] = xvalue |
34653
3c3efc6243a8
8144663: Invalid constraints in memset_with_concurrent_readers_sparc.cpp inline assembly
mikael
parents:
33147
diff
changeset
|
147 |
: /* only temporaries/overwritten outputs */ |
3c3efc6243a8
8144663: Invalid constraints in memset_with_concurrent_readers_sparc.cpp inline assembly
mikael
parents:
33147
diff
changeset
|
148 |
[temp] "=&r" (temp), |
3c3efc6243a8
8144663: Invalid constraints in memset_with_concurrent_readers_sparc.cpp inline assembly
mikael
parents:
33147
diff
changeset
|
149 |
[ato] "+&r" (aligned_to) |
3c3efc6243a8
8144663: Invalid constraints in memset_with_concurrent_readers_sparc.cpp inline assembly
mikael
parents:
33147
diff
changeset
|
150 |
: [aend] "r" (aligned_end), |
32598
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
151 |
[xvalue] "r" (xvalue) |
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
152 |
: "cc", "memory"); |
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
153 |
to = aligned_end; // setup for suffix |
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
154 |
} |
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
155 |
// Fill any partial word suffix. Also the prefix if size < BytesPerWord. |
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
156 |
fill_subword(to, end, value); |
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
157 |
} |
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
158 |
|
70b490faa49f
8131330: G1CollectedHeap::verify_dirty_young_list fails with assert
kbarrett
parents:
diff
changeset
|
159 |
#endif // INCLUDE_ALL_GCS |