* 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
-2000-04-19 Tom Tromey <tromey@cygnus.com>
+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.
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);
}
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);
#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
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)
{
#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) \