[MLton-commit] r7244

Wesley Terpstra wesley at mlton.org
Tue Oct 13 01:27:58 PDT 2009


Super easy s390 port.


----------------------------------------------------------------------

U   mlton/trunk/runtime/basis/Word/Word.c
U   mlton/trunk/runtime/platform/linux.c

----------------------------------------------------------------------

Modified: mlton/trunk/runtime/basis/Word/Word.c
===================================================================
--- mlton/trunk/runtime/basis/Word/Word.c	2009-10-13 01:49:25 UTC (rev 7243)
+++ mlton/trunk/runtime/basis/Word/Word.c	2009-10-13 08:27:54 UTC (rev 7244)
@@ -24,7 +24,7 @@
  * implements / and %.
  */
 
-#if ! (defined (__amd64__) || defined (__hppa__) || defined (__i386__) || defined(__ia64__) || defined(__mips__) || defined (__ppc__) || defined (__powerpc__) || defined (__powerpc64__) || defined (__sparc__) || defined (__arm__))
+#if ! (defined (__amd64__) || defined (__hppa__) || defined (__i386__) || defined(__ia64__) || defined(__mips__) || defined (__ppc__) || defined (__powerpc__) || defined (__powerpc64__) || defined (__sparc__) || defined (__arm__) || defined(__s390__))
 #error check that C {/,%} correctly implement {quot,rem} from the basis library
 #endif
 

Modified: mlton/trunk/runtime/platform/linux.c
===================================================================
--- mlton/trunk/runtime/platform/linux.c	2009-10-13 01:49:25 UTC (rev 7243)
+++ mlton/trunk/runtime/platform/linux.c	2009-10-13 08:27:54 UTC (rev 7244)
@@ -16,7 +16,6 @@
 /* potentially correct for other archs:
  *  alpha: ucp->m_context.sc_pc
  *  ia64: ucp->m_context.sc_ip & ~0x3UL
- *  s390: ucp->m_context.sregs->regs.psw.addr
  */
 static void catcher (__attribute__ ((unused)) int sig, 
                      __attribute__ ((unused)) siginfo_t* sip, 
@@ -54,6 +53,9 @@
 #elif (defined (__arm__))
         ucontext_t* ucp = (ucontext_t*)mystery;
         GC_handleSigProf ((code_pointer) ucp->uc_mcontext.arm_pc);
+#elif (defined (__s390__))
+        ucontext_t* ucp = (ucontext_t*)mystery;
+        GC_handleSigProf ((code_pointer) ucp->uc_mcontext.psw.addr);
 #else
 #error Profiling handler is missing for this architecture
 #endif




More information about the MLton-commit mailing list