]> git.pld-linux.org Git - packages/openjdk9.git/blob - x32.patch
'zero assembly' VM for x32
[packages/openjdk9.git] / x32.patch
1 diff -durN jdk8u-jdk8u66-b02.orig/common/autoconf/platform.m4 jdk8u-jdk8u66-b02/common/autoconf/platform.m4
2 --- jdk8u-jdk8u66-b02.orig/common/autoconf/platform.m4  2015-07-17 09:35:23.000000000 +0200
3 +++ jdk8u-jdk8u66-b02/common/autoconf/platform.m4       2015-09-21 13:18:18.439165925 +0200
4 @@ -31,10 +31,20 @@
5    # First argument is the cpu name from the trip/quad
6    case "$1" in
7      x86_64)
8 -      VAR_CPU=x86_64
9 -      VAR_CPU_ARCH=x86
10 -      VAR_CPU_BITS=64
11 -      VAR_CPU_ENDIAN=little
12 +      case "$target_os" in
13 +        *x32)
14 +          VAR_CPU=x32
15 +          VAR_CPU_ARCH=x86
16 +          VAR_CPU_BITS=32
17 +          VAR_CPU_ENDIAN=little
18 +          ;;
19 +        *)
20 +          VAR_CPU=x86_64
21 +          VAR_CPU_ARCH=x86
22 +          VAR_CPU_BITS=64
23 +          VAR_CPU_ENDIAN=little
24 +          ;;
25 +      esac
26        ;;
27      i?86)
28        VAR_CPU=x86
29 @@ -375,7 +385,16 @@
30      ppc64)   ZERO_ARCHDEF=PPC64 ;;
31      s390*)   ZERO_ARCHDEF=S390  ;;
32      sparc*)  ZERO_ARCHDEF=SPARC ;;
33 -    x86_64*) ZERO_ARCHDEF=AMD64 ;;
34 +    x86_64*)
35 +      case "$target_os" in
36 +        *x32)
37 +          ZERO_ARCHDEF=X32
38 +          ;;
39 +        *)
40 +          ZERO_ARCHDEF=AMD64
41 +          ;;
42 +      esac
43 +      ;;
44      x86)     ZERO_ARCHDEF=IA32  ;;
45      *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
46    esac
47 diff -durN jdk8u-jdk8u66-b02.orig/hotspot/src/os/linux/vm/os_linux.cpp jdk8u-jdk8u66-b02/hotspot/src/os/linux/vm/os_linux.cpp
48 --- jdk8u-jdk8u66-b02.orig/hotspot/src/os/linux/vm/os_linux.cpp 2015-09-21 13:05:51.883678088 +0200
49 +++ jdk8u-jdk8u66-b02/hotspot/src/os/linux/vm/os_linux.cpp      2015-09-21 13:12:58.665870862 +0200
50 @@ -1902,7 +1902,7 @@
51  
52    #if  (defined IA32)
53      static  Elf32_Half running_arch_code=EM_386;
54 -  #elif   (defined AMD64)
55 +  #elif  (defined AMD64) || (defined X32)
56      static  Elf32_Half running_arch_code=EM_X86_64;
57    #elif  (defined IA64)
58      static  Elf32_Half running_arch_code=EM_IA_64;
59 diff -durN jdk8u-jdk8u66-b02.orig/jdk/make/gensrc/GensrcX11Wrappers.gmk jdk8u-jdk8u66-b02/jdk/make/gensrc/GensrcX11Wrappers.gmk
60 --- jdk8u-jdk8u66-b02.orig/jdk/make/gensrc/GensrcX11Wrappers.gmk        2015-07-23 16:17:35.000000000 +0200
61 +++ jdk8u-jdk8u66-b02/jdk/make/gensrc/GensrcX11Wrappers.gmk     2015-09-21 13:13:00.339291213 +0200
62 @@ -87,9 +87,11 @@
63         $(TOOL_WRAPPERGENERATOR) $(@D) $(GENSRC_SIZER_DIR)/xlibtypes.txt "sizer" $*
64  
65    # use -m32/-m64 only if the compiler supports it
66 +  ifneq ($(OPENJDK_TARGET_CPU),x32)
67    ifeq ($(COMPILER_SUPPORTS_TARGET_BITS_FLAG), true)
68      MEMORY_MODEL_FLAG="$(COMPILER_TARGET_BITS_FLAG)$*"
69    endif
70 +  endif
71  
72    # Compile the C code into an executable.
73    $(GENSRC_X11WRAPPERS_TMP)/sizer.%.exe: $(GENSRC_X11WRAPPERS_TMP)/sizer.%.c
74 diff -durN jdk8u-jdk8u66-b02.orig/jdk/src/solaris/native/java/net/PlainDatagramSocketImpl.c jdk8u-jdk8u66-b02/jdk/src/solaris/native/java/net/PlainDatagramSocketImpl.c
75 --- jdk8u-jdk8u66-b02.orig/jdk/src/solaris/native/java/net/PlainDatagramSocketImpl.c    2015-07-23 16:17:35.000000000 +0200
76 +++ jdk8u-jdk8u66-b02/jdk/src/solaris/native/java/net/PlainDatagramSocketImpl.c 2015-09-21 13:13:00.335957707 +0200
77 @@ -35,7 +35,6 @@
78  #endif
79  #ifdef __linux__
80  #include <unistd.h>
81 -#include <sys/sysctl.h>
82  #include <sys/utsname.h>
83  #include <netinet/ip.h>
84  
85 diff -durN jdk8u-jdk8u66-b02.orig/jdk/src/solaris/native/java/net/PlainSocketImpl.c jdk8u-jdk8u66-b02/jdk/src/solaris/native/java/net/PlainSocketImpl.c
86 --- jdk8u-jdk8u66-b02.orig/jdk/src/solaris/native/java/net/PlainSocketImpl.c    2015-07-23 16:17:35.000000000 +0200
87 +++ jdk8u-jdk8u66-b02/jdk/src/solaris/native/java/net/PlainSocketImpl.c 2015-09-21 13:13:00.335957707 +0200
88 @@ -43,7 +43,6 @@
89  #endif
90  #ifdef __linux__
91  #include <unistd.h>
92 -#include <sys/sysctl.h>
93  #endif
94  
95  #include "jvm.h"
96  
97 --- jdk8u-jdk8u66-b02.orig/common/autoconf/toolchain.m4 2015-07-17 09:35:23.000000000 +0200
98 +++ jdk8u-jdk8u66-b02/common/autoconf/toolchain.m4      2015-09-21 16:00:30.328673989 +0200
99 @@ -361,6 +361,7 @@
100    # Option used to tell the compiler whether to create 32- or 64-bit executables
101    # Notice that CC contains the full compiler path at this point.
102    case $CC in
103 +    *x32-*) COMPILER_TARGET_BITS_FLAG="-mx";;
104      *xlc_r) COMPILER_TARGET_BITS_FLAG="-q";;
105      *)      COMPILER_TARGET_BITS_FLAG="-m";;
106    esac
107
108 --- jdk8u-jdk8u66-b02.orig/hotspot/src/cpu/zero/vm/frame_zero.cpp       2015-07-22 19:12:56.000000000 +0200
109 +++ jdk8u-jdk8u66-b02/hotspot/src/cpu/zero/vm/frame_zero.cpp    2015-09-21 15:28:59.680331993 +0200
110 @@ -216,7 +216,7 @@
111      valuebuf[buflen - 1] = '\0';
112  
113      // Print the result
114 -    st->print_cr(" " PTR_FORMAT ": %-21s = %s", addr, fieldbuf, valuebuf);
115 +    st->print_cr(" " PTR_FORMAT ": %-21s = %s", (uintptr_t)addr, fieldbuf, valuebuf);
116    }
117  }
118  
This page took 0.071771 seconds and 3 git commands to generate.