annotate graal/com.oracle.graal.asm.amd64.test/src/com/oracle/graal/asm/amd64/test/BitOpsTest.java @ 19867:89c729e9e0a4

Refactoring of AMD64 code generation.
author Roland Schatz <roland.schatz@oracle.com>
date Mon, 16 Mar 2015 15:12:22 +0100
parents 6dc4f0be9a70
children 5e868236654f
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
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
26 import static com.oracle.graal.api.code.ValueUtil.*;
19867
89c729e9e0a4 Refactoring of AMD64 code generation.
Roland Schatz <roland.schatz@oracle.com>
parents: 18415
diff changeset
27 import static com.oracle.graal.asm.amd64.AMD64Assembler.AMD64RMOp.*;
89c729e9e0a4 Refactoring of AMD64 code generation.
Roland Schatz <roland.schatz@oracle.com>
parents: 18415
diff changeset
28 import static com.oracle.graal.asm.amd64.AMD64Assembler.OperandSize.*;
18415
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
29 import static com.oracle.graal.compiler.common.UnsafeAccess.*;
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
30 import static org.junit.Assume.*;
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
31
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
32 import java.lang.reflect.*;
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
33 import java.util.*;
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
34
19867
89c729e9e0a4 Refactoring of AMD64 code generation.
Roland Schatz <roland.schatz@oracle.com>
parents: 18415
diff changeset
35 import org.junit.*;
89c729e9e0a4 Refactoring of AMD64 code generation.
Roland Schatz <roland.schatz@oracle.com>
parents: 18415
diff changeset
36
18415
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
37 import com.oracle.graal.amd64.*;
19867
89c729e9e0a4 Refactoring of AMD64 code generation.
Roland Schatz <roland.schatz@oracle.com>
parents: 18415
diff changeset
38 import com.oracle.graal.amd64.AMD64.CPUFeature;
18415
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
39 import com.oracle.graal.api.code.*;
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
40 import com.oracle.graal.api.meta.*;
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
41 import com.oracle.graal.asm.amd64.*;
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
42 import com.oracle.graal.asm.test.*;
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
43
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
44 public class BitOpsTest extends AssemblerTest {
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
45 private static boolean lzcntSupported;
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
46 private static boolean tzcntSupported;
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
47
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
48 @Before
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
49 public void checkAMD64() {
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
50 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
51 EnumSet<CPUFeature> features = ((AMD64) codeCache.getTarget().arch).getFeatures();
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
52 lzcntSupported = features.contains(CPUFeature.LZCNT);
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
53 tzcntSupported = features.contains(CPUFeature.BMI1);
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
54 }
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
55
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
56 @Test
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
57 public void lzcntlTest() {
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
58 if (lzcntSupported) {
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
59 CodeGenTest test = new CodeGenTest() {
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
60
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
61 @Override
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
62 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
63 AMD64Assembler asm = new AMD64Assembler(target, registerConfig);
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
64 Register ret = registerConfig.getReturnRegister(Kind.Int);
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
65 Register arg = asRegister(cc.getArgument(0));
19867
89c729e9e0a4 Refactoring of AMD64 code generation.
Roland Schatz <roland.schatz@oracle.com>
parents: 18415
diff changeset
66 LZCNT.emit(asm, DWORD, ret, arg);
18415
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
67 asm.ret(0);
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
68 return asm.close(true);
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
69 }
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
70 };
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
71 assertReturn("intStub", test, 31, 1);
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
72 }
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 @Test
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
76 public void lzcntlMemTest() {
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
77 if (lzcntSupported) {
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
78 CodeGenTest test = new CodeGenTest() {
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
79
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
80 @Override
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
81 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
82 AMD64Assembler asm = new AMD64Assembler(target, registerConfig);
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
83 Register ret = registerConfig.getReturnRegister(Kind.Int);
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
84 try {
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
85 Field f = IntField.class.getDeclaredField("x");
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
86 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
87 LZCNT.emit(asm, DWORD, ret, arg);
18415
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
88 asm.ret(0);
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
89 return asm.close(true);
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
90 } catch (Exception e) {
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
91 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
92 }
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
93 }
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
94 };
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
95 assertReturn("intFieldStub", test, 31, new IntField(1));
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 @Test
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
100 public void lzcntqTest() {
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
101 if (lzcntSupported) {
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
102 CodeGenTest test = new CodeGenTest() {
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
103
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
104 @Override
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
105 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
106 AMD64Assembler asm = new AMD64Assembler(target, registerConfig);
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
107 Register ret = registerConfig.getReturnRegister(Kind.Int);
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
108 Register arg = asRegister(cc.getArgument(0));
19867
89c729e9e0a4 Refactoring of AMD64 code generation.
Roland Schatz <roland.schatz@oracle.com>
parents: 18415
diff changeset
109 LZCNT.emit(asm, QWORD, ret, arg);
18415
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
110 asm.ret(0);
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
111 return asm.close(true);
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
112 }
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
113 };
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
114 assertReturn("longStub", test, 63, 1L);
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
115 }
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 @Test
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
119 public void lzcntqMemTest() {
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
120 if (lzcntSupported) {
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
121 CodeGenTest test = new CodeGenTest() {
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
122
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
123 @Override
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
124 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
125 AMD64Assembler asm = new AMD64Assembler(target, registerConfig);
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
126 Register ret = registerConfig.getReturnRegister(Kind.Int);
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
127 try {
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
128 Field f = LongField.class.getDeclaredField("x");
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
129 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
130 LZCNT.emit(asm, QWORD, ret, arg);
18415
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
131 asm.ret(0);
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
132 return asm.close(true);
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
133 } catch (Exception e) {
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
134 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
135 }
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
136 }
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
137 };
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
138 assertReturn("longFieldStub", test, 63, new LongField(1));
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 @Test
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
143 public void tzcntlTest() {
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
144 if (tzcntSupported) {
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
145 CodeGenTest test = new CodeGenTest() {
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
146
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
147 @Override
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
148 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
149 AMD64Assembler asm = new AMD64Assembler(target, registerConfig);
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
150 Register ret = registerConfig.getReturnRegister(Kind.Int);
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
151 Register arg = asRegister(cc.getArgument(0));
19867
89c729e9e0a4 Refactoring of AMD64 code generation.
Roland Schatz <roland.schatz@oracle.com>
parents: 18415
diff changeset
152 TZCNT.emit(asm, DWORD, ret, arg);
18415
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
153 asm.ret(0);
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
154 return asm.close(true);
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
155 }
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
156 };
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
157 assertReturn("intStub", test, 31, 0x8000_0000);
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
158 }
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 @Test
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
162 public void tzcntlMemTest() {
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
163 if (tzcntSupported) {
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
164 CodeGenTest test = new CodeGenTest() {
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
165
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
166 @Override
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
167 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
168 AMD64Assembler asm = new AMD64Assembler(target, registerConfig);
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
169 Register ret = registerConfig.getReturnRegister(Kind.Int);
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
170 try {
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
171 Field f = IntField.class.getDeclaredField("x");
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
172 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
173 TZCNT.emit(asm, DWORD, ret, arg);
18415
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
174 asm.ret(0);
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
175 return asm.close(true);
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
176 } catch (Exception e) {
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
177 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
178 }
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
179 }
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
180 };
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
181 assertReturn("intFieldStub", test, 31, new IntField(0x8000_0000));
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 @Test
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
186 public void tzcntqTest() {
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
187 if (tzcntSupported) {
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
188 CodeGenTest test = new CodeGenTest() {
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
189
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
190 @Override
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
191 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
192 AMD64Assembler asm = new AMD64Assembler(target, registerConfig);
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
193 Register ret = registerConfig.getReturnRegister(Kind.Int);
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
194 Register arg = asRegister(cc.getArgument(0));
19867
89c729e9e0a4 Refactoring of AMD64 code generation.
Roland Schatz <roland.schatz@oracle.com>
parents: 18415
diff changeset
195 TZCNT.emit(asm, QWORD, ret, arg);
18415
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
196 asm.ret(0);
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
197 return asm.close(true);
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
198 }
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
199 };
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
200 assertReturn("longStub", test, 63, 0x8000_0000_0000_0000L);
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
201 }
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 @Test
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
205 public void tzcntqMemTest() {
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
206 if (tzcntSupported) {
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
207 CodeGenTest test = new CodeGenTest() {
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
208
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
209 @Override
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
210 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
211 AMD64Assembler asm = new AMD64Assembler(target, registerConfig);
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
212 Register ret = registerConfig.getReturnRegister(Kind.Int);
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
213 try {
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
214 Field f = LongField.class.getDeclaredField("x");
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
215 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
216 TZCNT.emit(asm, QWORD, ret, arg);
18415
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
217 asm.ret(0);
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
218 return asm.close(true);
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
219 } catch (Exception e) {
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
220 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
221 }
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
222 }
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
223 };
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
224 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
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 @SuppressWarnings("unused")
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
229 public static int intStub(int arg) {
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
230 return 0;
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
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
233 @SuppressWarnings("unused")
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
234 public static int longStub(long arg) {
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
235 return 0;
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
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
238 public static class IntField {
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
239 public int x;
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 IntField(int x) {
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
242 this.x = x;
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
243 }
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
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
246 public static class LongField {
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
247 public long x;
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 LongField(long x) {
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
250 this.x = x;
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
251 }
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
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
254 @SuppressWarnings("unused")
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
255 public static int intFieldStub(IntField arg) {
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
256 return 0;
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
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
259 @SuppressWarnings("unused")
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
260 public static int longFieldStub(LongField arg) {
6dc4f0be9a70 Add support of lzcnt and tzcnt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff changeset
261 return 0;
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 }