summaryrefslogtreecommitdiffstats
path: root/recipes-core/icedtea/icedtea6-native-1.7.5/icedtea-hotspot-make-arch-sane-for-x86.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-core/icedtea/icedtea6-native-1.7.5/icedtea-hotspot-make-arch-sane-for-x86.patch')
-rw-r--r--recipes-core/icedtea/icedtea6-native-1.7.5/icedtea-hotspot-make-arch-sane-for-x86.patch1130
1 files changed, 1130 insertions, 0 deletions
diff --git a/recipes-core/icedtea/icedtea6-native-1.7.5/icedtea-hotspot-make-arch-sane-for-x86.patch b/recipes-core/icedtea/icedtea6-native-1.7.5/icedtea-hotspot-make-arch-sane-for-x86.patch
new file mode 100644
index 0000000..9d7b9bb
--- /dev/null
+++ b/recipes-core/icedtea/icedtea6-native-1.7.5/icedtea-hotspot-make-arch-sane-for-x86.patch
@@ -0,0 +1,1130 @@
1From b8a51665ada45e3beb0823c03c025d5514f5e745 Mon Sep 17 00:00:00 2001
2From: woglinde <woglinde@rhein.zuhause.netz>
3Date: Thu, 22 Oct 2009 16:35:25 +0200
4Subject: [PATCH] hotspot: make arch sane for x86
5
6diff --git openjdk/hotspot/agent/make/saenv.sh openjdk/hotspot/agent/make/saenv.sh
7index 38e0f78..64c8410 100644
8--- openjdk/hotspot/agent/make/saenv.sh
9+++ openjdk/hotspot/agent/make/saenv.sh
10@@ -43,9 +43,9 @@ if [ "$OS" = "Linux" ]; then
11 OPTIONS="-Dsa.library.path=$SA_LIBPATH"
12 CPU=amd64
13 else
14- SA_LIBPATH=$STARTDIR/../src/os/linux/i386:$STARTDIR/linux/i386
15+ SA_LIBPATH=$STARTDIR/../src/os/linux/x86:$STARTDIR/linux/x86
16 OPTIONS="-Dsa.library.path=$SA_LIBPATH"
17- CPU=i386
18+ CPU=x86
19 fi
20 else
21 SA_LIBPATH=$STARTDIR/../src/os/solaris/proc/`uname -p`:$STARTDIR/solaris/`uname -p`
22diff --git openjdk/hotspot/make/defs.make openjdk/hotspot/make/defs.make
23index 83ddd1a..c20c7eb 100644
24--- openjdk/hotspot/make/defs.make
25+++ openjdk/hotspot/make/defs.make
26@@ -207,7 +207,7 @@ ifneq ($(OSNAME),windows)
27 ifdef LP64
28 BUILDARCH = amd64
29 else
30- BUILDARCH = i486
31+ BUILDARCH = x86
32 endif
33 endif
34 ifeq ($(BUILDARCH), sparc)
35@@ -218,7 +218,7 @@ ifneq ($(OSNAME),windows)
36
37 # LIBARCH is 1:1 mapping from BUILDARCH
38 LIBARCH = $(LIBARCH/$(BUILDARCH))
39- LIBARCH/i486 = i386
40+ LIBARCH/x86 = x86
41 LIBARCH/amd64 = amd64
42 LIBARCH/sparc = sparc
43 LIBARCH/sparcv9 = sparcv9
44diff --git openjdk/hotspot/make/jprt.config openjdk/hotspot/make/jprt.config
45index bc82543..4a1ef4e 100644
46--- openjdk/hotspot/make/jprt.config
47+++ openjdk/hotspot/make/jprt.config
48@@ -111,7 +111,7 @@ elif [ "${osname}" = Linux ] ; then
49 # LINUX: X86, AMD64
50 osarch=`uname -m`
51 if [ "${osarch}" = i686 ] ; then
52- linux_arch=i586
53+ linux_arch=x86
54 elif [ "${osarch}" = x86_64 ] ; then
55 linux_arch=amd64
56 fi
57diff --git openjdk/hotspot/make/jprt.properties openjdk/hotspot/make/jprt.properties
58index eb2ce82..7193de0 100644
59--- openjdk/hotspot/make/jprt.properties
60+++ openjdk/hotspot/make/jprt.properties
61@@ -70,7 +70,7 @@ jprt.my.solaris.x64.jdk6u10=solaris_x64_5.10
62 jprt.my.solaris.x64.jdk6u14=solaris_x64_5.10
63 jprt.my.solaris.x64=${jprt.my.solaris.x64.${jprt.tools.default.release}}
64
65-jprt.my.linux.i586=linux_i586
66+jprt.my.linux.x86=linux_x86
67 jprt.my.linux.x64=linux_x64
68 jprt.my.windows.i586=windows_i586
69 jprt.my.windows.x64=windows_x64
70@@ -201,30 +201,30 @@ jprt.my.solaris.i586.test.targets= \
71 ${jprt.my.solaris.i586}-{product|fastdebug}-{c1|c2}-scimark_2, \
72 ${jprt.my.solaris.i586}-{product|fastdebug}-{c1|c2}-scimark_3
73
74-jprt.my.linux.i586.test.targets = \
75- ${jprt.my.linux.i586}-{product|fastdebug}-{c1|c2}-jvm98, \
76- ${jprt.my.linux.i586}-{product|fastdebug}-{c1|c2}-scimark, \
77- ${jprt.my.linux.i586}-product-c1-runThese_Xcomp, \
78- ${jprt.my.linux.i586}-product-c1-runThese_Xcomp_2, \
79- ${jprt.my.linux.i586}-product-c1-runThese_Xcomp_3, \
80- ${jprt.my.linux.i586}-fastdebug-c1-runThese_Xshare, \
81- ${jprt.my.linux.i586}-fastdebug-c2-runThese_Xcomp, \
82- ${jprt.my.linux.i586}-fastdebug-c2-runThese_Xcomp_2, \
83- ${jprt.my.linux.i586}-{product|fastdebug}-{c1|c2}-GCBasher_default, \
84- ${jprt.my.linux.i586}-{product|fastdebug}-{c1|c2}-GCBasher_SerialGC, \
85- ${jprt.my.linux.i586}-{product|fastdebug}-{c1|c2}-GCBasher_ParallelGC, \
86- ${jprt.my.linux.i586}-{product|fastdebug}-{c1|c2}-GCBasher_ParNewGC, \
87- ${jprt.my.linux.i586}-{product|fastdebug}-{c1|c2}-GCBasher_CMS, \
88- ${jprt.my.linux.i586}-product-{c1|c2}-GCOld_default, \
89- ${jprt.my.linux.i586}-product-{c1|c2}-GCOld_SerialGC, \
90- ${jprt.my.linux.i586}-product-{c1|c2}-GCOld_ParallelGC, \
91- ${jprt.my.linux.i586}-product-{c1|c2}-GCOld_ParNewGC, \
92- ${jprt.my.linux.i586}-product-{c1|c2}-GCOld_CMS, \
93- ${jprt.my.linux.i586}-{product|fastdebug}-c1-jbb_default, \
94- ${jprt.my.linux.i586}-{product|fastdebug}-c1-jbb_ParallelGC, \
95- ${jprt.my.linux.i586}-{product|fastdebug}-c1-jbb_CMS, \
96- ${jprt.my.linux.i586}-{product|fastdebug}-c2-scimark_2, \
97- ${jprt.my.linux.i586}-{product|fastdebug}-c2-scimark_3
98+jprt.my.linux.x86.test.targets = \
99+ ${jprt.my.linux.x86}-{product|fastdebug}-{c1|c2}-jvm98, \
100+ ${jprt.my.linux.x86}-{product|fastdebug}-{c1|c2}-scimark, \
101+ ${jprt.my.linux.x86}-product-c1-runThese_Xcomp, \
102+ ${jprt.my.linux.x86}-product-c1-runThese_Xcomp_2, \
103+ ${jprt.my.linux.x86}-product-c1-runThese_Xcomp_3, \
104+ ${jprt.my.linux.x86}-fastdebug-c1-runThese_Xshare, \
105+ ${jprt.my.linux.x86}-fastdebug-c2-runThese_Xcomp, \
106+ ${jprt.my.linux.x86}-fastdebug-c2-runThese_Xcomp_2, \
107+ ${jprt.my.linux.x86}-{product|fastdebug}-{c1|c2}-GCBasher_default, \
108+ ${jprt.my.linux.x86}-{product|fastdebug}-{c1|c2}-GCBasher_SerialGC, \
109+ ${jprt.my.linux.x86}-{product|fastdebug}-{c1|c2}-GCBasher_ParallelGC, \
110+ ${jprt.my.linux.x86}-{product|fastdebug}-{c1|c2}-GCBasher_ParNewGC, \
111+ ${jprt.my.linux.x86}-{product|fastdebug}-{c1|c2}-GCBasher_CMS, \
112+ ${jprt.my.linux.x86}-product-{c1|c2}-GCOld_default, \
113+ ${jprt.my.linux.x86}-product-{c1|c2}-GCOld_SerialGC, \
114+ ${jprt.my.linux.x86}-product-{c1|c2}-GCOld_ParallelGC, \
115+ ${jprt.my.linux.x86}-product-{c1|c2}-GCOld_ParNewGC, \
116+ ${jprt.my.linux.x86}-product-{c1|c2}-GCOld_CMS, \
117+ ${jprt.my.linux.x86}-{product|fastdebug}-c1-jbb_default, \
118+ ${jprt.my.linux.x86}-{product|fastdebug}-c1-jbb_ParallelGC, \
119+ ${jprt.my.linux.x86}-{product|fastdebug}-c1-jbb_CMS, \
120+ ${jprt.my.linux.x86}-{product|fastdebug}-c2-scimark_2, \
121+ ${jprt.my.linux.x86}-{product|fastdebug}-c2-scimark_3
122
123 jprt.my.linux.x64.test.targets = \
124 ${jprt.my.linux.x64}-{product|fastdebug}-c2-jvm98, \
125@@ -294,7 +294,7 @@ jprt.test.targets = \
126 ${jprt.my.solaris.sparcv9.test.targets}, \
127 ${jprt.my.solaris.i586.test.targets}, \
128 ${jprt.my.solaris.x64.test.targets}, \
129- ${jprt.my.linux.i586.test.targets}, \
130+ ${jprt.my.linux.x86.test.targets}, \
131 ${jprt.my.linux.x64.test.targets}, \
132 ${jprt.my.windows.i586.test.targets}, \
133 ${jprt.my.windows.x64.test.targets}
134diff --git openjdk/hotspot/make/linux/build.sh openjdk/hotspot/make/linux/build.sh
135index e317fdd..5d3b1ff 100644
136--- openjdk/hotspot/make/linux/build.sh
137+++ openjdk/hotspot/make/linux/build.sh
138@@ -43,7 +43,7 @@ esac
139
140 case `uname -m` in
141 i386|i486|i586|i686)
142- mach=i386
143+ mach=x86
144 ;;
145 *)
146 echo "Unsupported machine: " `uname -m`
147diff --git openjdk/hotspot/make/linux/makefiles/buildtree.make openjdk/hotspot/make/linux/makefiles/buildtree.make
148index add9823..cbbf81f 100644
149--- openjdk/hotspot/make/linux/makefiles/buildtree.make
150+++ openjdk/hotspot/make/linux/makefiles/buildtree.make
151@@ -30,7 +30,7 @@
152 # The macros ARCH, GAMMADIR, OS_FAMILY and VARIANT must be defined in the
153 # environment or on the command-line:
154 #
155-# ARCH - sparc, i486, ... HotSpot cpu and os_cpu source directory
156+# ARCH - sparc, x86, ... HotSpot cpu and os_cpu source directory
157 # BUILDARCH - build directory
158 # LIBARCH - the corresponding directory in JDK/JRE
159 # GAMMADIR - top of workspace
160@@ -316,7 +316,7 @@ NO_JAVA_HOME_MSG = \
161 DATA_MODE = $(DATA_MODE/$(BUILDARCH))
162 JAVA_FLAG = $(JAVA_FLAG/$(DATA_MODE))
163
164-DATA_MODE/i486 = 32
165+DATA_MODE/x86 = 32
166 DATA_MODE/sparc = 32
167 DATA_MODE/sparcv9 = 64
168 DATA_MODE/amd64 = 64
169diff --git openjdk/hotspot/make/linux/makefiles/cscope.make openjdk/hotspot/make/linux/makefiles/cscope.make
170index 113d4f8..d3f06cb 100644
171--- openjdk/hotspot/make/linux/makefiles/cscope.make
172+++ openjdk/hotspot/make/linux/makefiles/cscope.make
173@@ -78,7 +78,7 @@ endif
174 # Processor-specific files for other processors are excluded by default. Use
175 # CS_CPU=x to include platform-specific files for other platforms.
176 ifndef CS_CPU
177-CS_CPU = i486 sparc amd64 ia64
178+CS_CPU = x86 sparc amd64 ia64
179 CS_PRUNE_CPU = $(patsubst %,-o -name '*%*',$(filter-out ${SRCARCH},${CS_CPU}))
180 endif
181
182diff --git openjdk/hotspot/make/linux/makefiles/defs.make openjdk/hotspot/make/linux/makefiles/defs.make
183index 9131c79..138dfb3 100644
184--- openjdk/hotspot/make/linux/makefiles/defs.make
185+++ openjdk/hotspot/make/linux/makefiles/defs.make
186@@ -85,6 +85,14 @@ ifeq ($(ARCH), sparc)
187 HS_ARCH = sparc
188 endif
189
190+# x86
191+ifeq ($(findstring 86,$(ARCH)), 86)
192+ ARCH_DATA_MODEL = 32
193+ PLATFORM = linux-x86
194+ VM_PLATFORM = linux_x86
195+ HS_ARCH = x86
196+endif
197+
198 # x86_64
199 ifeq ($(ARCH), x86_64)
200 ifeq ($(ARCH_DATA_MODEL), 64)
201@@ -95,22 +103,12 @@ ifeq ($(ARCH), x86_64)
202 HS_ARCH = x86
203 else
204 ARCH_DATA_MODEL = 32
205- PLATFORM = linux-i586
206- VM_PLATFORM = linux_i486
207+ PLATFORM = linux-x86
208+ VM_PLATFORM = linux_x86
209 HS_ARCH = x86
210- # We have to reset ARCH to i686 since SRCARCH relies on it
211- ARCH = i686
212 endif
213 endif
214
215-# i686
216-ifeq ($(ARCH), i686)
217- ARCH_DATA_MODEL = 32
218- PLATFORM = linux-i586
219- VM_PLATFORM = linux_i486
220- HS_ARCH = x86
221-endif
222-
223 JDK_INCLUDE_SUBDIR=linux
224
225 # FIXUP: The subdirectory for a debug build is NOT the same on all platforms
226diff --git openjdk/hotspot/make/linux/makefiles/sparcWorks.make openjdk/hotspot/make/linux/makefiles/sparcWorks.make
227index 0a9f75b..2e29bb9 100644
228--- openjdk/hotspot/make/linux/makefiles/sparcWorks.make
229+++ openjdk/hotspot/make/linux/makefiles/sparcWorks.make
230@@ -30,7 +30,7 @@ CC = cc
231 AS = $(CC) -c
232
233 ARCHFLAG = $(ARCHFLAG/$(BUILDARCH))
234-ARCHFLAG/i486 = -m32
235+ARCHFLAG/x86 = -m32
236 ARCHFLAG/amd64 = -m64
237
238 CFLAGS += $(ARCHFLAG)
239diff --git openjdk/hotspot/make/linux/platform_i486 openjdk/hotspot/make/linux/platform_i486
240deleted file mode 100644
241index 610ac91..0000000
242--- openjdk/hotspot/make/linux/platform_i486
243+++ /dev/null
244@@ -1,15 +0,0 @@
245-os_family = linux
246-
247-arch = x86
248-
249-arch_model = x86_32
250-
251-os_arch = linux_x86
252-
253-os_arch_model = linux_x86_32
254-
255-lib_arch = i386
256-
257-compiler = gcc
258-
259-sysdefs = -DLINUX -D_GNU_SOURCE -DIA32
260diff --git openjdk/hotspot/make/linux/platform_i486.suncc openjdk/hotspot/make/linux/platform_i486.suncc
261index 325a3fe..717fc75 100644
262--- openjdk/hotspot/make/linux/platform_i486.suncc
263+++ openjdk/hotspot/make/linux/platform_i486.suncc
264@@ -8,10 +8,10 @@ os_arch = linux_x86
265
266 os_arch_model = linux_x86_32
267
268-lib_arch = i386
269+lib_arch = x86
270
271 compiler = sparcWorks
272
273-gnu_dis_arch = i386
274+gnu_dis_arch = x86
275
276 sysdefs = -DLINUX -DSPARC_WORKS -D_GNU_SOURCE -DIA32
277diff --git openjdk/hotspot/make/linux/platform_x86 openjdk/hotspot/make/linux/platform_x86
278new file mode 100644
279index 0000000..5c613fe
280--- /dev/null
281+++ openjdk/hotspot/make/linux/platform_x86
282@@ -0,0 +1,15 @@
283+os_family = linux
284+
285+arch = x86
286+
287+arch_model = x86_32
288+
289+os_arch = linux_x86
290+
291+os_arch_model = linux_x86_32
292+
293+lib_arch = x86
294+
295+compiler = gcc
296+
297+sysdefs = -DLINUX -D_GNU_SOURCE -DIA32
298diff --git openjdk/hotspot/src/os/linux/vm/os_linux.cpp openjdk/hotspot/src/os/linux/vm/os_linux.cpp
299index b2b3162..a4bbe70 100644
300--- openjdk/hotspot/src/os/linux/vm/os_linux.cpp
301+++ openjdk/hotspot/src/os/linux/vm/os_linux.cpp
302@@ -164,7 +164,7 @@ bool os::have_special_privileges() {
303 // i386: 224, ia64: 1105, amd64: 186, sparc 143
304 #ifdef __ia64__
305 #define SYS_gettid 1105
306-#elif __i386__
307+#elif __x86__
308 #define SYS_gettid 224
309 #elif __amd64__
310 #define SYS_gettid 186
311@@ -181,7 +181,7 @@ static char cpu_arch[] = ZERO_LIBARCH;
312 #elif defined(IA64)
313 static char cpu_arch[] = "ia64";
314 #elif defined(IA32)
315-static char cpu_arch[] = "i386";
316+static char cpu_arch[] = "x86";
317 #elif defined(AMD64)
318 static char cpu_arch[] = "amd64";
319 #elif defined(SPARC)
320diff --git openjdk/hotspot/src/share/tools/hsdis/Makefile openjdk/hotspot/src/share/tools/hsdis/Makefile
321index 6bdf4b8..fd43c6e 100644
322--- openjdk/hotspot/src/share/tools/hsdis/Makefile
323+++ openjdk/hotspot/src/share/tools/hsdis/Makefile
324@@ -32,7 +32,7 @@ BINUTILS = $(shell cd ../../../../..;pwd)/binutils-2.17-$(LIBARCH)
325 endif
326
327 # Default arch; it is changed below as needed.
328-ARCH = i386
329+ARCH = x86
330 OS = $(shell uname)
331
332 CPPFLAGS += -I$(BINUTILS)/include -I$(BINUTILS)/bfd
333@@ -87,7 +87,7 @@ endif # SunOS
334 LIBARCH = $(ARCH)
335 ifdef LP64
336 LIBARCH64/sparc = sparcv9
337-LIBARCH64/i386 = amd64
338+LIBARCH64/x86 = amd64
339 LIBARCH64 = $(LIBARCH64/$(ARCH))
340 ifneq ($(LIBARCH64),)
341 LIBARCH = $(LIBARCH64)
342diff --git openjdk/hotspot/src/share/tools/hsdis/hsdis.c openjdk/hotspot/src/share/tools/hsdis/hsdis.c
343index 75b7efe..62c692b 100644
344--- openjdk/hotspot/src/share/tools/hsdis/hsdis.c
345+++ openjdk/hotspot/src/share/tools/hsdis/hsdis.c
346@@ -383,8 +383,8 @@ static void print_help(struct hsdis_app_data* app_data,
347 else
348 disassembler_usage(stderr); /* better than nothing */
349 (*printf_callback)(printf_stream, " mach=<arch> select disassembly mode\n");
350-#if defined(LIBARCH_i386) || defined(LIBARCH_amd64)
351- (*printf_callback)(printf_stream, " mach=i386 select 32-bit mode\n");
352+#if defined(LIBARCH_x86) || defined(LIBARCH_amd64)
353+ (*printf_callback)(printf_stream, " mach=x86 select 32-bit mode\n");
354 (*printf_callback)(printf_stream, " mach=x86-64 select 64-bit mode\n");
355 (*printf_callback)(printf_stream, " suffix always print instruction suffix\n");
356 #endif
357@@ -406,7 +406,7 @@ static const bfd_arch_info_type* find_arch_info(const char* arch_name) {
358 static const char* native_arch_name() {
359 const char* res = HOTSPOT_LIB_ARCH;
360 #ifdef LIBARCH_amd64
361- res = "i386:x86-64";
362+ res = "x86:x86-64";
363 #endif
364 #ifdef LIBARCH_sparc
365 res = "sparc:v8plusb";
366diff --git openjdk/hotspot/test/Makefile openjdk/hotspot/test/Makefile
367index 2596d85..c2f3eb9 100644
368--- openjdk/hotspot/test/Makefile
369+++ openjdk/hotspot/test/Makefile
370@@ -33,14 +33,14 @@ ifeq ($(OSNAME), SunOS)
371 PLATFORM = solaris
372 ARCH = $(shell uname -p)
373 ifeq ($(ARCH), i386)
374- ARCH=i586
375+ ARCH=x86
376 endif
377 endif
378 ifeq ($(OSNAME), Linux)
379 PLATFORM = linux
380 ARCH = $(shell uname -m)
381- ifeq ($(ARCH), i386)
382- ARCH = i586
383+ ifeq ($(findstring 86,$(ARCH)), 86)
384+ ARCH = x86
385 endif
386 endif
387 ifeq ($(OSNAME), Windows_NT)
388@@ -55,7 +55,7 @@ ifeq ($(OSNAME), Windows_NT)
389 ifeq ($(word 1, $(PROCESSOR_IDENTIFIER)),EM64T)
390 ARCH = x64
391 else
392- ARCH = i586
393+ ARCH = x86
394 endif
395 endif
396 endif
397diff --git openjdk/hotspot/agent/make/saenv.sh openjdk/hotspot/agent/make/saenv.sh
398index 38e0f78..64c8410 100644
399--- openjdk/hotspot/agent/make/saenv.sh
400+++ openjdk/hotspot/agent/make/saenv.sh
401@@ -43,9 +43,9 @@ if [ "$OS" = "Linux" ]; then
402 OPTIONS="-Dsa.library.path=$SA_LIBPATH"
403 CPU=amd64
404 else
405- SA_LIBPATH=$STARTDIR/../src/os/linux/i386:$STARTDIR/linux/i386
406+ SA_LIBPATH=$STARTDIR/../src/os/linux/x86:$STARTDIR/linux/x86
407 OPTIONS="-Dsa.library.path=$SA_LIBPATH"
408- CPU=i386
409+ CPU=x86
410 fi
411 else
412 SA_LIBPATH=$STARTDIR/../src/os/solaris/proc/`uname -p`:$STARTDIR/solaris/`uname -p`
413diff --git openjdk/hotspot/agent/src/os/linux/LinuxDebuggerLocal.c openjdk/hotspot/agent/src/os/linux/LinuxDebuggerLocal.c
414index c4ca7de..54c12ca 100644
415--- openjdk/hotspot/agent/src/os/linux/LinuxDebuggerLocal.c
416+++ openjdk/hotspot/agent/src/os/linux/LinuxDebuggerLocal.c
417@@ -29,7 +29,7 @@
418 #define amd64 1
419 #endif
420
421-#ifdef i386
422+#ifdef x86
423 #include "sun_jvm_hotspot_debugger_x86_X86ThreadContext.h"
424 #endif
425
426@@ -295,7 +295,7 @@ JNIEXPORT jlongArray JNICALL Java_sun_jvm_hotspot_debugger_linux_LinuxDebuggerLo
427 }
428
429 #undef NPRGREG
430-#ifdef i386
431+#ifdef x86
432 #define NPRGREG sun_jvm_hotspot_debugger_x86_X86ThreadContext_NPRGREG
433 #endif
434 #ifdef ia64
435@@ -314,7 +314,7 @@ JNIEXPORT jlongArray JNICALL Java_sun_jvm_hotspot_debugger_linux_LinuxDebuggerLo
436
437 #undef REG_INDEX
438
439-#ifdef i386
440+#ifdef x86
441 #define REG_INDEX(reg) sun_jvm_hotspot_debugger_x86_X86ThreadContext_##reg
442
443 regs[REG_INDEX(GS)] = (uintptr_t) gregs.xgs;
444@@ -333,7 +333,7 @@ JNIEXPORT jlongArray JNICALL Java_sun_jvm_hotspot_debugger_linux_LinuxDebuggerLo
445 regs[REG_INDEX(CS)] = (uintptr_t) gregs.xcs;
446 regs[REG_INDEX(SS)] = (uintptr_t) gregs.xss;
447
448-#endif /* i386 */
449+#endif /* x86 */
450
451 #if ia64
452 regs = (*env)->GetLongArrayElements(env, array, &isCopy);
453diff --git openjdk/hotspot/agent/src/os/linux/Makefile openjdk/hotspot/agent/src/os/linux/Makefile
454index a16f3a7..85fecb1 100644
455--- openjdk/hotspot/agent/src/os/linux/Makefile
456+++ openjdk/hotspot/agent/src/os/linux/Makefile
457@@ -22,7 +22,7 @@
458 #
459 #
460
461-ARCH := $(shell if ([ `uname -m` = "ia64" ]) ; then echo ia64 ; elif ([ `uname -m` = "x86_64" ]) ; then echo amd64; elif ([ `uname -m` = "sparc64" ]) ; then echo sparc; else echo i386 ; fi )
462+ARCH := $(shell if ([ `uname -m` = "ia64" ]) ; then echo ia64 ; elif ([ `uname -m` = "x86_64" ]) ; then echo amd64; elif ([ `uname -m` = "sparc64" ]) ; then echo sparc; else echo x86 ; fi )
463 GCC = gcc$(GCC_SUFFIX)
464
465 JAVAH = ${JAVA_HOME}/bin/javah
466diff --git openjdk/hotspot/agent/src/os/linux/ps_core.c openjdk/hotspot/agent/src/os/linux/ps_core.c
467index 3562f2d..47ab01b 100644
468--- openjdk/hotspot/agent/src/os/linux/ps_core.c
469+++ openjdk/hotspot/agent/src/os/linux/ps_core.c
470@@ -540,7 +540,7 @@ static bool core_handle_prstatus(struct ps_prochandle* ph, const char* buf, size
471
472 if (is_debug()) {
473 print_debug("integer regset\n");
474-#ifdef i386
475+#ifdef x86
476 // print the regset
477 print_debug("\teax = 0x%x\n", newthr->regs.eax);
478 print_debug("\tebx = 0x%x\n", newthr->regs.ebx);
479diff --git openjdk/hotspot/make/defs.make openjdk/hotspot/make/defs.make
480index 83ddd1a..c20c7eb 100644
481--- openjdk/hotspot/make/defs.make
482+++ openjdk/hotspot/make/defs.make
483@@ -207,7 +207,7 @@ ifneq ($(OSNAME),windows)
484 ifdef LP64
485 BUILDARCH = amd64
486 else
487- BUILDARCH = i486
488+ BUILDARCH = x86
489 endif
490 endif
491 ifeq ($(BUILDARCH), sparc)
492@@ -218,7 +218,7 @@ ifneq ($(OSNAME),windows)
493
494 # LIBARCH is 1:1 mapping from BUILDARCH
495 LIBARCH = $(LIBARCH/$(BUILDARCH))
496- LIBARCH/i486 = i386
497+ LIBARCH/x86 = x86
498 LIBARCH/amd64 = amd64
499 LIBARCH/sparc = sparc
500 LIBARCH/sparcv9 = sparcv9
501diff --git openjdk/hotspot/make/jprt.config openjdk/hotspot/make/jprt.config
502index bc82543..4a1ef4e 100644
503--- openjdk/hotspot/make/jprt.config
504+++ openjdk/hotspot/make/jprt.config
505@@ -111,7 +111,7 @@ elif [ "${osname}" = Linux ] ; then
506 # LINUX: X86, AMD64
507 osarch=`uname -m`
508 if [ "${osarch}" = i686 ] ; then
509- linux_arch=i586
510+ linux_arch=x86
511 elif [ "${osarch}" = x86_64 ] ; then
512 linux_arch=amd64
513 fi
514diff --git openjdk/hotspot/make/jprt.properties openjdk/hotspot/make/jprt.properties
515index eb2ce82..7193de0 100644
516--- openjdk/hotspot/make/jprt.properties
517+++ openjdk/hotspot/make/jprt.properties
518@@ -70,7 +70,7 @@ jprt.my.solaris.x64.jdk6u10=solaris_x64_5.10
519 jprt.my.solaris.x64.jdk6u14=solaris_x64_5.10
520 jprt.my.solaris.x64=${jprt.my.solaris.x64.${jprt.tools.default.release}}
521
522-jprt.my.linux.i586=linux_i586
523+jprt.my.linux.x86=linux_x86
524 jprt.my.linux.x64=linux_x64
525 jprt.my.windows.i586=windows_i586
526 jprt.my.windows.x64=windows_x64
527@@ -201,30 +201,30 @@ jprt.my.solaris.i586.test.targets= \
528 ${jprt.my.solaris.i586}-{product|fastdebug}-{c1|c2}-scimark_2, \
529 ${jprt.my.solaris.i586}-{product|fastdebug}-{c1|c2}-scimark_3
530
531-jprt.my.linux.i586.test.targets = \
532- ${jprt.my.linux.i586}-{product|fastdebug}-{c1|c2}-jvm98, \
533- ${jprt.my.linux.i586}-{product|fastdebug}-{c1|c2}-scimark, \
534- ${jprt.my.linux.i586}-product-c1-runThese_Xcomp, \
535- ${jprt.my.linux.i586}-product-c1-runThese_Xcomp_2, \
536- ${jprt.my.linux.i586}-product-c1-runThese_Xcomp_3, \
537- ${jprt.my.linux.i586}-fastdebug-c1-runThese_Xshare, \
538- ${jprt.my.linux.i586}-fastdebug-c2-runThese_Xcomp, \
539- ${jprt.my.linux.i586}-fastdebug-c2-runThese_Xcomp_2, \
540- ${jprt.my.linux.i586}-{product|fastdebug}-{c1|c2}-GCBasher_default, \
541- ${jprt.my.linux.i586}-{product|fastdebug}-{c1|c2}-GCBasher_SerialGC, \
542- ${jprt.my.linux.i586}-{product|fastdebug}-{c1|c2}-GCBasher_ParallelGC, \
543- ${jprt.my.linux.i586}-{product|fastdebug}-{c1|c2}-GCBasher_ParNewGC, \
544- ${jprt.my.linux.i586}-{product|fastdebug}-{c1|c2}-GCBasher_CMS, \
545- ${jprt.my.linux.i586}-product-{c1|c2}-GCOld_default, \
546- ${jprt.my.linux.i586}-product-{c1|c2}-GCOld_SerialGC, \
547- ${jprt.my.linux.i586}-product-{c1|c2}-GCOld_ParallelGC, \
548- ${jprt.my.linux.i586}-product-{c1|c2}-GCOld_ParNewGC, \
549- ${jprt.my.linux.i586}-product-{c1|c2}-GCOld_CMS, \
550- ${jprt.my.linux.i586}-{product|fastdebug}-c1-jbb_default, \
551- ${jprt.my.linux.i586}-{product|fastdebug}-c1-jbb_ParallelGC, \
552- ${jprt.my.linux.i586}-{product|fastdebug}-c1-jbb_CMS, \
553- ${jprt.my.linux.i586}-{product|fastdebug}-c2-scimark_2, \
554- ${jprt.my.linux.i586}-{product|fastdebug}-c2-scimark_3
555+jprt.my.linux.x86.test.targets = \
556+ ${jprt.my.linux.x86}-{product|fastdebug}-{c1|c2}-jvm98, \
557+ ${jprt.my.linux.x86}-{product|fastdebug}-{c1|c2}-scimark, \
558+ ${jprt.my.linux.x86}-product-c1-runThese_Xcomp, \
559+ ${jprt.my.linux.x86}-product-c1-runThese_Xcomp_2, \
560+ ${jprt.my.linux.x86}-product-c1-runThese_Xcomp_3, \
561+ ${jprt.my.linux.x86}-fastdebug-c1-runThese_Xshare, \
562+ ${jprt.my.linux.x86}-fastdebug-c2-runThese_Xcomp, \
563+ ${jprt.my.linux.x86}-fastdebug-c2-runThese_Xcomp_2, \
564+ ${jprt.my.linux.x86}-{product|fastdebug}-{c1|c2}-GCBasher_default, \
565+ ${jprt.my.linux.x86}-{product|fastdebug}-{c1|c2}-GCBasher_SerialGC, \
566+ ${jprt.my.linux.x86}-{product|fastdebug}-{c1|c2}-GCBasher_ParallelGC, \
567+ ${jprt.my.linux.x86}-{product|fastdebug}-{c1|c2}-GCBasher_ParNewGC, \
568+ ${jprt.my.linux.x86}-{product|fastdebug}-{c1|c2}-GCBasher_CMS, \
569+ ${jprt.my.linux.x86}-product-{c1|c2}-GCOld_default, \
570+ ${jprt.my.linux.x86}-product-{c1|c2}-GCOld_SerialGC, \
571+ ${jprt.my.linux.x86}-product-{c1|c2}-GCOld_ParallelGC, \
572+ ${jprt.my.linux.x86}-product-{c1|c2}-GCOld_ParNewGC, \
573+ ${jprt.my.linux.x86}-product-{c1|c2}-GCOld_CMS, \
574+ ${jprt.my.linux.x86}-{product|fastdebug}-c1-jbb_default, \
575+ ${jprt.my.linux.x86}-{product|fastdebug}-c1-jbb_ParallelGC, \
576+ ${jprt.my.linux.x86}-{product|fastdebug}-c1-jbb_CMS, \
577+ ${jprt.my.linux.x86}-{product|fastdebug}-c2-scimark_2, \
578+ ${jprt.my.linux.x86}-{product|fastdebug}-c2-scimark_3
579
580 jprt.my.linux.x64.test.targets = \
581 ${jprt.my.linux.x64}-{product|fastdebug}-c2-jvm98, \
582@@ -294,7 +294,7 @@ jprt.test.targets = \
583 ${jprt.my.solaris.sparcv9.test.targets}, \
584 ${jprt.my.solaris.i586.test.targets}, \
585 ${jprt.my.solaris.x64.test.targets}, \
586- ${jprt.my.linux.i586.test.targets}, \
587+ ${jprt.my.linux.x86.test.targets}, \
588 ${jprt.my.linux.x64.test.targets}, \
589 ${jprt.my.windows.i586.test.targets}, \
590 ${jprt.my.windows.x64.test.targets}
591diff --git openjdk/hotspot/make/linux/build.sh openjdk/hotspot/make/linux/build.sh
592index e317fdd..5d3b1ff 100644
593--- openjdk/hotspot/make/linux/build.sh
594+++ openjdk/hotspot/make/linux/build.sh
595@@ -43,7 +43,7 @@ esac
596
597 case `uname -m` in
598 i386|i486|i586|i686)
599- mach=i386
600+ mach=x86
601 ;;
602 *)
603 echo "Unsupported machine: " `uname -m`
604diff --git openjdk/hotspot/make/linux/makefiles/buildtree.make openjdk/hotspot/make/linux/makefiles/buildtree.make
605index add9823..cbbf81f 100644
606--- openjdk/hotspot/make/linux/makefiles/buildtree.make
607+++ openjdk/hotspot/make/linux/makefiles/buildtree.make
608@@ -30,7 +30,7 @@
609 # The macros ARCH, GAMMADIR, OS_FAMILY and VARIANT must be defined in the
610 # environment or on the command-line:
611 #
612-# ARCH - sparc, i486, ... HotSpot cpu and os_cpu source directory
613+# ARCH - sparc, x86, ... HotSpot cpu and os_cpu source directory
614 # BUILDARCH - build directory
615 # LIBARCH - the corresponding directory in JDK/JRE
616 # GAMMADIR - top of workspace
617@@ -316,7 +316,7 @@ NO_JAVA_HOME_MSG = \
618 DATA_MODE = $(DATA_MODE/$(BUILDARCH))
619 JAVA_FLAG = $(JAVA_FLAG/$(DATA_MODE))
620
621-DATA_MODE/i486 = 32
622+DATA_MODE/x86 = 32
623 DATA_MODE/sparc = 32
624 DATA_MODE/sparcv9 = 64
625 DATA_MODE/amd64 = 64
626diff --git openjdk/hotspot/make/linux/makefiles/cscope.make openjdk/hotspot/make/linux/makefiles/cscope.make
627index 113d4f8..d3f06cb 100644
628--- openjdk/hotspot/make/linux/makefiles/cscope.make
629+++ openjdk/hotspot/make/linux/makefiles/cscope.make
630@@ -78,7 +78,7 @@ endif
631 # Processor-specific files for other processors are excluded by default. Use
632 # CS_CPU=x to include platform-specific files for other platforms.
633 ifndef CS_CPU
634-CS_CPU = i486 sparc amd64 ia64
635+CS_CPU = x86 sparc amd64 ia64
636 CS_PRUNE_CPU = $(patsubst %,-o -name '*%*',$(filter-out ${SRCARCH},${CS_CPU}))
637 endif
638
639diff --git openjdk/hotspot/make/linux/makefiles/defs.make openjdk/hotspot/make/linux/makefiles/defs.make
640index 9131c79..138dfb3 100644
641--- openjdk/hotspot/make/linux/makefiles/defs.make
642+++ openjdk/hotspot/make/linux/makefiles/defs.make
643@@ -85,6 +85,14 @@ ifeq ($(ARCH), sparc)
644 HS_ARCH = sparc
645 endif
646
647+# x86
648+ifeq ($(findstring 86,$(ARCH)), 86)
649+ ARCH_DATA_MODEL = 32
650+ PLATFORM = linux-x86
651+ VM_PLATFORM = linux_x86
652+ HS_ARCH = x86
653+endif
654+
655 # x86_64
656 ifeq ($(ARCH), x86_64)
657 ifeq ($(ARCH_DATA_MODEL), 64)
658@@ -95,22 +103,12 @@ ifeq ($(ARCH), x86_64)
659 HS_ARCH = x86
660 else
661 ARCH_DATA_MODEL = 32
662- PLATFORM = linux-i586
663- VM_PLATFORM = linux_i486
664+ PLATFORM = linux-x86
665+ VM_PLATFORM = linux_x86
666 HS_ARCH = x86
667- # We have to reset ARCH to i686 since SRCARCH relies on it
668- ARCH = i686
669 endif
670 endif
671
672-# i686
673-ifeq ($(ARCH), i686)
674- ARCH_DATA_MODEL = 32
675- PLATFORM = linux-i586
676- VM_PLATFORM = linux_i486
677- HS_ARCH = x86
678-endif
679-
680 JDK_INCLUDE_SUBDIR=linux
681
682 # FIXUP: The subdirectory for a debug build is NOT the same on all platforms
683diff --git openjdk/hotspot/make/linux/makefiles/gcc.make openjdk/hotspot/make/linux/makefiles/gcc.make
684index a2c24bc..27bad01 100644
685--- openjdk/hotspot/make/linux/makefiles/gcc.make
686+++ openjdk/hotspot/make/linux/makefiles/gcc.make
687@@ -77,7 +77,7 @@ CFLAGS += -fcheck-new
688 CFLAGS += -g
689
690 ARCHFLAG = $(ARCHFLAG/$(BUILDARCH))
691-ARCHFLAG/i486 = -m32 -march=i586
692+ARCHFLAG/x86 = -m32
693 ARCHFLAG/amd64 = -m64
694 ARCHFLAG/ia64 =
695 ARCHFLAG/sparc = -m32 -mcpu=v9
696diff --git openjdk/hotspot/make/linux/makefiles/sparcWorks.make openjdk/hotspot/make/linux/makefiles/sparcWorks.make
697index 0a9f75b..2e29bb9 100644
698--- openjdk/hotspot/make/linux/makefiles/sparcWorks.make
699+++ openjdk/hotspot/make/linux/makefiles/sparcWorks.make
700@@ -30,7 +30,7 @@ CC = cc
701 AS = $(CC) -c
702
703 ARCHFLAG = $(ARCHFLAG/$(BUILDARCH))
704-ARCHFLAG/i486 = -m32
705+ARCHFLAG/x86 = -m32
706 ARCHFLAG/amd64 = -m64
707
708 CFLAGS += $(ARCHFLAG)
709diff --git openjdk/hotspot/make/linux/platform_i486 openjdk/hotspot/make/linux/platform_i486
710deleted file mode 100644
711index 610ac91..0000000
712--- openjdk/hotspot/make/linux/platform_i486
713+++ /dev/null
714@@ -1,15 +0,0 @@
715-os_family = linux
716-
717-arch = x86
718-
719-arch_model = x86_32
720-
721-os_arch = linux_x86
722-
723-os_arch_model = linux_x86_32
724-
725-lib_arch = i386
726-
727-compiler = gcc
728-
729-sysdefs = -DLINUX -D_GNU_SOURCE -DIA32
730diff --git openjdk/hotspot/make/linux/platform_i486.suncc openjdk/hotspot/make/linux/platform_i486.suncc
731deleted file mode 100644
732index 325a3fe..0000000
733--- openjdk/hotspot/make/linux/platform_i486.suncc
734+++ /dev/null
735@@ -1,17 +0,0 @@
736-os_family = linux
737-
738-arch = x86
739-
740-arch_model = x86_32
741-
742-os_arch = linux_x86
743-
744-os_arch_model = linux_x86_32
745-
746-lib_arch = i386
747-
748-compiler = sparcWorks
749-
750-gnu_dis_arch = i386
751-
752-sysdefs = -DLINUX -DSPARC_WORKS -D_GNU_SOURCE -DIA32
753diff --git openjdk/hotspot/make/linux/platform_x86 openjdk/hotspot/make/linux/platform_x86
754new file mode 100644
755index 0000000..5c613fe
756--- /dev/null
757+++ openjdk/hotspot/make/linux/platform_x86
758@@ -0,0 +1,15 @@
759+os_family = linux
760+
761+arch = x86
762+
763+arch_model = x86_32
764+
765+os_arch = linux_x86
766+
767+os_arch_model = linux_x86_32
768+
769+lib_arch = x86
770+
771+compiler = gcc
772+
773+sysdefs = -DLINUX -D_GNU_SOURCE -DIA32
774diff --git openjdk/hotspot/make/linux/platform_x86.suncc openjdk/hotspot/make/linux/platform_x86.suncc
775new file mode 100644
776index 0000000..717fc75
777--- /dev/null
778+++ openjdk/hotspot/make/linux/platform_x86.suncc
779@@ -0,0 +1,17 @@
780+os_family = linux
781+
782+arch = x86
783+
784+arch_model = x86_32
785+
786+os_arch = linux_x86
787+
788+os_arch_model = linux_x86_32
789+
790+lib_arch = x86
791+
792+compiler = sparcWorks
793+
794+gnu_dis_arch = x86
795+
796+sysdefs = -DLINUX -DSPARC_WORKS -D_GNU_SOURCE -DIA32
797diff --git openjdk/hotspot/src/os/linux/launcher/java_md.c openjdk/hotspot/src/os/linux/launcher/java_md.c
798index 50a86cd..48141be 100644
799--- openjdk/hotspot/src/os/linux/launcher/java_md.c
800+++ openjdk/hotspot/src/os/linux/launcher/java_md.c
801@@ -56,8 +56,8 @@
802 * models is supported, then DUAL_MODE is defined. When DUAL_MODE is
803 * defined, the architecture names for the narrow and wide version of
804 * the architecture are defined in BIG_ARCH and SMALL_ARCH. Currently
805- * only Solaris on sparc/sparcv9 and i586/amd64 is DUAL_MODE; linux
806- * i586/amd64 could be defined as DUAL_MODE but that is not the
807+ * only Solaris on sparc/sparcv9 and x86/amd64 is DUAL_MODE; linux
808+ * x86/amd64 could be defined as DUAL_MODE but that is not the
809 * current policy.
810 */
811
812@@ -75,8 +75,8 @@
813
814 #else /* 32-bit data model */
815
816-# ifdef i586
817-# define ARCH "i386"
818+# ifdef x86
819+# define ARCH "x86"
820 # elif defined(__sparc)
821 # define ARCH "sparc"
822 # endif
823@@ -90,7 +90,7 @@
824 # define SMALL_ARCH "sparc"
825 # else
826 # define BIG_ARCH "amd64"
827-# define SMALL_ARCH "i386"
828+# define SMALL_ARCH "x86"
829 # endif
830 # include <sys/systeminfo.h>
831 # include <sys/elf.h>
832@@ -1103,7 +1103,7 @@ void PrintMachineDependentOptions() {
833 * This code is somewhat more confused with #ifdef's than we'd
834 * like because this file is used by both Solaris and Linux
835 * platforms, and so needs to be parameterized for SPARC and
836- * i586 hardware. The other Linux platforms (amd64 and ia64)
837+ * x86 hardware. The other Linux platforms (amd64 and ia64)
838 * don't even ask this question, because they only come with
839 * server JVMs. */
840
841@@ -1168,11 +1168,11 @@ solaris_sparc_ServerClassMachine(void) {
842
843 #endif /* __sun && __sparc */
844
845-#if defined(__sun) && defined(i586)
846+#if defined(__sun) && defined(x86)
847
848 /*
849 * A utility method for asking the CPU about itself.
850- * There's a corresponding version of linux-i586
851+ * There's a corresponding version of linux-x86
852 * because the compilers are different.
853 */
854 void
855@@ -1218,13 +1218,13 @@ get_cpuid(uint32_t arg,
856 #endif
857 }
858
859-#endif /* __sun && i586 */
860+#endif /* __sun && x86 */
861
862-#if defined(__linux__) && defined(i586)
863+#if defined(__linux__) && defined(x86)
864
865 /*
866 * A utility method for asking the CPU about itself.
867- * There's a corresponding version of solaris-i586
868+ * There's a corresponding version of solaris-x86
869 * because the compilers are different.
870 */
871 void
872@@ -1286,11 +1286,11 @@ get_cpuid(uint32_t arg,
873 #endif
874 }
875
876-#endif /* __linux__ && i586 */
877+#endif /* __linux__ && x86 */
878
879-#ifdef i586
880+#ifdef x86
881 /*
882- * Routines shared by solaris-i586 and linux-i586.
883+ * Routines shared by solaris-x86 and linux-x86.
884 */
885
886 enum HyperThreadingSupport_enum {
887@@ -1430,11 +1430,11 @@ physical_processors(void) {
888 return result;
889 }
890
891-#endif /* i586 */
892+#endif /* x86 */
893
894-#if defined(__sun) && defined(i586)
895+#if defined(__sun) && defined(x86)
896
897-/* The definition of a server-class machine for solaris-i586/amd64 */
898+/* The definition of a server-class machine for solaris-x86/amd64 */
899 jboolean
900 solaris_i586_ServerClassMachine(void) {
901 jboolean result = JNI_FALSE;
902@@ -1463,11 +1463,11 @@ solaris_i586_ServerClassMachine(void) {
903 return result;
904 }
905
906-#endif /* __sun && i586 */
907+#endif /* __sun && x86 */
908
909-#if defined(__linux__) && defined(i586)
910+#if defined(__linux__) && defined(x86)
911
912-/* The definition of a server-class machine for linux-i586 */
913+/* The definition of a server-class machine for linux-x86 */
914 jboolean
915 linux_i586_ServerClassMachine(void) {
916 jboolean result = JNI_FALSE;
917@@ -1496,7 +1496,7 @@ linux_i586_ServerClassMachine(void) {
918 return result;
919 }
920
921-#endif /* __linux__ && i586 */
922+#endif /* __linux__ && x86 */
923
924 /* Dispatch to the platform-specific definition of "server-class" */
925 jboolean
926@@ -1504,9 +1504,9 @@ ServerClassMachine(void) {
927 jboolean result = JNI_FALSE;
928 #if defined(__sun) && defined(__sparc)
929 result = solaris_sparc_ServerClassMachine();
930-#elif defined(__sun) && defined(i586)
931+#elif defined(__sun) && defined(x86)
932 result = solaris_i586_ServerClassMachine();
933-#elif defined(__linux__) && defined(i586)
934+#elif defined(__linux__) && defined(x86)
935 result = linux_i586_ServerClassMachine();
936 #else
937 if (_launcher_debug) {
938diff --git openjdk/hotspot/src/os/linux/vm/os_linux.cpp openjdk/hotspot/src/os/linux/vm/os_linux.cpp
939index b2b3162..a4bbe70 100644
940--- openjdk/hotspot/src/os/linux/vm/os_linux.cpp
941+++ openjdk/hotspot/src/os/linux/vm/os_linux.cpp
942@@ -164,7 +164,7 @@ bool os::have_special_privileges() {
943 // i386: 224, ia64: 1105, amd64: 186, sparc 143
944 #ifdef __ia64__
945 #define SYS_gettid 1105
946-#elif __i386__
947+#elif __x86__
948 #define SYS_gettid 224
949 #elif __amd64__
950 #define SYS_gettid 186
951@@ -181,7 +181,7 @@ static char cpu_arch[] = ZERO_LIBARCH;
952 #elif defined(IA64)
953 static char cpu_arch[] = "ia64";
954 #elif defined(IA32)
955-static char cpu_arch[] = "i386";
956+static char cpu_arch[] = "x86";
957 #elif defined(AMD64)
958 static char cpu_arch[] = "amd64";
959 #elif defined(SPARC)
960diff --git openjdk/hotspot/src/share/tools/hsdis/Makefile openjdk/hotspot/src/share/tools/hsdis/Makefile
961index 6bdf4b8..fd43c6e 100644
962--- openjdk/hotspot/src/share/tools/hsdis/Makefile
963+++ openjdk/hotspot/src/share/tools/hsdis/Makefile
964@@ -32,7 +32,7 @@ BINUTILS = $(shell cd ../../../../..;pwd)/binutils-2.17-$(LIBARCH)
965 endif
966
967 # Default arch; it is changed below as needed.
968-ARCH = i386
969+ARCH = x86
970 OS = $(shell uname)
971
972 CPPFLAGS += -I$(BINUTILS)/include -I$(BINUTILS)/bfd
973@@ -87,7 +87,7 @@ endif # SunOS
974 LIBARCH = $(ARCH)
975 ifdef LP64
976 LIBARCH64/sparc = sparcv9
977-LIBARCH64/i386 = amd64
978+LIBARCH64/x86 = amd64
979 LIBARCH64 = $(LIBARCH64/$(ARCH))
980 ifneq ($(LIBARCH64),)
981 LIBARCH = $(LIBARCH64)
982diff --git openjdk/hotspot/src/share/tools/hsdis/hsdis.c openjdk/hotspot/src/share/tools/hsdis/hsdis.c
983index 75b7efe..62c692b 100644
984--- openjdk/hotspot/src/share/tools/hsdis/hsdis.c
985+++ openjdk/hotspot/src/share/tools/hsdis/hsdis.c
986@@ -383,8 +383,8 @@ static void print_help(struct hsdis_app_data* app_data,
987 else
988 disassembler_usage(stderr); /* better than nothing */
989 (*printf_callback)(printf_stream, " mach=<arch> select disassembly mode\n");
990-#if defined(LIBARCH_i386) || defined(LIBARCH_amd64)
991- (*printf_callback)(printf_stream, " mach=i386 select 32-bit mode\n");
992+#if defined(LIBARCH_x86) || defined(LIBARCH_amd64)
993+ (*printf_callback)(printf_stream, " mach=x86 select 32-bit mode\n");
994 (*printf_callback)(printf_stream, " mach=x86-64 select 64-bit mode\n");
995 (*printf_callback)(printf_stream, " suffix always print instruction suffix\n");
996 #endif
997@@ -406,7 +406,7 @@ static const bfd_arch_info_type* find_arch_info(const char* arch_name) {
998 static const char* native_arch_name() {
999 const char* res = HOTSPOT_LIB_ARCH;
1000 #ifdef LIBARCH_amd64
1001- res = "i386:x86-64";
1002+ res = "x86:x86-64";
1003 #endif
1004 #ifdef LIBARCH_sparc
1005 res = "sparc:v8plusb";
1006diff --git openjdk/hotspot/src/share/vm/adlc/Test/i486.ad openjdk/hotspot/src/share/vm/adlc/Test/i486.ad
1007deleted file mode 100644
1008index e69de29..0000000
1009diff --git openjdk/hotspot/src/share/vm/adlc/Test/x86.ad openjdk/hotspot/src/share/vm/adlc/Test/x86.ad
1010new file mode 100644
1011index 0000000..e69de29
1012diff --git openjdk/hotspot/test/Makefile openjdk/hotspot/test/Makefile
1013index 2596d85..c2f3eb9 100644
1014--- openjdk/hotspot/test/Makefile
1015+++ openjdk/hotspot/test/Makefile
1016@@ -33,14 +33,14 @@ ifeq ($(OSNAME), SunOS)
1017 PLATFORM = solaris
1018 ARCH = $(shell uname -p)
1019 ifeq ($(ARCH), i386)
1020- ARCH=i586
1021+ ARCH=x86
1022 endif
1023 endif
1024 ifeq ($(OSNAME), Linux)
1025 PLATFORM = linux
1026 ARCH = $(shell uname -m)
1027- ifeq ($(ARCH), i386)
1028- ARCH = i586
1029+ ifeq ($(findstring 86,$(ARCH)), 86)
1030+ ARCH = x86
1031 endif
1032 endif
1033 ifeq ($(OSNAME), Windows_NT)
1034@@ -55,7 +55,7 @@ ifeq ($(OSNAME), Windows_NT)
1035 ifeq ($(word 1, $(PROCESSOR_IDENTIFIER)),EM64T)
1036 ARCH = x64
1037 else
1038- ARCH = i586
1039+ ARCH = x86
1040 endif
1041 endif
1042 endif
1043--
10441.6.5
1045
1046diff --git openjdk/hotspot/make/linux/makefiles/i486.make b/hotspot/make/linux/makefiles/i486.make
1047deleted file mode 100644
1048index 9dd0b44..0000000
1049--- openjdk/hotspot/make/linux/makefiles/i486.make
1050+++ /dev/null
1051@@ -1,36 +0,0 @@
1052-#
1053-# Copyright 1999-2008 Sun Microsystems, Inc. All Rights Reserved.
1054-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
1055-#
1056-# This code is free software; you can redistribute it and/or modify it
1057-# under the terms of the GNU General Public License version 2 only, as
1058-# published by the Free Software Foundation.
1059-#
1060-# This code is distributed in the hope that it will be useful, but WITHOUT
1061-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
1062-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
1063-# version 2 for more details (a copy is included in the LICENSE file that
1064-# accompanied this code).
1065-#
1066-# You should have received a copy of the GNU General Public License version
1067-# 2 along with this work; if not, write to the Free Software Foundation,
1068-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
1069-#
1070-# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
1071-# CA 95054 USA or visit www.sun.com if you need additional information or
1072-# have any questions.
1073-#
1074-#
1075-
1076-# TLS helper, assembled from .s file
1077-# Not included in includeDB because it has no dependencies
1078-Obj_Files += linux_x86_32.o
1079-
1080-# The copied fdlibm routines in sharedRuntimeTrig.o must not be optimized
1081-OPT_CFLAGS/sharedRuntimeTrig.o = $(OPT_CFLAGS/NOOPT)
1082-# The copied fdlibm routines in sharedRuntimeTrans.o must not be optimized
1083-OPT_CFLAGS/sharedRuntimeTrans.o = $(OPT_CFLAGS/NOOPT)
1084-# Must also specify if CPU is little endian
1085-CFLAGS += -DVM_LITTLE_ENDIAN
1086-
1087-OPT_CFLAGS/compactingPermGenGen.o = -O1
1088diff --git openjdk/hotspot/make/linux/makefiles/x86.make openjdk/hotspot/make/linux/makefiles/x86.make
1089new file mode 100644
1090index 0000000..9dd0b44
1091--- /dev/null
1092+++ openjdk/hotspot/make/linux/makefiles/x86.make
1093@@ -0,0 +1,36 @@
1094+#
1095+# Copyright 1999-2008 Sun Microsystems, Inc. All Rights Reserved.
1096+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
1097+#
1098+# This code is free software; you can redistribute it and/or modify it
1099+# under the terms of the GNU General Public License version 2 only, as
1100+# published by the Free Software Foundation.
1101+#
1102+# This code is distributed in the hope that it will be useful, but WITHOUT
1103+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
1104+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
1105+# version 2 for more details (a copy is included in the LICENSE file that
1106+# accompanied this code).
1107+#
1108+# You should have received a copy of the GNU General Public License version
1109+# 2 along with this work; if not, write to the Free Software Foundation,
1110+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
1111+#
1112+# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
1113+# CA 95054 USA or visit www.sun.com if you need additional information or
1114+# have any questions.
1115+#
1116+#
1117+
1118+# TLS helper, assembled from .s file
1119+# Not included in includeDB because it has no dependencies
1120+Obj_Files += linux_x86_32.o
1121+
1122+# The copied fdlibm routines in sharedRuntimeTrig.o must not be optimized
1123+OPT_CFLAGS/sharedRuntimeTrig.o = $(OPT_CFLAGS/NOOPT)
1124+# The copied fdlibm routines in sharedRuntimeTrans.o must not be optimized
1125+OPT_CFLAGS/sharedRuntimeTrans.o = $(OPT_CFLAGS/NOOPT)
1126+# Must also specify if CPU is little endian
1127+CFLAGS += -DVM_LITTLE_ENDIAN
1128+
1129+OPT_CFLAGS/compactingPermGenGen.o = -O1
1130