src/hotspot/cpu/aarch64/vm_version_aarch64.hpp
changeset 57804 9b7b9f16dfd9
parent 55521 f9a2f93a0c87
child 58679 9c3209ff7550
child 59122 5d73255c2d52
equal deleted inserted replaced
57803:23e3ab980622 57804:9b7b9f16dfd9
     1 /*
     1 /*
     2  * Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved.
     3  * Copyright (c) 2014, Red Hat Inc. All rights reserved.
     3  * Copyright (c) 2014, 2019, Red Hat Inc. All rights reserved.
     4  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     5  *
     5  *
     6  * This code is free software; you can redistribute it and/or modify it
     6  * This code is free software; you can redistribute it and/or modify it
     7  * under the terms of the GNU General Public License version 2 only, as
     7  * under the terms of the GNU General Public License version 2 only, as
     8  * published by the Free Software Foundation.
     8  * published by the Free Software Foundation.
    38   static int _model;
    38   static int _model;
    39   static int _model2;
    39   static int _model2;
    40   static int _variant;
    40   static int _variant;
    41   static int _revision;
    41   static int _revision;
    42   static int _stepping;
    42   static int _stepping;
    43 
    43   static bool _dcpop;
    44   struct PsrInfo {
    44   struct PsrInfo {
    45     uint32_t dczid_el0;
    45     uint32_t dczid_el0;
    46     uint32_t ctr_el0;
    46     uint32_t ctr_el0;
    47   };
    47   };
    48   static PsrInfo _psr_info;
    48   static PsrInfo _psr_info;
   104   static int cpu_family()                     { return _cpu; }
   104   static int cpu_family()                     { return _cpu; }
   105   static int cpu_model()                      { return _model; }
   105   static int cpu_model()                      { return _model; }
   106   static int cpu_model2()                     { return _model2; }
   106   static int cpu_model2()                     { return _model2; }
   107   static int cpu_variant()                    { return _variant; }
   107   static int cpu_variant()                    { return _variant; }
   108   static int cpu_revision()                   { return _revision; }
   108   static int cpu_revision()                   { return _revision; }
       
   109   static bool supports_dcpop()                { return _dcpop; }
   109   static ByteSize dczid_el0_offset() { return byte_offset_of(PsrInfo, dczid_el0); }
   110   static ByteSize dczid_el0_offset() { return byte_offset_of(PsrInfo, dczid_el0); }
   110   static ByteSize ctr_el0_offset()   { return byte_offset_of(PsrInfo, ctr_el0); }
   111   static ByteSize ctr_el0_offset()   { return byte_offset_of(PsrInfo, ctr_el0); }
   111   static bool is_zva_enabled() {
   112   static bool is_zva_enabled() {
   112     // Check the DZP bit (bit 4) of dczid_el0 is zero
   113     // Check the DZP bit (bit 4) of dczid_el0 is zero
   113     // and block size (bit 0~3) is not zero.
   114     // and block size (bit 0~3) is not zero.