Tue, 03 Aug 2010 08:13:38 -0400
6953477: Increase portability and flexibility of building Hotspot
Summary: A collection of portability improvements including shared code support for PPC, ARM platforms, software floating point, cross compilation support and improvements in error crash detail.
Reviewed-by: phh, never, coleenp, dholmes
duke@435 | 1 | /* |
trims@1907 | 2 | * Copyright (c) 2004, 2009, Oracle and/or its affiliates. All rights reserved. |
duke@435 | 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
duke@435 | 4 | * |
duke@435 | 5 | * This code is free software; you can redistribute it and/or modify it |
duke@435 | 6 | * under the terms of the GNU General Public License version 2 only, as |
duke@435 | 7 | * published by the Free Software Foundation. |
duke@435 | 8 | * |
duke@435 | 9 | * This code is distributed in the hope that it will be useful, but WITHOUT |
duke@435 | 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
duke@435 | 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
duke@435 | 12 | * version 2 for more details (a copy is included in the LICENSE file that |
duke@435 | 13 | * accompanied this code). |
duke@435 | 14 | * |
duke@435 | 15 | * You should have received a copy of the GNU General Public License version |
duke@435 | 16 | * 2 along with this work; if not, write to the Free Software Foundation, |
duke@435 | 17 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
duke@435 | 18 | * |
trims@1907 | 19 | * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
trims@1907 | 20 | * or visit www.oracle.com if you need additional information or have any |
trims@1907 | 21 | * questions. |
duke@435 | 22 | * |
duke@435 | 23 | */ |
duke@435 | 24 | |
duke@435 | 25 | |
duke@435 | 26 | #ifdef AMD64 |
duke@435 | 27 | typedef unsigned char UBYTE; |
duke@435 | 28 | |
duke@435 | 29 | #define UNW_FLAG_EHANDLER 0x01 |
duke@435 | 30 | #define UNW_FLAG_UHANDLER 0x02 |
duke@435 | 31 | #define UNW_FLAG_CHAININFO 0x04 |
duke@435 | 32 | |
duke@435 | 33 | // This structure is used to define an UNWIND_INFO that |
duke@435 | 34 | // only has an ExceptionHandler. There are no UnwindCodes |
duke@435 | 35 | // declared. |
duke@435 | 36 | typedef struct _UNWIND_INFO_EH_ONLY { |
duke@435 | 37 | UBYTE Version : 3; |
duke@435 | 38 | UBYTE Flags : 5; |
duke@435 | 39 | UBYTE SizeOfProlog; |
duke@435 | 40 | UBYTE CountOfCodes; |
duke@435 | 41 | UBYTE FrameRegister : 4; |
duke@435 | 42 | UBYTE FrameOffset : 4; |
duke@435 | 43 | union { |
duke@435 | 44 | OPTIONAL ULONG ExceptionHandler; |
duke@435 | 45 | OPTIONAL ULONG FunctionEntry; |
duke@435 | 46 | }; |
duke@435 | 47 | OPTIONAL ULONG ExceptionData[1]; |
duke@435 | 48 | } UNWIND_INFO_EH_ONLY, *PUNWIND_INFO_EH_ONLY; |
duke@435 | 49 | |
duke@435 | 50 | |
duke@435 | 51 | /* |
duke@435 | 52 | typedef struct _RUNTIME_FUNCTION { |
duke@435 | 53 | ULONG BeginAddress; |
duke@435 | 54 | ULONG EndAddress; |
duke@435 | 55 | ULONG UnwindData; |
duke@435 | 56 | } RUNTIME_FUNCTION, *PRUNTIME_FUNCTION; |
duke@435 | 57 | */ |
duke@435 | 58 | |
duke@435 | 59 | typedef struct _DISPATCHER_CONTEXT { |
duke@435 | 60 | ULONG64 ControlPc; |
duke@435 | 61 | ULONG64 ImageBase; |
duke@435 | 62 | PRUNTIME_FUNCTION FunctionEntry; |
duke@435 | 63 | ULONG64 EstablisherFrame; |
duke@435 | 64 | ULONG64 TargetIp; |
duke@435 | 65 | PCONTEXT ContextRecord; |
duke@435 | 66 | // PEXCEPTION_ROUTINE LanguageHandler; |
duke@435 | 67 | char * LanguageHandler; // double dependency problem |
duke@435 | 68 | PVOID HandlerData; |
duke@435 | 69 | } DISPATCHER_CONTEXT, *PDISPATCHER_CONTEXT; |
duke@435 | 70 | |
kvn@1080 | 71 | #if MSC_VER < 1500 |
kvn@1080 | 72 | |
kvn@1080 | 73 | /* Not needed for VS2008 compiler, comes from winnt.h. */ |
duke@435 | 74 | typedef EXCEPTION_DISPOSITION (*PEXCEPTION_ROUTINE) ( |
duke@435 | 75 | IN PEXCEPTION_RECORD ExceptionRecord, |
duke@435 | 76 | IN ULONG64 EstablisherFrame, |
duke@435 | 77 | IN OUT PCONTEXT ContextRecord, |
duke@435 | 78 | IN OUT PDISPATCHER_CONTEXT DispatcherContext |
duke@435 | 79 | ); |
duke@435 | 80 | |
kvn@1080 | 81 | #endif |
kvn@1080 | 82 | |
duke@435 | 83 | #endif // AMD64 |