Support for currently untested exceptions/errors.
Replace place holder implementations of exception/error code with code
that is likely mostly correct. Testing and creating detail messages are
TODO items for each of these exceptions/errors and warning are created
to reflect this need.
As we don't currently generate code to throw these exceptions, they are
untested.
Change-Id: I75876a9cca37892fa065eccdf34f9868b4142ec9
diff --git a/src/runtime_support.S b/src/runtime_support.S
index 4a50344..1b2c39b 100644
--- a/src/runtime_support.S
+++ b/src/runtime_support.S
@@ -67,6 +67,51 @@
mov r2, sp @ pass SP
b artThrowStackOverflowFromCode @ artThrowStackOverflowFromCode(method, Thread*, SP)
+ .global art_throw_neg_array_size_from_code
+ .extern artThrowNegArraySizeFromCode
+art_throw_neg_array_size_from_code:
+ stmdb sp!, {r1, r2, r3, r4, r5, r6, r7, r8, r9, r10, r11, lr}
+ sub sp, #16 @ 4 words of space, bottom word will hold Method*
+ mov r1, r9 @ pass Thread::Current
+ mov r2, sp @ pass SP
+ b artThrowNegArraySizeFromCode @ artThrowNegArraySizeFromCode(size, Thread*, SP)
+
+ .global art_throw_internal_error_from_code
+ .extern artThrowInternalErrorFromCode
+art_throw_internal_error_from_code:
+ stmdb sp!, {r1, r2, r3, r4, r5, r6, r7, r8, r9, r10, r11, lr}
+ sub sp, #16 @ 4 words of space, bottom word will hold Method*
+ mov r1, r9 @ pass Thread::Current
+ mov r2, sp @ pass SP
+ b artThrowInternalErrorFromCode @ artThrowInternalErrorFromCode(errnum, Thread*, SP)
+
+ .global art_throw_no_such_method_from_code
+ .extern artThrowNoSuchMethodFromCode
+art_throw_no_such_method_from_code:
+ stmdb sp!, {r1, r2, r3, r4, r5, r6, r7, r8, r9, r10, r11, lr}
+ sub sp, #16 @ 4 words of space, bottom word will hold Method*
+ mov r1, r9 @ pass Thread::Current
+ mov r2, sp @ pass SP
+ b artThrowNoSuchMethodFromCode @ artThrowNoSuchMethodFromCode(method_idx, Thread*, SP)
+
+ .global art_throw_runtime_exception_from_code
+ .extern artThrowRuntimeExceptionFromCode
+art_throw_runtime_exception_from_code:
+ stmdb sp!, {r1, r2, r3, r4, r5, r6, r7, r8, r9, r10, r11, lr}
+ sub sp, #16 @ 4 words of space, bottom word will hold Method*
+ mov r1, r9 @ pass Thread::Current
+ mov r2, sp @ pass SP
+ b artThrowRuntimeExceptionFromCode @ artThrowRuntimeExceptionFromCode(errnum, Thread*, SP)
+
+ .global art_throw_verification_error_from_code
+ .extern artThrowVerificationErrorFromCode
+art_throw_verification_error_from_code:
+ stmdb sp!, {r1, r2, r3, r4, r5, r6, r7, r8, r9, r10, r11, lr}
+ sub sp, #16 @ 4 words of space, bottom word will hold Method*
+ mov r2, r9 @ pass Thread::Current
+ mov r3, sp @ pass SP
+ b artThrowVerificationErrorFromCode @ artThrowVerificationErrorFromCode(src1, ref, Thread*, SP)
+
.global art_invoke_interface_trampoline
.extern artFindInterfaceMethodInCacheFromCode
/*