diff options
author | Tom Tromey <tromey@gcc.gnu.org> | 2000-05-03 18:09:27 +0000 |
---|---|---|
committer | Tom Tromey <tromey@gcc.gnu.org> | 2000-05-03 18:09:27 +0000 |
commit | dd5d628184dfb8c460ad01a480a366d735ba6f4f (patch) | |
tree | 3e04a4bb49ef6a42d094bc95768fa8e79e19dadf | |
parent | 8c8de5fc10d0c5bc658de7f2dfc75c33b1fb541d (diff) | |
download | gcc-dd5d628184dfb8c460ad01a480a366d735ba6f4f.zip gcc-dd5d628184dfb8c460ad01a480a366d735ba6f4f.tar.gz gcc-dd5d628184dfb8c460ad01a480a366d735ba6f4f.tar.bz2 |
expr.c (build_java_jsr): Use emit_jump, not expand_goto.
* 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
-rw-r--r-- | gcc/java/ChangeLog | 18 | ||||
-rw-r--r-- | gcc/java/expr.c | 2 | ||||
-rw-r--r-- | gcc/java/gjavah.c | 3 | ||||
-rw-r--r-- | gcc/java/javaop.h | 12 | ||||
-rw-r--r-- | gcc/java/jcf.h | 2 |
5 files changed, 31 insertions, 6 deletions
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog index e3e3a63..df283c6 100644 --- a/gcc/java/ChangeLog +++ b/gcc/java/ChangeLog @@ -1,4 +1,20 @@ -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. diff --git a/gcc/java/expr.c b/gcc/java/expr.c index 37358e5..7a92a8c 100644 --- a/gcc/java/expr.c +++ b/gcc/java/expr.c @@ -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); } diff --git a/gcc/java/gjavah.c b/gcc/java/gjavah.c index 4c6d81d..3c04ebf 100644 --- a/gcc/java/gjavah.c +++ b/gcc/java/gjavah.c @@ -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); diff --git a/gcc/java/javaop.h b/gcc/java/javaop.h index c603be1..d8418f7 100644 --- a/gcc/java/javaop.h +++ b/gcc/java/javaop.h @@ -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) { diff --git a/gcc/java/jcf.h b/gcc/java/jcf.h index d909b2c..9bd8a7c 100644 --- a/gcc/java/jcf.h +++ b/gcc/java/jcf.h @@ -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) \ |