author | stuefe |
Wed, 27 Mar 2019 14:13:34 +0100 | |
changeset 54437 | 2ae93028bef3 |
parent 47216 | 71c04702a3d5 |
permissions | -rw-r--r-- |
1 | 1 |
/* |
13728
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
13391
diff
changeset
|
2 |
* Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. |
1 | 3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 |
* |
|
5 |
* This code is free software; you can redistribute it and/or modify it |
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
|
7 |
* published by the Free Software Foundation. |
|
8 |
* |
|
9 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
|
10 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
11 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
12 |
* version 2 for more details (a copy is included in the LICENSE file that |
|
13 |
* accompanied this code). |
|
14 |
* |
|
15 |
* You should have received a copy of the GNU General Public License version |
|
16 |
* 2 along with this work; if not, write to the Free Software Foundation, |
|
17 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
|
18 |
* |
|
5547
f4b087cbb361
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
5426
diff
changeset
|
19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
f4b087cbb361
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
5426
diff
changeset
|
20 |
* or visit www.oracle.com if you need additional information or have any |
f4b087cbb361
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
5426
diff
changeset
|
21 |
* questions. |
1 | 22 |
* |
23 |
*/ |
|
24 |
||
7397 | 25 |
#include "precompiled.hpp" |
7700
3252c02e23b8
7006044: materialize cheap non-oop pointers on 64-bit SPARC
twisti
parents:
7433
diff
changeset
|
26 |
#include "asm/assembler.hpp" |
14631
526804361522
8003250: SPARC: move MacroAssembler into separate file
twisti
parents:
14626
diff
changeset
|
27 |
#include "asm/assembler.inline.hpp" |
1 | 28 |
|
46596
a7c9706d25a9
8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents:
14631
diff
changeset
|
29 |
#include "assembler_sparc.hpp" |
a7c9706d25a9
8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents:
14631
diff
changeset
|
30 |
|
1 | 31 |
int AbstractAssembler::code_fill_byte() { |
32 |
return 0x00; // illegal instruction 0x00000000 |
|
33 |
} |
|
46596
a7c9706d25a9
8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents:
14631
diff
changeset
|
34 |
|
a7c9706d25a9
8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents:
14631
diff
changeset
|
35 |
#ifdef VALIDATE_PIPELINE |
a7c9706d25a9
8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents:
14631
diff
changeset
|
36 |
/* Walk over the current code section and verify that there are no obvious |
a7c9706d25a9
8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents:
14631
diff
changeset
|
37 |
* pipeline hazards exposed in the code generated. |
a7c9706d25a9
8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents:
14631
diff
changeset
|
38 |
*/ |
a7c9706d25a9
8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents:
14631
diff
changeset
|
39 |
void Assembler::validate_no_pipeline_hazards() { |
a7c9706d25a9
8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents:
14631
diff
changeset
|
40 |
const CodeSection* csect = code_section(); |
a7c9706d25a9
8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents:
14631
diff
changeset
|
41 |
|
a7c9706d25a9
8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents:
14631
diff
changeset
|
42 |
address addr0 = csect->start(); |
a7c9706d25a9
8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents:
14631
diff
changeset
|
43 |
address addrN = csect->end(); |
a7c9706d25a9
8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents:
14631
diff
changeset
|
44 |
uint32_t prev = 0; |
a7c9706d25a9
8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents:
14631
diff
changeset
|
45 |
|
a7c9706d25a9
8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents:
14631
diff
changeset
|
46 |
assert((addrN - addr0) % BytesPerInstWord == 0, "must be"); |
a7c9706d25a9
8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents:
14631
diff
changeset
|
47 |
|
a7c9706d25a9
8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents:
14631
diff
changeset
|
48 |
for (address pc = addr0; pc != addrN; pc += BytesPerInstWord) { |
a7c9706d25a9
8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents:
14631
diff
changeset
|
49 |
uint32_t insn = *reinterpret_cast<uint32_t*>(pc); |
a7c9706d25a9
8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents:
14631
diff
changeset
|
50 |
|
a7c9706d25a9
8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents:
14631
diff
changeset
|
51 |
// 1. General case: No CTI immediately after other CTI |
a7c9706d25a9
8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents:
14631
diff
changeset
|
52 |
assert(!(is_cti(prev) && is_cti(insn)), "CTI-CTI not allowed."); |
a7c9706d25a9
8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents:
14631
diff
changeset
|
53 |
|
a7c9706d25a9
8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents:
14631
diff
changeset
|
54 |
// 2. Special case: No CTI immediately after/before RDPC |
a7c9706d25a9
8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents:
14631
diff
changeset
|
55 |
assert(!(is_cti(prev) && is_rdpc(insn)), "CTI-RDPC not allowed."); |
a7c9706d25a9
8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents:
14631
diff
changeset
|
56 |
assert(!(is_rdpc(prev) && is_cti(insn)), "RDPC-CTI not allowed."); |
a7c9706d25a9
8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents:
14631
diff
changeset
|
57 |
|
a7c9706d25a9
8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents:
14631
diff
changeset
|
58 |
prev = insn; |
a7c9706d25a9
8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents:
14631
diff
changeset
|
59 |
} |
a7c9706d25a9
8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents:
14631
diff
changeset
|
60 |
} |
a7c9706d25a9
8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents:
14631
diff
changeset
|
61 |
#endif |