summaryrefslogtreecommitdiffstats
path: root/vm
diff options
context:
space:
mode:
Diffstat (limited to 'vm')
-rw-r--r--vm/arch/generic/Call.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/vm/arch/generic/Call.c b/vm/arch/generic/Call.c
index a39b76183..ae7441577 100644
--- a/vm/arch/generic/Call.c
+++ b/vm/arch/generic/Call.c
@@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+
/*
* This uses the FFI (Foreign Function Interface) library to abstract away
* the system-dependent stuff. The FFI code is slower than a custom
@@ -29,12 +30,20 @@ static ffi_type* getFfiType(char sigType)
{
switch (sigType) {
case 'V': return &ffi_type_void;
+ case 'Z': return &ffi_type_uint8;
+ case 'B': return &ffi_type_sint8;
+ case 'C': return &ffi_type_uint16;
+ case 'S': return &ffi_type_sint16;
+ case 'I': return &ffi_type_sint32;
case 'F': return &ffi_type_float;
- case 'D': return &ffi_type_double;
case 'J': return &ffi_type_sint64;
+ case 'D': return &ffi_type_double;
case '[':
case 'L': return &ffi_type_pointer;
- default: return &ffi_type_uint32;
+ default:
+ LOGE("bad ffitype 0x%02x\n", sigType);
+ dvmAbort();
+ return NULL;
}
}
@@ -63,7 +72,6 @@ void dvmPlatformInvoke(void* pEnv, ClassObject* clazz, int argInfo, int argc,
ffi_type* types[kMaxArgs];
void* values[kMaxArgs];
ffi_type* retType;
- const char* sig;
char sigByte;
int srcArg, dstArg;