annotate graal/com.oracle.graal.asm.amd64.test/src/com/oracle/graal/asm/amd64/test/BitOpsTest.java @ 21708:6df25b1418be

moved com.oracle.asm.** to jvmci-util.jar (JBS:GRAAL-53)
author Doug Simon <doug.simon@oracle.com>
date Wed, 03 Jun 2015 18:06:44 +0200
parents 5024c80224c7
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
18415
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
1 /*
19867
89c729e9e0a4 Refactoring of AMD64 code generation.
Roland Schatz <roland.schatz@oracle.com>
parents: 18415
diff changeset
2 * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
18415
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
4 *
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
5 * This code is free software; you can redistribute it and/or modify it
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
6 * under the terms of the GNU General Public License version 2 only, as
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
7 * published by the Free Software Foundation.
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
8 *
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
9 * This code is distributed in the hope that it will be useful, but WITHOUT
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
12 * version 2 for more details (a copy is included in the LICENSE file that
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
13 * accompanied this code).
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
14 *
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
15 * You should have received a copy of the GNU General Public License version
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
16 * 2 along with this work; if not, write to the Free Software Foundation,
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
18 *
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
20 * or visit www.oracle.com if you need additional information or have any
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
21 * questions.
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
22 */
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
23
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
24 package com.oracle.graal.asm.amd64.test;
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
25
21708
6df25b1418be moved com.oracle.asm.** to jvmci-util.jar (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents: 21673
diff changeset
26 import com.oracle.graal.asm.test.*;
21673
5024c80224c7 moved com.oracle.graal.[amd64|sparc] to com.oracle.jvmci.[amd64|sparc] (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents: 21556
diff changeset
27 import com.oracle.jvmci.amd64.*;
5024c80224c7 moved com.oracle.graal.[amd64|sparc] to com.oracle.jvmci.[amd64|sparc] (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents: 21556
diff changeset
28 import com.oracle.jvmci.amd64.AMD64.*;
21708
6df25b1418be moved com.oracle.asm.** to jvmci-util.jar (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents: 21673
diff changeset
29 import com.oracle.jvmci.asm.amd64.*;
21556
48c1ebd24120 renamed com.oracle.graal.api[meta|code] modules to com.oracle.jvmci.[meta|code] (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents: 21541
diff changeset
30 import com.oracle.jvmci.code.RegisterConfig;
48c1ebd24120 renamed com.oracle.graal.api[meta|code] modules to com.oracle.jvmci.[meta|code] (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents: 21541
diff changeset
31 import com.oracle.jvmci.code.TargetDescription;
48c1ebd24120 renamed com.oracle.graal.api[meta|code] modules to com.oracle.jvmci.[meta|code] (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents: 21541
diff changeset
32 import com.oracle.jvmci.code.Register;
48c1ebd24120 renamed com.oracle.graal.api[meta|code] modules to com.oracle.jvmci.[meta|code] (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents: 21541
diff changeset
33 import com.oracle.jvmci.code.CallingConvention;
48c1ebd24120 renamed com.oracle.graal.api[meta|code] modules to com.oracle.jvmci.[meta|code] (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents: 21541
diff changeset
34 import com.oracle.jvmci.code.CompilationResult;
48c1ebd24120 renamed com.oracle.graal.api[meta|code] modules to com.oracle.jvmci.[meta|code] (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents: 21541
diff changeset
35 import com.oracle.jvmci.meta.Kind;
21673
5024c80224c7 moved com.oracle.graal.[amd64|sparc] to com.oracle.jvmci.[amd64|sparc] (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents: 21556
diff changeset
36
21708
6df25b1418be moved com.oracle.asm.** to jvmci-util.jar (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents: 21673
diff changeset
37 import static com.oracle.jvmci.asm.amd64.AMD64Assembler.AMD64RMOp.*;
6df25b1418be moved com.oracle.asm.** to jvmci-util.jar (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents: 21673
diff changeset
38 import static com.oracle.jvmci.asm.amd64.AMD64Assembler.OperandSize.*;
21556
48c1ebd24120 renamed com.oracle.graal.api[meta|code] modules to com.oracle.jvmci.[meta|code] (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents: 21541
diff changeset
39 import static com.oracle.jvmci.code.ValueUtil.*;
21541
5e868236654f moved UnsafeAccess to com.oracle.jvmci.common (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents: 19867
diff changeset
40 import static com.oracle.jvmci.common.UnsafeAccess.*;
18415
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
41 import static org.junit.Assume.*;
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
42
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
43 import java.lang.reflect.*;
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
44 import java.util.*;
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
45
19867
89c729e9e0a4 Refactoring of AMD64 code generation.
Roland Schatz <roland.schatz@oracle.com>
parents: 18415
diff changeset
46 import org.junit.*;
89c729e9e0a4 Refactoring of AMD64 code generation.
Roland Schatz <roland.schatz@oracle.com>
parents: 18415
diff changeset
47
18415
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
48 public class BitOpsTest extends AssemblerTest {
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
49 private static boolean lzcntSupported;
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
50 private static boolean tzcntSupported;
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
51
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
52 @Before
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
53 public void checkAMD64() {
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
54 assumeTrue("skipping AMD64 specific test", codeCache.getTarget().arch instanceof AMD64);
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
55 EnumSet<CPUFeature> features = ((AMD64) codeCache.getTarget().arch).getFeatures();
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
56 lzcntSupported = features.contains(CPUFeature.LZCNT);
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
57 tzcntSupported = features.contains(CPUFeature.BMI1);
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
58 }
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
59
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
60 @Test
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
61 public void lzcntlTest() {
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
62 if (lzcntSupported) {
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
63 CodeGenTest test = new CodeGenTest() {
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
64
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
65 @Override
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
66 public byte[] generateCode(CompilationResult compResult, TargetDescription target, RegisterConfig registerConfig, CallingConvention cc) {
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
67 AMD64Assembler asm = new AMD64Assembler(target, registerConfig);
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
68 Register ret = registerConfig.getReturnRegister(Kind.Int);
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
69 Register arg = asRegister(cc.getArgument(0));
19867
89c729e9e0a4 Refactoring of AMD64 code generation.
Roland Schatz <roland.schatz@oracle.com>
parents: 18415
diff changeset
70 LZCNT.emit(asm, DWORD, ret, arg);
18415
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
71 asm.ret(0);
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
72 return asm.close(true);
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
73 }
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
74 };
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
75 assertReturn("intStub", test, 31, 1);
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
76 }
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
77 }
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
78
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
79 @Test
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
80 public void lzcntlMemTest() {
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
81 if (lzcntSupported) {
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
82 CodeGenTest test = new CodeGenTest() {
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
83
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
84 @Override
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
85 public byte[] generateCode(CompilationResult compResult, TargetDescription target, RegisterConfig registerConfig, CallingConvention cc) {
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
86 AMD64Assembler asm = new AMD64Assembler(target, registerConfig);
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
87 Register ret = registerConfig.getReturnRegister(Kind.Int);
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
88 try {
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
89 Field f = IntField.class.getDeclaredField("x");
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
90 AMD64Address arg = new AMD64Address(asRegister(cc.getArgument(0)), (int) unsafe.objectFieldOffset(f));
19867
89c729e9e0a4 Refactoring of AMD64 code generation.
Roland Schatz <roland.schatz@oracle.com>
parents: 18415
diff changeset
91 LZCNT.emit(asm, DWORD, ret, arg);
18415
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
92 asm.ret(0);
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
93 return asm.close(true);
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
94 } catch (Exception e) {
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
95 throw new RuntimeException("exception while trying to generate field access:", e);
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
96 }
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
97 }
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
98 };
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
99 assertReturn("intFieldStub", test, 31, new IntField(1));
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
100 }
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
101 }
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
102
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
103 @Test
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
104 public void lzcntqTest() {
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
105 if (lzcntSupported) {
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
106 CodeGenTest test = new CodeGenTest() {
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
107
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
108 @Override
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
109 public byte[] generateCode(CompilationResult compResult, TargetDescription target, RegisterConfig registerConfig, CallingConvention cc) {
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
110 AMD64Assembler asm = new AMD64Assembler(target, registerConfig);
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
111 Register ret = registerConfig.getReturnRegister(Kind.Int);
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
112 Register arg = asRegister(cc.getArgument(0));
19867
89c729e9e0a4 Refactoring of AMD64 code generation.
Roland Schatz <roland.schatz@oracle.com>
parents: 18415
diff changeset
113 LZCNT.emit(asm, QWORD, ret, arg);
18415
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
114 asm.ret(0);
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
115 return asm.close(true);
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
116 }
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
117 };
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
118 assertReturn("longStub", test, 63, 1L);
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
119 }
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
120 }
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
121
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
122 @Test
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
123 public void lzcntqMemTest() {
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
124 if (lzcntSupported) {
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
125 CodeGenTest test = new CodeGenTest() {
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
126
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
127 @Override
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
128 public byte[] generateCode(CompilationResult compResult, TargetDescription target, RegisterConfig registerConfig, CallingConvention cc) {
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
129 AMD64Assembler asm = new AMD64Assembler(target, registerConfig);
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
130 Register ret = registerConfig.getReturnRegister(Kind.Int);
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
131 try {
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
132 Field f = LongField.class.getDeclaredField("x");
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
133 AMD64Address arg = new AMD64Address(asRegister(cc.getArgument(0)), (int) unsafe.objectFieldOffset(f));
19867
89c729e9e0a4 Refactoring of AMD64 code generation.
Roland Schatz <roland.schatz@oracle.com>
parents: 18415
diff changeset
134 LZCNT.emit(asm, QWORD, ret, arg);
18415
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
135 asm.ret(0);
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
136 return asm.close(true);
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
137 } catch (Exception e) {
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
138 throw new RuntimeException("exception while trying to generate field access:", e);
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
139 }
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
140 }
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
141 };
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
142 assertReturn("longFieldStub", test, 63, new LongField(1));
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
143 }
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
144 }
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
145
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
146 @Test
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
147 public void tzcntlTest() {
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
148 if (tzcntSupported) {
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
149 CodeGenTest test = new CodeGenTest() {
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
150
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
151 @Override
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
152 public byte[] generateCode(CompilationResult compResult, TargetDescription target, RegisterConfig registerConfig, CallingConvention cc) {
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
153 AMD64Assembler asm = new AMD64Assembler(target, registerConfig);
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
154 Register ret = registerConfig.getReturnRegister(Kind.Int);
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
155 Register arg = asRegister(cc.getArgument(0));
19867
89c729e9e0a4 Refactoring of AMD64 code generation.
Roland Schatz <roland.schatz@oracle.com>
parents: 18415
diff changeset
156 TZCNT.emit(asm, DWORD, ret, arg);
18415
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
157 asm.ret(0);
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
158 return asm.close(true);
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
159 }
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
160 };
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
161 assertReturn("intStub", test, 31, 0x8000_0000);
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
162 }
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
163 }
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
164
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
165 @Test
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
166 public void tzcntlMemTest() {
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
167 if (tzcntSupported) {
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
168 CodeGenTest test = new CodeGenTest() {
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
169
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
170 @Override
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
171 public byte[] generateCode(CompilationResult compResult, TargetDescription target, RegisterConfig registerConfig, CallingConvention cc) {
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
172 AMD64Assembler asm = new AMD64Assembler(target, registerConfig);
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
173 Register ret = registerConfig.getReturnRegister(Kind.Int);
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
174 try {
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
175 Field f = IntField.class.getDeclaredField("x");
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
176 AMD64Address arg = new AMD64Address(asRegister(cc.getArgument(0)), (int) unsafe.objectFieldOffset(f));
19867
89c729e9e0a4 Refactoring of AMD64 code generation.
Roland Schatz <roland.schatz@oracle.com>
parents: 18415
diff changeset
177 TZCNT.emit(asm, DWORD, ret, arg);
18415
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
178 asm.ret(0);
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
179 return asm.close(true);
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
180 } catch (Exception e) {
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
181 throw new RuntimeException("exception while trying to generate field access:", e);
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
182 }
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
183 }
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
184 };
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
185 assertReturn("intFieldStub", test, 31, new IntField(0x8000_0000));
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
186 }
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
187 }
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
188
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
189 @Test
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
190 public void tzcntqTest() {
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
191 if (tzcntSupported) {
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
192 CodeGenTest test = new CodeGenTest() {
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
193
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
194 @Override
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
195 public byte[] generateCode(CompilationResult compResult, TargetDescription target, RegisterConfig registerConfig, CallingConvention cc) {
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
196 AMD64Assembler asm = new AMD64Assembler(target, registerConfig);
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
197 Register ret = registerConfig.getReturnRegister(Kind.Int);
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
198 Register arg = asRegister(cc.getArgument(0));
19867
89c729e9e0a4 Refactoring of AMD64 code generation.
Roland Schatz <roland.schatz@oracle.com>
parents: 18415
diff changeset
199 TZCNT.emit(asm, QWORD, ret, arg);
18415
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
200 asm.ret(0);
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
201 return asm.close(true);
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
202 }
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
203 };
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
204 assertReturn("longStub", test, 63, 0x8000_0000_0000_0000L);
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
205 }
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
206 }
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
207
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
208 @Test
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
209 public void tzcntqMemTest() {
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
210 if (tzcntSupported) {
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
211 CodeGenTest test = new CodeGenTest() {
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
212
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
213 @Override
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
214 public byte[] generateCode(CompilationResult compResult, TargetDescription target, RegisterConfig registerConfig, CallingConvention cc) {
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
215 AMD64Assembler asm = new AMD64Assembler(target, registerConfig);
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
216 Register ret = registerConfig.getReturnRegister(Kind.Int);
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
217 try {
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
218 Field f = LongField.class.getDeclaredField("x");
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
219 AMD64Address arg = new AMD64Address(asRegister(cc.getArgument(0)), (int) unsafe.objectFieldOffset(f));
19867
89c729e9e0a4 Refactoring of AMD64 code generation.
Roland Schatz <roland.schatz@oracle.com>
parents: 18415
diff changeset
220 TZCNT.emit(asm, QWORD, ret, arg);
18415
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
221 asm.ret(0);
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
222 return asm.close(true);
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
223 } catch (Exception e) {
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
224 throw new RuntimeException("exception while trying to generate field access:", e);
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
225 }
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
226 }
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
227 };
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
228 assertReturn("longFieldStub", test, 63, new LongField(0x8000_0000_0000_0000L));
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
229 }
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
230 }
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
231
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
232 @SuppressWarnings("unused")
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
233 public static int intStub(int arg) {
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
234 return 0;
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
235 }
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
236
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
237 @SuppressWarnings("unused")
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
238 public static int longStub(long arg) {
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
239 return 0;
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
240 }
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
241
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
242 public static class IntField {
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
243 public int x;
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
244
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
245 IntField(int x) {
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
246 this.x = x;
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
247 }
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
248 }
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
249
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
250 public static class LongField {
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
251 public long x;
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
252
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
253 LongField(long x) {
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
254 this.x = x;
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
255 }
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
256 }
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
257
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
258 @SuppressWarnings("unused")
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
259 public static int intFieldStub(IntField arg) {
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
260 return 0;
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
261 }
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
262
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
263 @SuppressWarnings("unused")
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
264 public static int longFieldStub(LongField arg) {
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
265 return 0;
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
266 }
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
267 }