Wed, 27 Apr 2016 01:25:04 +0800
Initial load
http://hg.openjdk.java.net/jdk8u/jdk8u/hotspot/
changeset: 6782:28b50d07f6f8
tag: jdk8u25-b17
aoqi@0 | 1 | /* |
aoqi@0 | 2 | * Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved. |
aoqi@0 | 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
aoqi@0 | 4 | * |
aoqi@0 | 5 | * This code is free software; you can redistribute it and/or modify it |
aoqi@0 | 6 | * under the terms of the GNU General Public License version 2 only, as |
aoqi@0 | 7 | * published by the Free Software Foundation. |
aoqi@0 | 8 | * |
aoqi@0 | 9 | * This code is distributed in the hope that it will be useful, but WITHOUT |
aoqi@0 | 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
aoqi@0 | 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
aoqi@0 | 12 | * version 2 for more details (a copy is included in the LICENSE file that |
aoqi@0 | 13 | * accompanied this code). |
aoqi@0 | 14 | * |
aoqi@0 | 15 | * You should have received a copy of the GNU General Public License version |
aoqi@0 | 16 | * 2 along with this work; if not, write to the Free Software Foundation, |
aoqi@0 | 17 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
aoqi@0 | 18 | * |
aoqi@0 | 19 | * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
aoqi@0 | 20 | * or visit www.oracle.com if you need additional information or have any |
aoqi@0 | 21 | * questions. |
aoqi@0 | 22 | * |
aoqi@0 | 23 | */ |
aoqi@0 | 24 | |
aoqi@0 | 25 | #ifndef SHARE_VM_ADLC_ADLC_HPP |
aoqi@0 | 26 | #define SHARE_VM_ADLC_ADLC_HPP |
aoqi@0 | 27 | |
aoqi@0 | 28 | // |
aoqi@0 | 29 | // Standard include file for ADLC parser |
aoqi@0 | 30 | // |
aoqi@0 | 31 | |
aoqi@0 | 32 | // standard library constants |
aoqi@0 | 33 | #include "stdio.h" |
aoqi@0 | 34 | #include "stdlib.h" |
aoqi@0 | 35 | #include <iostream> |
aoqi@0 | 36 | #include "string.h" |
aoqi@0 | 37 | #include "ctype.h" |
aoqi@0 | 38 | #include "stdarg.h" |
aoqi@0 | 39 | #include <sys/types.h> |
aoqi@0 | 40 | |
aoqi@0 | 41 | #if _MSC_VER >= 1300 |
aoqi@0 | 42 | using namespace std; |
aoqi@0 | 43 | #endif |
aoqi@0 | 44 | |
aoqi@0 | 45 | #if _MSC_VER >= 1400 |
aoqi@0 | 46 | #define strdup _strdup |
aoqi@0 | 47 | #endif |
aoqi@0 | 48 | |
aoqi@0 | 49 | /* Make sure that we have the intptr_t and uintptr_t definitions */ |
aoqi@0 | 50 | #ifdef _WIN32 |
aoqi@0 | 51 | #ifndef _INTPTR_T_DEFINED |
aoqi@0 | 52 | #ifdef _WIN64 |
aoqi@0 | 53 | typedef __int64 intptr_t; |
aoqi@0 | 54 | #else |
aoqi@0 | 55 | typedef int intptr_t; |
aoqi@0 | 56 | #endif |
aoqi@0 | 57 | #define _INTPTR_T_DEFINED |
aoqi@0 | 58 | #endif |
aoqi@0 | 59 | |
aoqi@0 | 60 | #ifndef _UINTPTR_T_DEFINED |
aoqi@0 | 61 | #ifdef _WIN64 |
aoqi@0 | 62 | typedef unsigned __int64 uintptr_t; |
aoqi@0 | 63 | #else |
aoqi@0 | 64 | typedef unsigned int uintptr_t; |
aoqi@0 | 65 | #endif |
aoqi@0 | 66 | #define _UINTPTR_T_DEFINED |
aoqi@0 | 67 | #endif |
aoqi@0 | 68 | #endif // _WIN32 |
aoqi@0 | 69 | |
aoqi@0 | 70 | #if defined(LINUX) || defined(_ALLBSD_SOURCE) |
aoqi@0 | 71 | #include <inttypes.h> |
aoqi@0 | 72 | #endif // LINUX || _ALLBSD_SOURCE |
aoqi@0 | 73 | |
aoqi@0 | 74 | // Macros |
aoqi@0 | 75 | #define uint32 unsigned int |
aoqi@0 | 76 | #define uint unsigned int |
aoqi@0 | 77 | |
aoqi@0 | 78 | // VM components |
aoqi@0 | 79 | #include "opto/opcodes.hpp" |
aoqi@0 | 80 | |
aoqi@0 | 81 | // Macros |
aoqi@0 | 82 | // Debugging note: Put a breakpoint on "abort". |
aoqi@0 | 83 | #undef assert |
aoqi@0 | 84 | #define assert(cond, msg) { if (!(cond)) { fprintf(stderr, "assert fails %s %d: %s\n", __FILE__, __LINE__, msg); abort(); }} |
aoqi@0 | 85 | #undef max |
aoqi@0 | 86 | #define max(a, b) (((a)>(b)) ? (a) : (b)) |
aoqi@0 | 87 | |
aoqi@0 | 88 | // ADLC components |
aoqi@0 | 89 | #include "arena.hpp" |
aoqi@0 | 90 | #include "opto/adlcVMDeps.hpp" |
aoqi@0 | 91 | #include "filebuff.hpp" |
aoqi@0 | 92 | #include "dict2.hpp" |
aoqi@0 | 93 | #include "forms.hpp" |
aoqi@0 | 94 | #include "formsopt.hpp" |
aoqi@0 | 95 | #include "formssel.hpp" |
aoqi@0 | 96 | #include "archDesc.hpp" |
aoqi@0 | 97 | #include "adlparse.hpp" |
aoqi@0 | 98 | |
aoqi@0 | 99 | // globally define ArchDesc for convenience. Alternatively every form |
aoqi@0 | 100 | // could have a backpointer to the AD but it's too complicated to pass |
aoqi@0 | 101 | // it everywhere it needs to be available. |
aoqi@0 | 102 | extern ArchDesc* globalAD; |
aoqi@0 | 103 | |
aoqi@0 | 104 | #endif // SHARE_VM_ADLC_ADLC_HPP |