harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From var...@apache.org
Subject svn commit: r591290 - in /harmony/enhanced/drlvm/trunk: src/test/regression/H5021/ src/test/regression/H5021/Test.java src/test/regression/H5021/char16.c vm/port/src/encoder/ia32_em64t/enc_tabl.cpp
Date Fri, 02 Nov 2007 10:12:06 GMT
Author: varlax
Date: Fri Nov  2 03:12:05 2007
New Revision: 591290

URL: http://svn.apache.org/viewvc?rev=591290&view=rev
Log:
Fixed HARMONY-5021 [drlvm][encoder] native methods returning jchar can't return values greater
than 255 on x86-64 platforms

Added:
    harmony/enhanced/drlvm/trunk/src/test/regression/H5021/
    harmony/enhanced/drlvm/trunk/src/test/regression/H5021/Test.java
    harmony/enhanced/drlvm/trunk/src/test/regression/H5021/char16.c   (with props)
Modified:
    harmony/enhanced/drlvm/trunk/vm/port/src/encoder/ia32_em64t/enc_tabl.cpp

Added: harmony/enhanced/drlvm/trunk/src/test/regression/H5021/Test.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/src/test/regression/H5021/Test.java?rev=591290&view=auto
==============================================================================
--- harmony/enhanced/drlvm/trunk/src/test/regression/H5021/Test.java (added)
+++ harmony/enhanced/drlvm/trunk/src/test/regression/H5021/Test.java Fri Nov  2 03:12:05 2007
@@ -0,0 +1,18 @@
+package org.apache.harmony.drlvm.tests.regression.h5021;
+
+import junit.framework.TestCase;
+
+public class Test extends TestCase
+{
+    static final char bigchar = 0x740;
+    
+    static native char bigChar(char bigChar);
+
+    static {
+        System.loadLibrary("char16");
+    }
+
+    public void testJNIRetChar16() {
+       assertEquals(bigchar, bigChar(bigchar));
+    }
+}

Added: harmony/enhanced/drlvm/trunk/src/test/regression/H5021/char16.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/src/test/regression/H5021/char16.c?rev=591290&view=auto
==============================================================================
--- harmony/enhanced/drlvm/trunk/src/test/regression/H5021/char16.c (added)
+++ harmony/enhanced/drlvm/trunk/src/test/regression/H5021/char16.c Fri Nov  2 03:12:05 2007
@@ -0,0 +1,15 @@
+#include <jni.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+JNIEXPORT jchar JNICALL Java_org_apache_harmony_drlvm_tests_regression_h5021_Test_bigChar
+  (JNIEnv* env, jclass this_class, jchar input)
+{
+    return input;
+}
+
+#ifdef __cplusplus
+}
+#endif

Propchange: harmony/enhanced/drlvm/trunk/src/test/regression/H5021/char16.c
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: harmony/enhanced/drlvm/trunk/vm/port/src/encoder/ia32_em64t/enc_tabl.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/port/src/encoder/ia32_em64t/enc_tabl.cpp?rev=591290&r1=591289&r2=591290&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/port/src/encoder/ia32_em64t/enc_tabl.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/port/src/encoder/ia32_em64t/enc_tabl.cpp Fri Nov  2 03:12:05
2007
@@ -1107,7 +1107,9 @@
     {OpcodeInfo::all,     {Size16, 0x0F, 0xB6, _r}, {r16, r_m8},    D_U },
     {OpcodeInfo::all,     {0x0F, 0xB6, _r},         {r32, r_m8},    D_U },
     {OpcodeInfo::em64t,   {REX_W, 0x0F, 0xB6, _r},  {r64, r_m8},    D_U },
+
     {OpcodeInfo::all,     {0x0F, 0xB7, _r},         {r32, r_m16},   D_U },
+    {OpcodeInfo::em64t,   {REX_W, 0x0F, 0xB7, _r},  {r64, r_m16},   D_U },
     //workaround to get r/rm32->r64 ZX mov functionality:
     //simple 32bit reg copying zeros high bits in 64bit reg
     {OpcodeInfo::em64t,   {0x8B, _r},  {r64, r_m32},   D_U },



Mime
View raw message