expr.c (build_java_jsr): Use emit_jump, not expand_goto.
authorTom Tromey <tromey@gcc.gnu.org>
Wed, 3 May 2000 18:09:27 +0000 (18:09 +0000)
committerTom Tromey <tromey@gcc.gnu.org>
Wed, 3 May 2000 18:09:27 +0000 (18:09 +0000)
* expr.c (build_java_jsr): Use emit_jump, not expand_goto.

* javaop.h (WORD_TO_INT): New function.
(IMMEDIATE_s4): Use WORD_TO_INT.
* jcf.h (JPOOL_INT): Ditto.

* gjavah.c (decode_signature_piece): Don't treat `$' as namespace
separator.

From-SVN: r33636

gcc/java/ChangeLog
gcc/java/expr.c
gcc/java/gjavah.c
gcc/java/javaop.h
gcc/java/jcf.h

index e3e3a634e32536d64e1b018e920c6f7db8109de8..df283c6693accfd55ba22a66a72f985575acff76 100644 (file)
@@ -1,4 +1,20 @@
-2000-04-19  Tom Tromey  &lt;tromey@cygnus.com&gt;
+2000-05-03  Andrew Haley  <aph@cygnus.com>
+
+       * expr.c (build_java_jsr): Use emit_jump, not expand_goto.
+
+       * javaop.h (WORD_TO_INT): New function.
+       (IMMEDIATE_s4): Use WORD_TO_INT.
+       * jcf.h (JPOOL_INT): Ditto.
+
+       * gjavah.c (decode_signature_piece): Don't treat `$' as namespace
+       separator.
+
+2000-05-02  Tom Tromey  <tromey@cygnus.com>
+
+       * expr.c (build_jni_stub): Cache the result of
+       _Jv_LookupJNIMethod.
+
+2000-04-19  Tom Tromey  <tromey@cygnus.com>
 
        * class.c (add_method_1): Set both DECL_EXTERNAL and METHOD_NATIVE
        on native function.
index 37358e53a3aaf6e9f962eb449e504032aa7201bd..7a92a8c66c66096d398ac4566eb66168879b1810 100644 (file)
@@ -560,7 +560,7 @@ build_java_jsr (where, ret)
   tree ret_label = fold (build1 (ADDR_EXPR, return_address_type_node, ret));
   push_value (ret_label);
   flush_quick_stack ();
-  expand_goto (where);
+  emit_jump (label_rtx (where));
   expand_label (ret);
 }
 
index 4c6d81de5434d7dc8e0f8693454f5d22b438b739..3c04ebf4492ab5e94648688c88b36eb45deab49b 100644 (file)
@@ -990,8 +990,7 @@ decode_signature_piece (stream, signature, limit, need_space)
       while (*signature && *signature != ';')
        {
          int ch = UTF8_GET (signature, limit);
-         /* `$' is the separator for an inner class.  */
-         if (ch == '/' || ch == '$')
+         if (ch == '/')
            fputs ("::", stream);
          else
            jcf_print_char (stream, ch);
index c603be1d3e0f1b53c21d344d451e2af974b2f4dc..d8418f71a2af67a6ed2e939ecf97935c056ba074 100644 (file)
@@ -98,7 +98,7 @@ union Word {
 #endif
 #ifndef IMMEDIATE_s4
 #define IMMEDIATE_s4 (PC+=4, CHECK_PC_IN_RANGE(PC), \
-  ((jint)((BCODE[PC-4] << 24) | (BCODE[PC-3] << 16) \
+  (WORD_TO_INT((BCODE[PC-4] << 24) | (BCODE[PC-3] << 16) \
          | (BCODE[PC-2] << 8) | (BCODE[PC-1]))))
 #endif
 
@@ -109,6 +109,16 @@ WORD_TO_FLOAT(jword w)
   return wu.f;
 } 
 
+/* Sign extend w. */
+static inline jint
+WORD_TO_INT(jword w)
+{
+  jint n = w;
+  n ^= (jint)1 << 31;
+  n -= (jint)1 << 31;
+  return n;
+} 
+
 static inline jlong
 WORDS_TO_LONG(jword hi, jword lo)
 {
index d909b2cf6a9e850ddb75b96dd0819516a0e5d5d5..9bd8a7cd0c02e6dc455cbf79784b98e1f3a070ac 100644 (file)
@@ -131,7 +131,7 @@ typedef struct JCF {
 #define JPOOL_UTF_DATA(JCF, INDEX) \
   ((JCF)->buffer+JPOOL_UINT(JCF, INDEX)+2)
 #endif
-#define JPOOL_INT(JCF, INDEX) ((jint) JPOOL_UINT (JCF, INDEX))
+#define JPOOL_INT(JCF, INDEX) (WORD_TO_INT(JPOOL_UINT (JCF, INDEX)))
 #define JPOOL_FLOAT(JCF, INDEX) WORD_TO_FLOAT (JPOOL_UINT (JCF, INDEX))
 
 #define CPOOL_INDEX_IN_RANGE(CPOOL, INDEX) \