* interpret.cc (run): Correctly access libffi return values of
integral smaller-than-int type; these are implicitly promoted.
From-SVN: r84645
+2004-07-13 Ulrich Weigand <uweigand@de.ibm.com>
+
+ * interpret.cc (run): Correctly access libffi return values of
+ integral smaller-than-int type; these are implicitly promoted.
+
2004-07-13 Bryce McKinlay <mckinlay@redhat.com>
PR libgcj/7587
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: