You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by ml...@apache.org on 2006/08/09 11:58:24 UTC
svn commit: r430015 - in /incubator/harmony/enhanced/classlib/trunk:
depends/build/ make/ modules/archive/src/main/native/zip/linux/
modules/awt/src/main/native/linuxfont/linux/
modules/awt/src/main/native/x11wrapper/linux/ modules/luni/src/main/native...
Author: mloenko
Date: Wed Aug 9 02:58:23 2006
New Revision: 430015
URL: http://svn.apache.org/viewvc?rev=430015&view=rev
Log:
applied patch for HARMONY-1005
[classlib] initial port to x86_64 platform
Added:
incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/thread/linux/x86/
incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/thread/linux/x86/thrhelp.s
- copied unchanged from r429989, incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/thread/linux/thrhelp.s
incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/thread/linux/x86/thrspinlock.s
- copied unchanged from r429989, incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/thread/linux/thrspinlock.s
incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/thread/linux/x86_64/
incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/thread/linux/x86_64/thrhelp.s
incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/thread/linux/x86_64/thrspinlock.s
Removed:
incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/thread/linux/thrhelp.s
incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/thread/linux/thrspinlock.s
Modified:
incubator/harmony/enhanced/classlib/trunk/depends/build/makefile.include
incubator/harmony/enhanced/classlib/trunk/make/properties.xml
incubator/harmony/enhanced/classlib/trunk/modules/archive/src/main/native/zip/linux/makefile
incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/native/linuxfont/linux/makefile
incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/native/x11wrapper/linux/makefile
incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/fdlibm/linux/makefile
incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/include/shared/hycomp.h
incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/linux/OSFileSystemLinux32.c
incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/linux/OSMemoryLinux32.c
incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/port/linux/hysignal.c
incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/port/linux/hyvmem.c
incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/thread/linux/makefile
incubator/harmony/enhanced/classlib/trunk/modules/text/build.xml
Modified: incubator/harmony/enhanced/classlib/trunk/depends/build/makefile.include
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/depends/build/makefile.include?rev=430015&r1=430014&r2=430015&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/depends/build/makefile.include (original)
+++ incubator/harmony/enhanced/classlib/trunk/depends/build/makefile.include Wed Aug 9 02:58:23 2006
@@ -28,5 +28,5 @@
DLLPATH=$(HY_HDK)/jdk/jre/bin/
SHAREDSUB=../shared/
-CFLAGS = -O1 -march=pentium3 -DLINUX -D_REENTRANT -DIPv6_FUNCTION_SUPPORT \
- -DHYX86 $(VMDEBUG) -I$(HY_HDK)/include -I$(HY_HDK)/jdk/include -I. -I$(SHAREDSUB)
+CFLAGS = -O1 -fpic -DLINUX -D_REENTRANT -DIPv6_FUNCTION_SUPPORT \
+ -D$(HY_ARCH_DEFINE) $(VMDEBUG) -I$(HY_HDK)/include -I$(HY_HDK)/jdk/include -I. -I$(SHAREDSUB)
Modified: incubator/harmony/enhanced/classlib/trunk/make/properties.xml
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/make/properties.xml?rev=430015&r1=430014&r2=430015&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/make/properties.xml (original)
+++ incubator/harmony/enhanced/classlib/trunk/make/properties.xml Wed Aug 9 02:58:23 2006
@@ -55,7 +55,7 @@
<!-- Conditions for different architectures -->
<condition property="is.x86_64">
- <os arch="x86_64"/>
+ <equals arg1="x86_64" arg2="${os.arch}"/>
</condition>
<condition property="is.x86">
<or>
@@ -69,13 +69,13 @@
<condition property="is.64bit">
<or>
<os arch="ia64" />
- <os arch="x86_64"/>
+ <equals arg1="x86_64" arg2="${os.arch}"/>
</or>
</condition>
<condition property="is.32bit">
<or>
<os arch="x86"/>
- <os arch="i386"/>
+ <equals arg1="i386" arg2="${os.arch}"/>
</or>
</condition>
<condition property="hy.bits" value="32">
@@ -85,10 +85,19 @@
<!-- Normalized architecture name -->
<condition property="hy.arch" value="x86">
- <isset property="is.x86" />
+ <and>
+ <isset property="is.x86" />
+ <isset property="is.32bit" />
+ </and>
</condition>
<property name="hy.arch" value="${os.arch}" />
-
+
+ <condition property="hy.arch.define" value="HYX86">
+ <equals arg1="${hy.arch}" arg2="x86"/>
+ </condition>
+ <condition property="hy.arch.define" value="HYX86_64">
+ <equals arg1="${hy.arch}" arg2="x86_64"/>
+ </condition>
<!-- Normalized platform name -->
<property name="hy.platform" value="${hy.os}.${hy.arch}"/>
<property name="hy.platform.path" value="${hy.os}/${hy.arch}"/>
@@ -223,6 +232,8 @@
executable="${make.command}"
dir="@{dir}">
<env key="HY_HDK" value="${hy.hdk}" />
+ <env key="HY_ARCH" value="${hy.arch}" />
+ <env key="HY_ARCH_DEFINE" value="${hy.arch.define}" />
<arg line="@{target}" />
</exec>
</sequential>
Modified: incubator/harmony/enhanced/classlib/trunk/modules/archive/src/main/native/zip/linux/makefile
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/archive/src/main/native/zip/linux/makefile?rev=430015&r1=430014&r2=430015&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/archive/src/main/native/zip/linux/makefile (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/archive/src/main/native/zip/linux/makefile Wed Aug 9 02:58:23 2006
@@ -18,7 +18,7 @@
include $(HY_HDK)/build/make/makefile.include
-CFLAGS += -I../../zlib_dist
+CFLAGS += -fpic -I../../zlib_dist
BUILDFILES = $(SHAREDSUB)zcpool.o $(SHAREDSUB)zipalloc.o \
$(SHAREDSUB)zipcache.o $(SHAREDSUB)zipsup.o
LIBNAME = $(LIBPATH)libhyzip.a
Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/native/linuxfont/linux/makefile
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/native/linuxfont/linux/makefile?rev=430015&r1=430014&r2=430015&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/native/linuxfont/linux/makefile (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/native/linuxfont/linux/makefile Wed Aug 9 02:58:23 2006
@@ -25,7 +25,12 @@
$(DLLPATH)libhysig.so $(LIBPATH)libhyzip.a $(DLLPATH)libhyzlib.so $(LIBPATH)libhycommon.a \
$(LIBPATH)libhypool.a $(LIBPATH)libhyfdlibm.a $(DLLPATH)libhythr.so $(LIBPATH)libvmi.so
-SYSLIBFILES = -L/usr/X11R6/lib -lX11 -lXft
+ifeq ($(HY_ARCH),x86_64)
+ SYSLIBFILES = -L/usr/X11R6/lib64 -lX11 -lXft
+endif
+ifeq ($(HY_ARCH),x86)
+ SYSLIBFILES = -L/usr/X11R6/lib -lX11 -lXft
+endif
DLLNAME=../liblinuxfont.so
Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/native/x11wrapper/linux/makefile
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/native/x11wrapper/linux/makefile?rev=430015&r1=430014&r2=430015&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/native/x11wrapper/linux/makefile (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/native/x11wrapper/linux/makefile Wed Aug 9 02:58:23 2006
@@ -26,7 +26,12 @@
$(DLLPATH)libhysig.so $(LIBPATH)libhyzip.a $(DLLPATH)libhyzlib.so $(LIBPATH)libhycommon.a \
$(LIBPATH)libhypool.a $(LIBPATH)libhyfdlibm.a $(DLLPATH)libhythr.so $(LIBPATH)libvmi.so
-SYSLIBFILES = -lstdc++ -L/usr/X11R6/lib -lX11
+ifeq ($(HY_ARCH),x86_64)
+ SYSLIBFILES = -lstdc++ -L/usr/X11R6/lib64 -lX11
+endif
+ifeq ($(HY_ARCH),x86)
+ SYSLIBFILES = -lstdc++ -L/usr/X11R6/lib -lX11
+endif
DLLNAME=../libX11Wrapper.so
Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/fdlibm/linux/makefile
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/fdlibm/linux/makefile?rev=430015&r1=430014&r2=430015&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/fdlibm/linux/makefile (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/fdlibm/linux/makefile Wed Aug 9 02:58:23 2006
@@ -44,7 +44,7 @@
$(FDLIBM_DIST)w_scalb.o $(FDLIBM_DIST)w_sinh.o $(FDLIBM_DIST)w_sqrt.o
# CFLAGS are overriden not just appended to
-CFLAGS= -O0 -DLINUX -D_REENTRANT -DIPv6_FUNCTION_SUPPORT -DHYX86 -D_IEEE_LIBM \
+CFLAGS= -O0 -fpic -DLINUX -D_REENTRANT -DIPv6_FUNCTION_SUPPORT -DHYX86 -D_IEEE_LIBM \
-DHY_PLATFORM_DOUBLE_ORDER \
-I. -I$(SHAREDSUB) -I$(HY_HDK)/include -I$(HY_HDK)/jdk/include \
-ffloat-store $(VMDEBUG)
Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/include/shared/hycomp.h
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/include/shared/hycomp.h?rev=430015&r1=430014&r2=430015&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/include/shared/hycomp.h (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/include/shared/hycomp.h Wed Aug 9 02:58:23 2006
@@ -46,7 +46,7 @@
#define HY_PLATFORM_DOUBLE_ORDER
#if defined(LINUX)
/* NOTE: Linux supports different processors -- do not assume 386 */
-#if defined(LINUXPPC64)
+#if defined(HYX86_64)
#define DATA_TYPES_DEFINED
typedef unsigned long int UDATA; /* 64bits */
typedef unsigned long int U_64;
Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/linux/OSFileSystemLinux32.c
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/linux/OSFileSystemLinux32.c?rev=430015&r1=430014&r2=430015&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/linux/OSFileSystemLinux32.c (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/linux/OSFileSystemLinux32.c Wed Aug 9 02:58:23 2006
@@ -23,10 +23,13 @@
#include <errno.h>
#include <sys/sendfile.h>
#include "vmi.h"
+#include "iohelp.h"
#include "IFileSystem.h"
#include "OSFileSystem.h"
+void *getJavaIoFileDescriptorContentsAsPointer (JNIEnv * env, jobject fd);
+
typedef int OSSOCKET;
typedef struct hysocket_struct
{
@@ -223,7 +226,7 @@
(JNIEnv *env, jobject thiz, jlong fd, jobject sd, jlong offset, jlong count)
{
PORT_ACCESS_FROM_ENV (env);
- int socket;
+ OSSOCKET socket;
//TODO IPV6
hysocket_t hysocketP =
(hysocket_t)getJavaIoFileDescriptorContentsAsPointer (env,sd);
Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/linux/OSMemoryLinux32.c
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/linux/OSMemoryLinux32.c?rev=430015&r1=430014&r2=430015&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/linux/OSMemoryLinux32.c (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/linux/OSMemoryLinux32.c Wed Aug 9 02:58:23 2006
@@ -34,7 +34,7 @@
JNIEXPORT jint JNICALL Java_org_apache_harmony_luni_platform_OSMemory_getPointerSizeImpl (JNIEnv * env, jclass clazz)
{
- return 4;
+ return sizeof(void *);
}
JNIEXPORT jlong JNICALL Java_org_apache_harmony_luni_platform_OSMemory_getAddress
@@ -76,7 +76,7 @@
(JNIEnv * env, jobject thiz, jlong addr, jlong size){
PORT_ACCESS_FROM_ENV (env);
jboolean result = 0;
- int m_addr = (int)addr;
+ IDATA m_addr = (IDATA)addr;
int PAGE_SIZE = getPageSize();
char* vec = NULL;
int page_count = 0;
Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/port/linux/hysignal.c
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/port/linux/hysignal.c?rev=430015&r1=430014&r2=430015&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/port/linux/hysignal.c (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/port/linux/hysignal.c Wed Aug 9 02:58:23 2006
@@ -624,35 +624,77 @@
switch (index)
{
case HYPORT_SIG_GPR_X86_EDI:
+ case HYPORT_SIG_GPR_AMD64_RDI:
case 0:
+#ifdef HYX86_64
+ *name = "RDI";
+ *value = &info->sigContext->rdi;
+#endif
+#ifdef HYX86
*name = "EDI";
*value = &info->sigContext->edi;
- return HYPORT_SIG_VALUE_ADDRESS;
+#endif
+ return HYPORT_SIG_VALUE_ADDRESS;
case HYPORT_SIG_GPR_X86_ESI:
+ case HYPORT_SIG_GPR_AMD64_RSI:
case 1:
+#ifdef HYX86
*name = "ESI";
*value = &info->sigContext->esi;
+#endif
+#ifdef HYX86_64
+ *name = "RSI";
+ *value = &info->sigContext->rsi;
+#endif
return HYPORT_SIG_VALUE_ADDRESS;
case HYPORT_SIG_GPR_X86_EAX:
+ case HYPORT_SIG_GPR_AMD64_RAX:
case 2:
+#ifdef HYX86
*name = "EAX";
*value = &info->sigContext->eax;
- return HYPORT_SIG_VALUE_ADDRESS;
+#endif
+#ifdef HYX86_64
+ *name = "RAX";
+ *value = &info->sigContext->rax;
+#endif
+ return HYPORT_SIG_VALUE_ADDRESS;
case HYPORT_SIG_GPR_X86_EBX:
+ case HYPORT_SIG_GPR_AMD64_RBX:
case 3:
+#ifdef HYX86
*name = "EBX";
*value = &info->sigContext->ebx;
- return HYPORT_SIG_VALUE_ADDRESS;
+#endif
+#ifdef HYX86_64
+ *name = "RBX";
+ *value = &info->sigContext->rbx;
+#endif
+ return HYPORT_SIG_VALUE_ADDRESS;
case HYPORT_SIG_GPR_X86_ECX:
+ case HYPORT_SIG_GPR_AMD64_RCX:
case 4:
+#ifdef HYX86
*name = "ECX";
*value = &info->sigContext->ecx;
- return HYPORT_SIG_VALUE_ADDRESS;
+#endif
+#ifdef HYX86_64
+ *name = "RCX";
+ *value = &info->sigContext->rcx;
+#endif
+ return HYPORT_SIG_VALUE_ADDRESS;
case HYPORT_SIG_GPR_X86_EDX:
+ case HYPORT_SIG_GPR_AMD64_RDX:
case 5:
+#ifdef HYX86
*name = "EDX";
*value = &info->sigContext->edx;
- return HYPORT_SIG_VALUE_ADDRESS;
+#endif
+#ifdef HYX86_64
+ *name = "RDX";
+ *value = &info->sigContext->rdx;
+#endif
+ return HYPORT_SIG_VALUE_ADDRESS;
default:
return HYPORT_SIG_VALUE_UNDEFINED;
}
@@ -675,9 +717,16 @@
{
case HYPORT_SIG_CONTROL_PC:
case 0:
+#ifdef HYX86
*name = "EIP";
*value = (void *) &(info->sigContext->eip);
- return HYPORT_SIG_VALUE_ADDRESS;
+#endif
+#ifdef HYX86_64
+ *name = "RIP";
+ *value = (void *) &(info->sigContext->rip);
+#endif
+ return HYPORT_SIG_VALUE_ADDRESS;
+#ifdef HYX86
case 1:
*name = "ES";
*value = (void *) &(info->sigContext->es);
@@ -686,10 +735,17 @@
*name = "DS";
*value = (void *) &(info->sigContext->ds);
return HYPORT_SIG_VALUE_ADDRESS;
+#endif
case HYPORT_SIG_CONTROL_SP:
case 3:
+#ifdef HYX86
*name = "ESP";
*value = (void *) &(info->sigContext->esp);
+#endif
+#ifdef HYX86_64
+ *name = "RSP";
+ *value = (void *) &(info->sigContext->rsp);
+#endif
return HYPORT_SIG_VALUE_ADDRESS;
case 4:
*name = "EFlags";
@@ -699,15 +755,23 @@
*name = "CS";
*value = (void *) &(info->sigContext->cs);
return HYPORT_SIG_VALUE_ADDRESS;
+#ifdef HYX86
case 6:
*name = "SS";
*value = (void *) &(info->sigContext->ss);
return HYPORT_SIG_VALUE_ADDRESS;
- case HYPORT_SIG_CONTROL_BP:
+#endif
+ case HYPORT_SIG_CONTROL_BP:
case 7:
+#ifdef HYX86
*name = "EBP";
*value = &info->sigContext->ebp;
- return HYPORT_SIG_VALUE_ADDRESS;
+#endif
+#ifdef HYX86_64
+ *name = "RBP";
+ *value = &info->sigContext->rbp;
+#endif
+ return HYPORT_SIG_VALUE_ADDRESS;
default:
return HYPORT_SIG_VALUE_UNDEFINED;
}
@@ -726,8 +790,14 @@
Dl_info *dl_info = &(info->dl_info);
*name = "";
+#ifdef HYX86
address = (void *) info->sigContext->eip;
int dl_result = dladdr ((void *) info->sigContext->eip, dl_info);
+#endif
+#ifdef HYX86_64
+ address = (void *) info->sigContext->rip;
+ int dl_result = dladdr ((void *) info->sigContext->rip, dl_info);
+#endif
switch (index)
{
Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/port/linux/hyvmem.c
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/port/linux/hyvmem.c?rev=430015&r1=430014&r2=430015&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/port/linux/hyvmem.c (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/port/linux/hyvmem.c Wed Aug 9 02:58:23 2006
@@ -343,7 +343,7 @@
}
/* Update identifier and commit memory if required, else return reserved memory */
- update_vmemIdentifier (identifier, baseAddress, (void *) addressKey,
+ update_vmemIdentifier (identifier, baseAddress, baseAddress,
byteAmount, mode, largePageSize);
if (0 != (HYPORT_VMEM_MEMORY_MODE_COMMIT & mode))
{
Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/thread/linux/makefile
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/thread/linux/makefile?rev=430015&r1=430014&r2=430015&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/thread/linux/makefile (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/thread/linux/makefile Wed Aug 9 02:58:23 2006
@@ -21,7 +21,7 @@
CFLAGS += -fpic
BUILDFILES = \
- $(SHAREDSUB)thread_copyright.o thrhelp.o thrspinlock.o hythread.o \
+ $(SHAREDSUB)thread_copyright.o $(HY_ARCH)/thrhelp.o $(HY_ARCH)/thrspinlock.o hythread.o \
$(SHAREDSUB)hythreadinspect.o linuxonexit.o priority.o rasthrsup.o \
$(SHAREDSUB)rwmutex.o thrcreate.o thrdsup.o $(SHAREDSUB)thrprof.o
Added: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/thread/linux/x86_64/thrhelp.s
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/thread/linux/x86_64/thrhelp.s?rev=430015&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/thread/linux/x86_64/thrhelp.s (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/thread/linux/x86_64/thrhelp.s Wed Aug 9 02:58:23 2006
@@ -0,0 +1,123 @@
+# Copyright 1991, 2005 The Apache Software Foundation or its licensors, as
+# applicable
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+eq_hy_null = 0
+eq_HyThreadMonitor_pinCount = 28
+eq_pointer_size = 4
+eqS_current_stack_depth = 16
+eqS_hythread_monitor_pin = 16
+eqS_hythread_monitor_unpin = 16
+eqSR_current_stack_depth = 4
+eqSR_hythread_monitor_pin = 4
+eqSR_hythread_monitor_unpin = 4
+eqSRS_current_stack_depth = 16
+eqSRS_hythread_monitor_pin = 16
+eqSRS_hythread_monitor_unpin = 16
+eqSS_current_stack_depth = 64
+eqSS_hythread_monitor_pin = 64
+eqSS_hythread_monitor_unpin = 64
+ #CODE32 SEGMENT FLAT PUBLIC 'CODE'
+ #assume cs:flat,ds:flat,ss:flat
+ #CODE32 ends
+ #CODE32 SEGMENT FLAT PUBLIC 'CODE'
+ #assume cs:flat,ds:flat,ss:flat
+ .globl hythread_monitor_pin
+ .type hythread_monitor_pin,@function
+ .globl current_stack_depth
+ .type current_stack_depth,@function
+ .globl hythread_monitor_unpin
+ .type hythread_monitor_unpin,@function
+
+ .text
+ .align 4
+current_stack_depth:
+ push %rbp
+ mov %rsp, %rbp
+ push %rsi
+ push %rdi
+ push %rbx
+ sub $64, %rsp
+ mov %rbp, %rbx
+ jmp .L2
+.L1:
+ mov %rcx, %rbx
+.L2:
+ mov (%rbx), %rcx
+ test %rcx, %rcx ## setFlags: true
+ jnz .L1
+ sub %rbp, %rbx
+ mov %rbx, %rcx
+ mov %rbx, %rax ## RegReg opt
+ add $64, %rsp
+ pop %rbx
+ pop %rdi
+ pop %rsi
+ pop %rbp
+ ret
+END_current_stack_depth:
+ .size current_stack_depth,END_current_stack_depth - current_stack_depth
+
+## Prototype: void hythread_monitor_pin( hythread_monitor_t monitor, hythread_t osThread);
+## Defined in: #THREAD Args: 2
+
+ .text
+ .align 4
+hythread_monitor_pin:
+ push %rbp
+ mov %rsp, %rbp
+ push %rsi
+ push %rdi
+ push %rbx
+ sub $64, %rsp
+ mov (eqSRS_hythread_monitor_pin+0+8+eqSS_hythread_monitor_pin)(%rsp), %rbx
+ mov (eqSRS_hythread_monitor_pin+0+4+eqSS_hythread_monitor_pin)(%rsp), %rbx
+ lock
+ incl eq_HyThreadMonitor_pinCount(%rbx) ## (Converted add 1 to inc)
+ add $64, %rsp
+ pop %rbx
+ pop %rdi
+ pop %rsi
+ pop %rbp
+ ret
+END_hythread_monitor_pin:
+ .size hythread_monitor_pin,END_hythread_monitor_pin - hythread_monitor_pin
+
+## Prototype: void hythread_monitor_unpin( hythread_monitor_t monitor, hythread_t osThread);
+## Defined in: #THREAD Args: 2
+
+ .text
+ .align 4
+hythread_monitor_unpin:
+ push %rbp
+ mov %rsp, %rbp
+ push %rsi
+ push %rdi
+ push %rbx
+ sub $64, %rsp
+ mov (eqSS_hythread_monitor_unpin+0+8+eqSRS_hythread_monitor_unpin)(%rsp), %rbx
+ mov (eqSS_hythread_monitor_unpin+0+eqSRS_hythread_monitor_unpin+4)(%rsp), %rbx
+ lock
+ decl eq_HyThreadMonitor_pinCount(%rbx) ## (Converted subtract 1 to dec)
+ add $64, %rsp
+ pop %rbx
+ pop %rdi
+ pop %rsi
+ pop %rbp
+ ret
+END_hythread_monitor_unpin:
+ .size hythread_monitor_unpin,END_hythread_monitor_unpin - hythread_monitor_unpin
+
+ #CODE32 ends
+ # end of file
Added: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/thread/linux/x86_64/thrspinlock.s
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/thread/linux/x86_64/thrspinlock.s?rev=430015&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/thread/linux/x86_64/thrspinlock.s (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/thread/linux/x86_64/thrspinlock.s Wed Aug 9 02:58:23 2006
@@ -0,0 +1,132 @@
+# Copyright 1991, 2005 The Apache Software Foundation or its licensors, as
+# applicable
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+eq_HyThreadAbstractMonitor_spinCount1 = 48
+eq_HyThreadAbstractMonitor_spinCount2 = 52
+eq_HyThreadAbstractMonitor_spinCount3 = 56
+eq_HyThreadAbstractMonitor_spinlockState = 40
+eq_pointer_size = 4
+eqS_hythread_spinlock_acquire = 18
+eqS_hythread_spinlock_swapState = 16
+eqSR_hythread_spinlock_acquire = 4
+eqSR_hythread_spinlock_swapState = 4
+eqSRS_hythread_spinlock_acquire = 16
+eqSRS_hythread_spinlock_swapState = 16
+eqSS_hythread_spinlock_acquire = 72
+eqSS_hythread_spinlock_swapState = 64
+HYTHREAD_MONITOR_SPINLOCK_OWNED = 1
+HYTHREAD_MONITOR_SPINLOCK_UNOWNED = 0
+ #CODE32 SEGMENT FLAT PUBLIC 'CODE'
+ #assume cs:flat,ds:flat,ss:flat
+ #CODE32 ends
+ #CODE32 SEGMENT FLAT PUBLIC 'CODE'
+ #assume cs:flat,ds:flat,ss:flat
+ .globl hythread_yield # an extern
+ .globl hythread_spinlock_acquire
+ .type hythread_spinlock_acquire,@function
+ .globl hythread_spinlock_swapState
+ .type hythread_spinlock_swapState,@function
+## Prototype: IDATA hythread_spinlock_acquire(hythread_t self, hythread_monitor_t monitor);
+## Defined in: #THREAD Args: 2
+
+ .text
+ .align 4
+hythread_spinlock_acquire:
+ push %rbp
+ mov %rsp, %rbp
+ push %rsi
+ push %rdi
+ push %rbx
+ sub $72, %rsp
+ mov (eqSS_hythread_spinlock_acquire+0+eqSRS_hythread_spinlock_acquire+8)(%rsp), %rdx
+ mov eq_HyThreadAbstractMonitor_spinCount3(%rdx), %rcx
+.L2:
+ mov eq_HyThreadAbstractMonitor_spinCount2(%rdx), %rbx
+.L3:
+## Try to cmpxchg 0 into the target field (-1 indicates free)
+ cmpl $HYTHREAD_MONITOR_SPINLOCK_UNOWNED, eq_HyThreadAbstractMonitor_spinlockState(%rdx) ## setFlags: true
+ jne .L10
+ xor %rax, %rax
+ mov $HYTHREAD_MONITOR_SPINLOCK_OWNED, %rsi
+ lock
+ cmpxchg %rsi, eq_HyThreadAbstractMonitor_spinlockState(%rdx)
+ test %rax, %rax ## setFlags: true
+ jnz .L10
+ xor %rbx, %rbx
+ jmp .L1
+.L10:
+ .word 37107 ## PAUSE
+## begin tight loop
+ mov eq_HyThreadAbstractMonitor_spinCount1(%rdx), %rax
+.L11:
+## inside tight loop
+ dec %rax ## setFlags: true(Converted subtract 1 to dec)
+ jnz .L11
+## end tight loop
+ dec %rbx ## setFlags: true(Converted subtract 1 to dec)
+ jnz .L3
+ mov %rcx, 64(%rsp) ## save VMtemp3_1_3_(HyThreadAbstractMonitor->spinCount3)
+ mov %rdx, 68(%rsp) ## save VMtemp3_1_2_(struct HyThreadAbstractMonitor*) in_HyVMThreadSpinlocks>>#hythread_spinlock_acquire
+ call hythread_yield
+ mov 64(%rsp), %rcx ## load VMtemp3_1_3_(HyThreadAbstractMonitor->spinCount3)
+ dec %rcx ## setFlags: true(Converted subtract 1 to dec)
+ mov 68(%rsp), %rdx ## load VMtemp3_1_2_(struct HyThreadAbstractMonitor*) in_HyVMThreadSpinlocks>>#hythread_spinlock_acquire
+ jnz .L2
+ mov $-1, %rbx
+.L1:
+ mov %rbx, %rax
+ add $72, %rsp
+ pop %rbx
+ pop %rdi
+ pop %rsi
+ pop %rbp
+ ret
+END_hythread_spinlock_acquire:
+ .size hythread_spinlock_acquire,END_hythread_spinlock_acquire - hythread_spinlock_acquire
+
+## Prototype: UDATA hythread_spinlock_swapState(hythread_monitor_t monitor, UDATA newState);
+## Defined in: #THREAD Args: 2
+
+ .text
+ .align 4
+hythread_spinlock_swapState:
+ push %rbp
+ mov %rsp, %rbp
+ push %rsi
+ push %rdi
+ push %rbx
+ sub $64, %rsp
+ mov (eqSS_hythread_spinlock_swapState+0+eqSRS_hythread_spinlock_swapState+4)(%rsp), %rbx
+ mov (eqSS_hythread_spinlock_swapState+0+eqSRS_hythread_spinlock_swapState+8)(%rsp), %rcx
+## If we are writing in UNOWNED, we are exiting the critical section, therefore
+## have to finish up any writes
+ test %rcx, %rcx ## setFlags: true
+ ## memory barrier (no code necessary for write barriers)
+ xchg %rcx, eq_HyThreadAbstractMonitor_spinlockState(%rbx)
+## if we entered the critical section, (i.e. we swapped out UNOWNED) then
+## we have to issue a readBarrier
+ test %rcx, %rcx ## setFlags: true
+ mov %rcx, %rax
+ add $64, %rsp
+ pop %rbx
+ pop %rdi
+ pop %rsi
+ pop %rbp
+ ret
+END_hythread_spinlock_swapState:
+ .size hythread_spinlock_swapState,END_hythread_spinlock_swapState - hythread_spinlock_swapState
+
+ #CODE32 ends
+ # end of file
Modified: incubator/harmony/enhanced/classlib/trunk/modules/text/build.xml
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/text/build.xml?rev=430015&r1=430014&r2=430015&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/text/build.xml (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/text/build.xml Wed Aug 9 02:58:23 2006
@@ -45,8 +45,13 @@
<mkdir dir="${hy.text.src.main.native}/icu4c/unicode" />
<unzip src="${iculib.zip}" dest="${hy.text.src.main.native}/icu4c/unicode" />
<chmod dir="${hy.text.src.main.native}/icu4c/unicode" perm="ugo+r" />
+ <antcall target="copy.libs" inheritall="true" />
+ </target>
+ <target name="copy.libs" if="is.x86_64">
+ <copy todir="${hy.text.src.main.native}/icu4c/unicode" overwrite="yes">
+ <fileset dir="${depends.libs}" includes="*${shlib.suffix}*" />
+ </copy>
</target>
-
<target name="clean-overlay-oss">
<delete dir="${hy.text.src.main.native}/icu4c" quiet="true" />
</target>