Mercurial > hg > graal-jvmci-8
annotate jvmci/jdk.vm.ci.amd64/src/jdk/vm/ci/amd64/AMD64Kind.java @ 23398:3e8ce13f4e12
minimize diff to jvmci-9
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Tue, 17 May 2016 21:10:34 +0200 |
parents | 4b58c92e939b |
children |
rev | line source |
---|---|
22579
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
1 /* |
23398
3e8ce13f4e12
minimize diff to jvmci-9
Doug Simon <doug.simon@oracle.com>
parents:
23297
diff
changeset
|
2 * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. |
22579
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
4 * |
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
5 * This code is free software; you can redistribute it and/or modify it |
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
6 * under the terms of the GNU General Public License version 2 only, as |
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
7 * published by the Free Software Foundation. |
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
8 * |
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
9 * This code is distributed in the hope that it will be useful, but WITHOUT |
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
12 * version 2 for more details (a copy is included in the LICENSE file that |
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
13 * accompanied this code). |
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
14 * |
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
15 * You should have received a copy of the GNU General Public License version |
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
16 * 2 along with this work; if not, write to the Free Software Foundation, |
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
18 * |
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
20 * or visit www.oracle.com if you need additional information or have any |
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
21 * questions. |
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
22 */ |
22672
1bbd4a7c274b
Rename jdk.internal.jvmci to jdk.vm.ci
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22640
diff
changeset
|
23 package jdk.vm.ci.amd64; |
22579
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
24 |
22672
1bbd4a7c274b
Rename jdk.internal.jvmci to jdk.vm.ci
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22640
diff
changeset
|
25 import jdk.vm.ci.meta.PlatformKind; |
22579
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
26 |
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
27 public enum AMD64Kind implements PlatformKind { |
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
28 |
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
29 // scalar |
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
30 BYTE(1), |
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
31 WORD(2), |
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
32 DWORD(4), |
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
33 QWORD(8), |
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
34 SINGLE(4), |
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
35 DOUBLE(8), |
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
36 |
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
37 // SSE2 |
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
38 V32_BYTE(4, BYTE), |
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
39 V32_WORD(4, WORD), |
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
40 V64_BYTE(8, BYTE), |
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
41 V64_WORD(8, WORD), |
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
42 V64_DWORD(8, DWORD), |
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
43 V128_BYTE(16, BYTE), |
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
44 V128_WORD(16, WORD), |
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
45 V128_DWORD(16, DWORD), |
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
46 V128_QWORD(16, QWORD), |
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
47 V128_SINGLE(16, SINGLE), |
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
48 V128_DOUBLE(16, DOUBLE), |
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
49 |
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
50 // AVX |
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
51 V256_BYTE(32, BYTE), |
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
52 V256_WORD(32, WORD), |
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
53 V256_DWORD(32, DWORD), |
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
54 V256_QWORD(32, QWORD), |
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
55 V256_SINGLE(32, SINGLE), |
22640
3abba3d4aef1
Register and PlatformKind declarations for AVX512.
Roland Schatz <roland.schatz@oracle.com>
parents:
22579
diff
changeset
|
56 V256_DOUBLE(32, DOUBLE), |
3abba3d4aef1
Register and PlatformKind declarations for AVX512.
Roland Schatz <roland.schatz@oracle.com>
parents:
22579
diff
changeset
|
57 |
3abba3d4aef1
Register and PlatformKind declarations for AVX512.
Roland Schatz <roland.schatz@oracle.com>
parents:
22579
diff
changeset
|
58 // AVX512 |
3abba3d4aef1
Register and PlatformKind declarations for AVX512.
Roland Schatz <roland.schatz@oracle.com>
parents:
22579
diff
changeset
|
59 V512_BYTE(64, BYTE), |
3abba3d4aef1
Register and PlatformKind declarations for AVX512.
Roland Schatz <roland.schatz@oracle.com>
parents:
22579
diff
changeset
|
60 V512_WORD(64, WORD), |
3abba3d4aef1
Register and PlatformKind declarations for AVX512.
Roland Schatz <roland.schatz@oracle.com>
parents:
22579
diff
changeset
|
61 V512_DWORD(64, DWORD), |
3abba3d4aef1
Register and PlatformKind declarations for AVX512.
Roland Schatz <roland.schatz@oracle.com>
parents:
22579
diff
changeset
|
62 V512_QWORD(64, QWORD), |
3abba3d4aef1
Register and PlatformKind declarations for AVX512.
Roland Schatz <roland.schatz@oracle.com>
parents:
22579
diff
changeset
|
63 V512_SINGLE(64, SINGLE), |
3abba3d4aef1
Register and PlatformKind declarations for AVX512.
Roland Schatz <roland.schatz@oracle.com>
parents:
22579
diff
changeset
|
64 V512_DOUBLE(64, DOUBLE), |
3abba3d4aef1
Register and PlatformKind declarations for AVX512.
Roland Schatz <roland.schatz@oracle.com>
parents:
22579
diff
changeset
|
65 |
3abba3d4aef1
Register and PlatformKind declarations for AVX512.
Roland Schatz <roland.schatz@oracle.com>
parents:
22579
diff
changeset
|
66 MASK8(1), |
3abba3d4aef1
Register and PlatformKind declarations for AVX512.
Roland Schatz <roland.schatz@oracle.com>
parents:
22579
diff
changeset
|
67 MASK16(2), |
3abba3d4aef1
Register and PlatformKind declarations for AVX512.
Roland Schatz <roland.schatz@oracle.com>
parents:
22579
diff
changeset
|
68 MASK32(4), |
3abba3d4aef1
Register and PlatformKind declarations for AVX512.
Roland Schatz <roland.schatz@oracle.com>
parents:
22579
diff
changeset
|
69 MASK64(8); |
22579
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
70 |
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
71 private final int size; |
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
72 private final int vectorLength; |
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
73 |
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
74 private final AMD64Kind scalar; |
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
75 private final EnumKey<AMD64Kind> key = new EnumKey<>(this); |
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
76 |
23297
4b58c92e939b
remove redundant modifiers
Manuel Rigger <rigger.manuel@gmail.com>
parents:
22672
diff
changeset
|
77 AMD64Kind(int size) { |
22579
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
78 this.size = size; |
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
79 this.scalar = this; |
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
80 this.vectorLength = 1; |
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
81 } |
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
82 |
23297
4b58c92e939b
remove redundant modifiers
Manuel Rigger <rigger.manuel@gmail.com>
parents:
22672
diff
changeset
|
83 AMD64Kind(int size, AMD64Kind scalar) { |
22579
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
84 this.size = size; |
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
85 this.scalar = scalar; |
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
86 |
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
87 assert size % scalar.size == 0; |
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
88 this.vectorLength = size / scalar.size; |
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
89 } |
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
90 |
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
91 public AMD64Kind getScalar() { |
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
92 return scalar; |
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
93 } |
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
94 |
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
95 public int getSizeInBytes() { |
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
96 return size; |
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
97 } |
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
98 |
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
99 public int getVectorLength() { |
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
100 return vectorLength; |
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
101 } |
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
102 |
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
103 public Key getKey() { |
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
104 return key; |
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
105 } |
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
106 |
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
107 public boolean isInteger() { |
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
108 switch (this) { |
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
109 case BYTE: |
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
110 case WORD: |
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
111 case DWORD: |
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
112 case QWORD: |
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
113 return true; |
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
114 default: |
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
115 return false; |
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
116 } |
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
117 } |
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
118 |
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
119 public boolean isXMM() { |
22640
3abba3d4aef1
Register and PlatformKind declarations for AVX512.
Roland Schatz <roland.schatz@oracle.com>
parents:
22579
diff
changeset
|
120 switch (this) { |
3abba3d4aef1
Register and PlatformKind declarations for AVX512.
Roland Schatz <roland.schatz@oracle.com>
parents:
22579
diff
changeset
|
121 case SINGLE: |
3abba3d4aef1
Register and PlatformKind declarations for AVX512.
Roland Schatz <roland.schatz@oracle.com>
parents:
22579
diff
changeset
|
122 case DOUBLE: |
3abba3d4aef1
Register and PlatformKind declarations for AVX512.
Roland Schatz <roland.schatz@oracle.com>
parents:
22579
diff
changeset
|
123 case V32_BYTE: |
3abba3d4aef1
Register and PlatformKind declarations for AVX512.
Roland Schatz <roland.schatz@oracle.com>
parents:
22579
diff
changeset
|
124 case V32_WORD: |
3abba3d4aef1
Register and PlatformKind declarations for AVX512.
Roland Schatz <roland.schatz@oracle.com>
parents:
22579
diff
changeset
|
125 case V64_BYTE: |
3abba3d4aef1
Register and PlatformKind declarations for AVX512.
Roland Schatz <roland.schatz@oracle.com>
parents:
22579
diff
changeset
|
126 case V64_WORD: |
3abba3d4aef1
Register and PlatformKind declarations for AVX512.
Roland Schatz <roland.schatz@oracle.com>
parents:
22579
diff
changeset
|
127 case V64_DWORD: |
3abba3d4aef1
Register and PlatformKind declarations for AVX512.
Roland Schatz <roland.schatz@oracle.com>
parents:
22579
diff
changeset
|
128 case V128_BYTE: |
3abba3d4aef1
Register and PlatformKind declarations for AVX512.
Roland Schatz <roland.schatz@oracle.com>
parents:
22579
diff
changeset
|
129 case V128_WORD: |
3abba3d4aef1
Register and PlatformKind declarations for AVX512.
Roland Schatz <roland.schatz@oracle.com>
parents:
22579
diff
changeset
|
130 case V128_DWORD: |
3abba3d4aef1
Register and PlatformKind declarations for AVX512.
Roland Schatz <roland.schatz@oracle.com>
parents:
22579
diff
changeset
|
131 case V128_QWORD: |
3abba3d4aef1
Register and PlatformKind declarations for AVX512.
Roland Schatz <roland.schatz@oracle.com>
parents:
22579
diff
changeset
|
132 case V128_SINGLE: |
3abba3d4aef1
Register and PlatformKind declarations for AVX512.
Roland Schatz <roland.schatz@oracle.com>
parents:
22579
diff
changeset
|
133 case V128_DOUBLE: |
3abba3d4aef1
Register and PlatformKind declarations for AVX512.
Roland Schatz <roland.schatz@oracle.com>
parents:
22579
diff
changeset
|
134 case V256_BYTE: |
3abba3d4aef1
Register and PlatformKind declarations for AVX512.
Roland Schatz <roland.schatz@oracle.com>
parents:
22579
diff
changeset
|
135 case V256_WORD: |
3abba3d4aef1
Register and PlatformKind declarations for AVX512.
Roland Schatz <roland.schatz@oracle.com>
parents:
22579
diff
changeset
|
136 case V256_DWORD: |
3abba3d4aef1
Register and PlatformKind declarations for AVX512.
Roland Schatz <roland.schatz@oracle.com>
parents:
22579
diff
changeset
|
137 case V256_QWORD: |
3abba3d4aef1
Register and PlatformKind declarations for AVX512.
Roland Schatz <roland.schatz@oracle.com>
parents:
22579
diff
changeset
|
138 case V256_SINGLE: |
3abba3d4aef1
Register and PlatformKind declarations for AVX512.
Roland Schatz <roland.schatz@oracle.com>
parents:
22579
diff
changeset
|
139 case V256_DOUBLE: |
3abba3d4aef1
Register and PlatformKind declarations for AVX512.
Roland Schatz <roland.schatz@oracle.com>
parents:
22579
diff
changeset
|
140 case V512_BYTE: |
3abba3d4aef1
Register and PlatformKind declarations for AVX512.
Roland Schatz <roland.schatz@oracle.com>
parents:
22579
diff
changeset
|
141 case V512_WORD: |
3abba3d4aef1
Register and PlatformKind declarations for AVX512.
Roland Schatz <roland.schatz@oracle.com>
parents:
22579
diff
changeset
|
142 case V512_DWORD: |
3abba3d4aef1
Register and PlatformKind declarations for AVX512.
Roland Schatz <roland.schatz@oracle.com>
parents:
22579
diff
changeset
|
143 case V512_QWORD: |
3abba3d4aef1
Register and PlatformKind declarations for AVX512.
Roland Schatz <roland.schatz@oracle.com>
parents:
22579
diff
changeset
|
144 case V512_SINGLE: |
3abba3d4aef1
Register and PlatformKind declarations for AVX512.
Roland Schatz <roland.schatz@oracle.com>
parents:
22579
diff
changeset
|
145 case V512_DOUBLE: |
3abba3d4aef1
Register and PlatformKind declarations for AVX512.
Roland Schatz <roland.schatz@oracle.com>
parents:
22579
diff
changeset
|
146 return true; |
3abba3d4aef1
Register and PlatformKind declarations for AVX512.
Roland Schatz <roland.schatz@oracle.com>
parents:
22579
diff
changeset
|
147 default: |
3abba3d4aef1
Register and PlatformKind declarations for AVX512.
Roland Schatz <roland.schatz@oracle.com>
parents:
22579
diff
changeset
|
148 return false; |
3abba3d4aef1
Register and PlatformKind declarations for AVX512.
Roland Schatz <roland.schatz@oracle.com>
parents:
22579
diff
changeset
|
149 } |
3abba3d4aef1
Register and PlatformKind declarations for AVX512.
Roland Schatz <roland.schatz@oracle.com>
parents:
22579
diff
changeset
|
150 } |
3abba3d4aef1
Register and PlatformKind declarations for AVX512.
Roland Schatz <roland.schatz@oracle.com>
parents:
22579
diff
changeset
|
151 |
3abba3d4aef1
Register and PlatformKind declarations for AVX512.
Roland Schatz <roland.schatz@oracle.com>
parents:
22579
diff
changeset
|
152 public boolean isMask() { |
3abba3d4aef1
Register and PlatformKind declarations for AVX512.
Roland Schatz <roland.schatz@oracle.com>
parents:
22579
diff
changeset
|
153 switch (this) { |
3abba3d4aef1
Register and PlatformKind declarations for AVX512.
Roland Schatz <roland.schatz@oracle.com>
parents:
22579
diff
changeset
|
154 case MASK8: |
3abba3d4aef1
Register and PlatformKind declarations for AVX512.
Roland Schatz <roland.schatz@oracle.com>
parents:
22579
diff
changeset
|
155 case MASK16: |
3abba3d4aef1
Register and PlatformKind declarations for AVX512.
Roland Schatz <roland.schatz@oracle.com>
parents:
22579
diff
changeset
|
156 case MASK32: |
3abba3d4aef1
Register and PlatformKind declarations for AVX512.
Roland Schatz <roland.schatz@oracle.com>
parents:
22579
diff
changeset
|
157 case MASK64: |
3abba3d4aef1
Register and PlatformKind declarations for AVX512.
Roland Schatz <roland.schatz@oracle.com>
parents:
22579
diff
changeset
|
158 return true; |
3abba3d4aef1
Register and PlatformKind declarations for AVX512.
Roland Schatz <roland.schatz@oracle.com>
parents:
22579
diff
changeset
|
159 default: |
3abba3d4aef1
Register and PlatformKind declarations for AVX512.
Roland Schatz <roland.schatz@oracle.com>
parents:
22579
diff
changeset
|
160 return false; |
3abba3d4aef1
Register and PlatformKind declarations for AVX512.
Roland Schatz <roland.schatz@oracle.com>
parents:
22579
diff
changeset
|
161 } |
22579
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
162 } |
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
163 |
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
164 public char getTypeChar() { |
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
165 switch (this) { |
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
166 case BYTE: |
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
167 return 'b'; |
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
168 case WORD: |
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
169 return 'w'; |
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
170 case DWORD: |
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
171 return 'd'; |
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
172 case QWORD: |
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
173 return 'q'; |
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
174 case SINGLE: |
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
175 return 'S'; |
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
176 case DOUBLE: |
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
177 return 'D'; |
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
178 case V32_BYTE: |
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
179 case V32_WORD: |
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
180 case V64_BYTE: |
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
181 case V64_WORD: |
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
182 case V64_DWORD: |
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
183 return 'v'; |
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
184 case V128_BYTE: |
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
185 case V128_WORD: |
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
186 case V128_DWORD: |
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
187 case V128_QWORD: |
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
188 case V128_SINGLE: |
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
189 case V128_DOUBLE: |
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
190 return 'x'; |
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
191 case V256_BYTE: |
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
192 case V256_WORD: |
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
193 case V256_DWORD: |
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
194 case V256_QWORD: |
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
195 case V256_SINGLE: |
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
196 case V256_DOUBLE: |
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
197 return 'y'; |
22640
3abba3d4aef1
Register and PlatformKind declarations for AVX512.
Roland Schatz <roland.schatz@oracle.com>
parents:
22579
diff
changeset
|
198 case V512_BYTE: |
3abba3d4aef1
Register and PlatformKind declarations for AVX512.
Roland Schatz <roland.schatz@oracle.com>
parents:
22579
diff
changeset
|
199 case V512_WORD: |
3abba3d4aef1
Register and PlatformKind declarations for AVX512.
Roland Schatz <roland.schatz@oracle.com>
parents:
22579
diff
changeset
|
200 case V512_DWORD: |
3abba3d4aef1
Register and PlatformKind declarations for AVX512.
Roland Schatz <roland.schatz@oracle.com>
parents:
22579
diff
changeset
|
201 case V512_QWORD: |
3abba3d4aef1
Register and PlatformKind declarations for AVX512.
Roland Schatz <roland.schatz@oracle.com>
parents:
22579
diff
changeset
|
202 case V512_SINGLE: |
3abba3d4aef1
Register and PlatformKind declarations for AVX512.
Roland Schatz <roland.schatz@oracle.com>
parents:
22579
diff
changeset
|
203 case V512_DOUBLE: |
3abba3d4aef1
Register and PlatformKind declarations for AVX512.
Roland Schatz <roland.schatz@oracle.com>
parents:
22579
diff
changeset
|
204 return 'z'; |
3abba3d4aef1
Register and PlatformKind declarations for AVX512.
Roland Schatz <roland.schatz@oracle.com>
parents:
22579
diff
changeset
|
205 case MASK8: |
3abba3d4aef1
Register and PlatformKind declarations for AVX512.
Roland Schatz <roland.schatz@oracle.com>
parents:
22579
diff
changeset
|
206 case MASK16: |
3abba3d4aef1
Register and PlatformKind declarations for AVX512.
Roland Schatz <roland.schatz@oracle.com>
parents:
22579
diff
changeset
|
207 case MASK32: |
3abba3d4aef1
Register and PlatformKind declarations for AVX512.
Roland Schatz <roland.schatz@oracle.com>
parents:
22579
diff
changeset
|
208 case MASK64: |
3abba3d4aef1
Register and PlatformKind declarations for AVX512.
Roland Schatz <roland.schatz@oracle.com>
parents:
22579
diff
changeset
|
209 return 'k'; |
22579
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
210 default: |
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
211 return '-'; |
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
212 } |
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
213 } |
c7d9aa0c44fa
Use AMD64Kind instead of JavaKind in AMD64 backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
214 } |