jdk

Форк
0
/
c2_init_x86.cpp 
65 строк · 2.5 Кб
1
/*
2
 * Copyright (c) 2000, 2021, Oracle and/or its affiliates. All rights reserved.
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
 *
19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20
 * or visit www.oracle.com if you need additional information or have any
21
 * questions.
22
 *
23
 */
24

25
#include "precompiled.hpp"
26
#include "opto/compile.hpp"
27
#include "opto/node.hpp"
28
#include "opto/optoreg.hpp"
29
#include "runtime/vm_version.hpp"
30

31
// processor dependent initialization for i486
32

33
extern void reg_mask_init();
34

35
void Compile::pd_compiler2_init() {
36
  guarantee(CodeEntryAlignment >= InteriorEntryAlignment, "" );
37
  // QQQ presumably all 64bit cpu's support this. Seems like the ifdef could
38
  // simply be left out.
39
#ifndef AMD64
40
  if (!VM_Version::supports_cmov()) {
41
    ConditionalMoveLimit = 0;
42
  }
43
#endif // AMD64
44

45
  if (UseAVX < 3) {
46
    int delta = XMMRegister::max_slots_per_register * XMMRegister::number_of_registers;
47
    int bottom = ConcreteRegisterImpl::max_fpr;
48
    int top = bottom + delta;
49
    int middle = bottom + (delta / 2);
50
    int xmm_slots = XMMRegister::max_slots_per_register;
51
    int lower = xmm_slots / 2;
52
    // mark bad every register that we cannot get to if AVX less than 3, we have all slots in the array
53
    // Note: vm2opto is allocated to ConcreteRegisterImpl::number_of_registers
54
    for (int i = bottom; i < middle; i += xmm_slots) {
55
      for (OptoReg::Name j = OptoReg::Name(i + lower); j<OptoReg::Name(i + xmm_slots); j = OptoReg::add(j, 1)) {
56
        OptoReg::invalidate(j);
57
      }
58
    }
59
    // mark the upper zmm bank bad and all the mask registers bad in this case
60
    for (OptoReg::Name i = OptoReg::Name(middle); i<OptoReg::Name(_last_Mach_Reg - 1); i = OptoReg::add(i, 1)) {
61
      OptoReg::invalidate(i);
62
    }
63
  }
64
  reg_mask_init();
65
}
66

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.