Wed, 27 Nov 2013 16:16:21 -0800
8029015: PPC64 (part 216): opto: trap based null and range checks
Summary: On PPC64 use tdi instruction that does a compare and raises SIGTRAP for NULL and range checks.
Reviewed-by: kvn
goetz@6458 | 1 | /* |
goetz@6458 | 2 | * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. |
goetz@6458 | 3 | * Copyright 2012, 2013 SAP AG. All rights reserved. |
goetz@6458 | 4 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
goetz@6458 | 5 | * |
goetz@6458 | 6 | * This code is free software; you can redistribute it and/or modify it |
goetz@6458 | 7 | * under the terms of the GNU General Public License version 2 only, as |
goetz@6458 | 8 | * published by the Free Software Foundation. Oracle designates this |
goetz@6458 | 9 | * particular file as subject to the "Classpath" exception as provided |
goetz@6458 | 10 | * by Oracle in the LICENSE file that accompanied this code. |
goetz@6458 | 11 | * |
goetz@6458 | 12 | * This code is distributed in the hope that it will be useful, but WITHOUT |
goetz@6458 | 13 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
goetz@6458 | 14 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
goetz@6458 | 15 | * version 2 for more details (a copy is included in the LICENSE file that |
goetz@6458 | 16 | * accompanied this code). |
goetz@6458 | 17 | * |
goetz@6458 | 18 | * You should have received a copy of the GNU General Public License version |
goetz@6458 | 19 | * 2 along with this work; if not, write to the Free Software Foundation, |
goetz@6458 | 20 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
goetz@6458 | 21 | * |
goetz@6458 | 22 | * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
goetz@6458 | 23 | * or visit www.oracle.com if you need additional information or have any |
goetz@6458 | 24 | * questions. |
goetz@6458 | 25 | */ |
goetz@6458 | 26 | |
goetz@6458 | 27 | #ifndef CPU_PPC_VM_JNI_PPC_H |
goetz@6458 | 28 | #define CPU_PPC_VM_JNI_PPC_H |
goetz@6458 | 29 | |
goetz@6458 | 30 | // Note: please do not change these without also changing jni_md.h in the JDK |
goetz@6458 | 31 | // repository |
goetz@6458 | 32 | #ifndef __has_attribute |
goetz@6458 | 33 | #define __has_attribute(x) 0 |
goetz@6458 | 34 | #endif |
goetz@6458 | 35 | #if (defined(__GNUC__) && ((__GNUC__ > 4) || (__GNUC__ == 4) && (__GNUC_MINOR__ > 2))) || __has_attribute(visibility) |
goetz@6458 | 36 | #define JNIEXPORT __attribute__((visibility("default"))) |
goetz@6458 | 37 | #define JNIIMPORT __attribute__((visibility("default"))) |
goetz@6458 | 38 | #else |
goetz@6458 | 39 | #define JNIEXPORT |
goetz@6458 | 40 | #define JNIIMPORT |
goetz@6458 | 41 | #endif |
goetz@6458 | 42 | |
goetz@6458 | 43 | #define JNICALL |
goetz@6458 | 44 | typedef int jint; |
goetz@6458 | 45 | #if defined(_LP64) |
goetz@6458 | 46 | typedef long jlong; |
goetz@6458 | 47 | #else |
goetz@6458 | 48 | typedef long long jlong; |
goetz@6458 | 49 | #endif |
goetz@6458 | 50 | |
goetz@6458 | 51 | typedef signed char jbyte; |
goetz@6458 | 52 | |
goetz@6458 | 53 | #endif // CPU_PPC_VM_JNI_PPC_H |