< prev index next >

src/hotspot/cpu/x86/x86.ad

Print this page

   1 //
   2 // Copyright (c) 2011, 2019, 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 //

1598   case T_SHORT:
1599     if (size < 4) return 0;
1600     break;
1601   default:
1602     ShouldNotReachHere();
1603   }
1604   return size;
1605 }
1606 
1607 // Limits on vector size (number of elements) loaded into vector.
1608 const int Matcher::max_vector_size(const BasicType bt) {
1609   return vector_width_in_bytes(bt)/type2aelembytes(bt);
1610 }
1611 const int Matcher::min_vector_size(const BasicType bt) {
1612   int max_size = max_vector_size(bt);
1613   // Min size which can be loaded into vector is 4 bytes.
1614   int size = (type2aelembytes(bt) == 1) ? 4 : 2;
1615   return MIN2(size,max_size);
1616 }
1617 








1618 // Vector ideal reg corresponding to specified size in bytes
1619 const uint Matcher::vector_ideal_reg(int size) {
1620   assert(MaxVectorSize >= size, "");
1621   switch(size) {
1622     case  4: return Op_VecS;
1623     case  8: return Op_VecD;
1624     case 16: return Op_VecX;
1625     case 32: return Op_VecY;
1626     case 64: return Op_VecZ;
1627   }
1628   ShouldNotReachHere();
1629   return 0;
1630 }
1631 
1632 // x86 supports misaligned vectors store/load.
1633 const bool Matcher::misaligned_vectors_ok() {
1634   return true;
1635 }
1636 
1637 // x86 AES instructions are compatible with SunJCE expanded

   1 //
   2 // Copyright (c) 2011, 2020, 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 //

1598   case T_SHORT:
1599     if (size < 4) return 0;
1600     break;
1601   default:
1602     ShouldNotReachHere();
1603   }
1604   return size;
1605 }
1606 
1607 // Limits on vector size (number of elements) loaded into vector.
1608 const int Matcher::max_vector_size(const BasicType bt) {
1609   return vector_width_in_bytes(bt)/type2aelembytes(bt);
1610 }
1611 const int Matcher::min_vector_size(const BasicType bt) {
1612   int max_size = max_vector_size(bt);
1613   // Min size which can be loaded into vector is 4 bytes.
1614   int size = (type2aelembytes(bt) == 1) ? 4 : 2;
1615   return MIN2(size,max_size);
1616 }
1617 
1618 const bool Matcher::supports_scalable_vector() {
1619   return false;
1620 }
1621 
1622 const int Matcher::scalable_vector_reg_size(const BasicType bt) {
1623   return -1;
1624 }
1625 
1626 // Vector ideal reg corresponding to specified size in bytes
1627 const uint Matcher::vector_ideal_reg(int size) {
1628   assert(MaxVectorSize >= size, "");
1629   switch(size) {
1630     case  4: return Op_VecS;
1631     case  8: return Op_VecD;
1632     case 16: return Op_VecX;
1633     case 32: return Op_VecY;
1634     case 64: return Op_VecZ;
1635   }
1636   ShouldNotReachHere();
1637   return 0;
1638 }
1639 
1640 // x86 supports misaligned vectors store/load.
1641 const bool Matcher::misaligned_vectors_ok() {
1642   return true;
1643 }
1644 
1645 // x86 AES instructions are compatible with SunJCE expanded
< prev index next >