* src/vm/jit/powerpc/darwin/md-os.c (md_signal_handler_sigusr2): New
authortwisti <none@none>
Tue, 4 Jul 2006 16:05:35 +0000 (16:05 +0000)
committertwisti <none@none>
Tue, 4 Jul 2006 16:05:35 +0000 (16:05 +0000)
function.

* src/vm/jit/powerpc/darwin/md-asm.h (asm_handle_nullptr_exception):
Removed.
(asm_abstractmethoderror): Added.
(exceptions_asm_new_abstractmethoderror): Likewise.
* src/vm/jit/powerpc/asmpart.S
(L_exceptions_asm_new_abstractmethoderror$stub): Added.

src/vm/jit/powerpc/asmpart.S
src/vm/jit/powerpc/darwin/md-asm.h
src/vm/jit/powerpc/darwin/md-os.c

index 86417c6202ea239464429f9b8d1ebba0665272fc..3e9cc60276087dc7e29026b715c05572a1acf9d7 100644 (file)
@@ -31,7 +31,7 @@
    Changes: Christian Thalinger
             Edwin Steiner
 
-   $Id: asmpart.S 5060 2006-06-28 21:52:26Z twisti $
+   $Id: asmpart.S 5074 2006-07-04 16:05:35Z twisti $
 
 */
 
@@ -1565,6 +1565,26 @@ L_builtin_asm_get_exceptionptrptr$lazy_ptr:
        .long dyld_stub_binding_helper
 
 
+.section __TEXT,__picsymbolstub1,symbol_stubs,pure_instructions,32
+       .align 2
+L_exceptions_asm_new_abstractmethoderror$stub:
+       .indirect_symbol _exceptions_asm_new_abstractmethoderror
+       mflr r0
+       bcl 20,31,L00$_exceptions_asm_new_abstractmethoderror
+L00$_exceptions_asm_new_abstractmethoderror:
+       mflr r11
+       addis r11,r11,ha16(L_exceptions_asm_new_abstractmethoderror$lazy_ptr - L00$_exceptions_asm_new_abstractmethoderror)
+       mtlr r0
+       lwzu r12,lo16(L_exceptions_asm_new_abstractmethoderror$lazy_ptr - L00$_exceptions_asm_new_abstractmethoderror)(r11)
+       mtctr r12
+       bctr
+.data
+.lazy_symbol_pointer
+L_exceptions_asm_new_abstractmethoderror$lazy_ptr:
+       .indirect_symbol _exceptions_asm_new_abstractmethoderror
+       .long dyld_stub_binding_helper
+
+
 .section __TEXT,__picsymbolstub1,symbol_stubs,pure_instructions,32
        .align 2
 L_replace_me$stub:
index 45e8da558637db95d2e6982fbc64c3891163c7fb..f3ec0d1c6a0a2b0e5d4a03788ab238d4f08c1253 100644 (file)
@@ -28,7 +28,7 @@
 
    Changes:
 
-   $Id: md-asm.h 4921 2006-05-15 14:24:36Z twisti $
+   $Id: md-asm.h 5074 2006-07-04 16:05:35Z twisti $
 
 */
 
 
 #define asm_handle_nat_exception              _asm_handle_nat_exception
 #define asm_handle_exception                  _asm_handle_exception
-#define asm_handle_nullptr_exception          _asm_handle_nullptr_exception
+
+#define asm_abstractmethoderror               _asm_abstractmethoderror
+
 #define asm_wrapper_patcher                   _asm_wrapper_patcher
+
 #define asm_replacement_out                   _asm_replacement_out
 #define asm_replacement_in                    _asm_replacement_in
 
 #define builtin_throw_exception               L_builtin_throw_exception$stub
 #define exceptions_handle_exception           L_exceptions_handle_exception$stub
 #define jit_asm_compile                       L_jit_asm_compile$stub
+
+#define exceptions_asm_new_abstractmethoderror \
+    L_exceptions_asm_new_abstractmethoderror$stub
+
 #define replace_me                            L_replace_me$stub
 
 #define stacktrace_create_extern_stackframeinfo \
index 24bee580001e3e7e9c71e160179f115234b4e496..837624659f4fcc0fb1b95323d90225fba33b6b2e 100644 (file)
@@ -28,7 +28,7 @@
 
    Changes:
 
-   $Id: md-os.c 4966 2006-05-26 12:58:40Z twisti $
+   $Id: md-os.c 5074 2006-07-04 16:05:35Z twisti $
 
 */
 
@@ -104,6 +104,32 @@ void md_signal_handler_sigsegv(int sig, siginfo_t *siginfo, void *_p)
 }
 
 
+/* md_signal_handler_sigusr2 ***************************************************
+
+   Signal handler for profiling sampling.
+
+*******************************************************************************/
+
+void md_signal_handler_sigusr2(int sig, siginfo_t *siginfo, void *_p)
+{
+       threadobject       *t;
+       ucontext_t         *_uc;
+       mcontext_t          _mc;
+       ppc_thread_state_t *_ss;
+       u1                 *pc;
+
+       t = THREADOBJECT;
+
+       _uc = (ucontext_t *) _p;
+       _mc = _uc->uc_mcontext;
+       _ss = &_mc->ss;
+
+       pc = (u1 *) _ss->srr0;
+
+       t->pc = pc;
+}
+
+
 #if defined(ENABLE_THREADS)
 void thread_restartcriticalsection(ucontext_t *_uc)
 {