Port-powerpc archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

syscall trap



Hi all.

In order to get decent performances for COMPAT_MACH, I need to ignore
two system calls very early in syscall processing (Darwin binaries call
it continuously)

I tried the following patch , but it does not work (theses system calls
are not ignored at all). Any idea why?

--- trap_subr.S 2002/10/10 22:37:52     1.29
+++ trap_subr.S 2002/11/24 22:21:38
@@ -705,8 +705,19 @@
        .globl  _C_LABEL(sctrap),_C_LABEL(scsize)
 _C_LABEL(sctrap):
        mtsprg  1,1                     /* save SP */
        stmw    28,tempsave(0)          /* free r28-r31 */
+#ifdef COMPAT_MACH
+/*
+ * Handle the cthread Mach fast traps: Do nothing, but do it fast.
+ */
+       li      28,0x7ff2       # cthread_info
+       cmp     0,28
+       beq     1f
+       li      28,0x7ff1       # cthread_set_self
+       cmp     0,28
+       beq     1f
+#endif
        mflr    28                      /* save LR */
        mfcr    29                      /* save CR */
        bla     s_sctrap
        _C_LABEL(scsize) = .-_C_LABEL(sctrap)

-- 
Emmanuel Dreyfus
manu%netbsd.org@localhost



Home | Main Index | Thread Index | Old Index