diff options
author | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-05-03 18:09:27 +0000 |
---|---|---|
committer | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-05-03 18:09:27 +0000 |
commit | 5bd9bc3c34f42c5e1e5c0ee5c01cc16f2fcbe031 (patch) | |
tree | 3e04a4bb49ef6a42d094bc95768fa8e79e19dadf /gcc/java/javaop.h | |
parent | a727a9112fe4704bddf60f335d7fb463856bdc6c (diff) | |
download | gcc-5bd9bc3c34f42c5e1e5c0ee5c01cc16f2fcbe031.tar.gz |
* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@33636 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/java/javaop.h')
-rw-r--r-- | gcc/java/javaop.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/gcc/java/javaop.h b/gcc/java/javaop.h index c603be1d3e0..d8418f71a2a 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) { |