10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
23 */
24
25 /**
26 * @test
27 * @bug 6932496
28 * @summary incorrect deopt of jsr subroutine on 64 bit c1
29 * @modules java.base/jdk.internal.org.objectweb.asm
30 * @run main/othervm -Xcomp -XX:CompileOnly=Test.test Test6932496
31 */
32 import java.lang.reflect.Method;
33 import java.nio.file.Files;
34 import java.nio.file.Paths;
35 import java.io.IOException;
36
37 import jdk.internal.org.objectweb.asm.ClassWriter;
38 import jdk.internal.org.objectweb.asm.MethodVisitor;
39 import jdk.internal.org.objectweb.asm.FieldVisitor;
40 import jdk.internal.org.objectweb.asm.Opcodes;
41 import jdk.internal.org.objectweb.asm.Type;
42 import jdk.internal.org.objectweb.asm.Label;
43
44 public class Test6932496 extends ClassLoader {
45 private static final int CLASS_FILE_VERSION = 49;
46 private static final String CLASS_TEST = "Test";
47 private static final String CLASS_OBJECT = "java/lang/Object";
48 private static final String METHOD_INIT = "<init>";
49 private static final String METHOD_TEST = "test";
50 private static final String DESC_VOID_METHOD = "()V";
51 private static final String FIELD_FLAG = "flag";
52
53 public static void main(String[] args) {
54 Test6932496 test = new Test6932496();
55 test.execute();
56 }
57
58 private void execute() {
59 byte[] bytecode = Test6932496.generateTestClass();
60
61 try {
62 Files.write(Paths.get("Test.class.dump"), bytecode);
63 } catch (IOException e) {
|
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
23 */
24
25 /**
26 * @test
27 * @bug 6932496
28 * @summary incorrect deopt of jsr subroutine on 64 bit c1
29 * @modules java.base/jdk.internal.org.objectweb.asm
30 *
31 * @run main/othervm -Xcomp
32 * -XX:CompileCommand=compileonly,compiler.c1.Test6932496::test
33 * compiler.c1.Test6932496
34 */
35
36 package compiler.c1;
37
38 import jdk.internal.org.objectweb.asm.ClassWriter;
39 import jdk.internal.org.objectweb.asm.FieldVisitor;
40 import jdk.internal.org.objectweb.asm.Label;
41 import jdk.internal.org.objectweb.asm.MethodVisitor;
42 import jdk.internal.org.objectweb.asm.Opcodes;
43 import jdk.internal.org.objectweb.asm.Type;
44
45 import java.io.IOException;
46 import java.lang.reflect.Method;
47 import java.nio.file.Files;
48 import java.nio.file.Paths;
49
50 public class Test6932496 extends ClassLoader {
51 private static final int CLASS_FILE_VERSION = 49;
52 private static final String CLASS_TEST = "Test";
53 private static final String CLASS_OBJECT = "java/lang/Object";
54 private static final String METHOD_INIT = "<init>";
55 private static final String METHOD_TEST = "test";
56 private static final String DESC_VOID_METHOD = "()V";
57 private static final String FIELD_FLAG = "flag";
58
59 public static void main(String[] args) {
60 Test6932496 test = new Test6932496();
61 test.execute();
62 }
63
64 private void execute() {
65 byte[] bytecode = Test6932496.generateTestClass();
66
67 try {
68 Files.write(Paths.get("Test.class.dump"), bytecode);
69 } catch (IOException e) {
|