summaryrefslogtreecommitdiff
path: root/libjava/interpret.cc
diff options
context:
space:
mode:
authoruweigand <uweigand@138bc75d-0d04-0410-961f-82ee72b054a4>2004-07-13 21:06:33 +0000
committeruweigand <uweigand@138bc75d-0d04-0410-961f-82ee72b054a4>2004-07-13 21:06:33 +0000
commit222745f29d5b7e92ff5545f7e0fd55989ae7c3b4 (patch)
tree1f28b58160952afbf6be3efe85eff797baba40f9 /libjava/interpret.cc
parent965daed0d5e71b74e84c92d4e99c316edf76b3d6 (diff)
downloadgcc-222745f29d5b7e92ff5545f7e0fd55989ae7c3b4.tar.gz
* interpret.cc (run): Correctly access libffi return values of
integral smaller-than-int type; these are implicitly promoted. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@84645 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/interpret.cc')
-rw-r--r--libjava/interpret.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/libjava/interpret.cc b/libjava/interpret.cc
index 40c7cbaac5a..109ee10ff8b 100644
--- a/libjava/interpret.cc
+++ b/libjava/interpret.cc
@@ -1207,15 +1207,15 @@ _Jv_InterpMethod::run (void *retp, ffi_raw *args)
switch (rtype)
{
case FFI_TYPE_SINT8:
- PUSHI (rvalue.byte_value);
+ PUSHI ((jbyte)(rvalue.int_value & 0xff));
break;
case FFI_TYPE_SINT16:
- PUSHI (rvalue.short_value);
+ PUSHI ((jshort)(rvalue.int_value & 0xffff));
break;
case FFI_TYPE_UINT16:
- PUSHI (rvalue.char_value);
+ PUSHI (rvalue.int_value & 0xffff);
break;
case FFI_TYPE_FLOAT: