[MLton-commit] r7081

adam at mlton.org adam at mlton.org
Tue Apr 14 18:15:45 PDT 2009


Preliminary support for arm-linux
----------------------------------------------------------------------

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-04-13 23:06:09 UTC (rev 7080)
+++ mlton/trunk/runtime/basis/Word/Word.c	2009-04-15 01:15:44 UTC (rev 7081)
@@ -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__))
+#if ! (defined (__amd64__) || defined (__hppa__) || defined (__i386__) || defined(__ia64__) || defined(__mips__) || defined (__ppc__) || defined (__powerpc__) || defined (__powerpc64__) || defined (__sparc__) || defined (__arm__))
 #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-04-13 23:06:09 UTC (rev 7080)
+++ mlton/trunk/runtime/platform/linux.c	2009-04-15 01:15:44 UTC (rev 7081)
@@ -16,7 +16,6 @@
 
 /* potentially correct for other archs:
  *  alpha: ucp->m_context.sc_pc
- *  arm: ucp->m_context.ctx.arm_pc
  *  ia64: ucp->m_context.sc_ip & ~0x3UL
  *  s390: ucp->m_context.sregs->regs.psw.addr
  */
@@ -53,6 +52,9 @@
 #elif (defined (__i386__))
         ucontext_t* ucp = (ucontext_t*)mystery;
         GC_handleSigProf ((code_pointer) ucp->uc_mcontext.gregs[EIP]);
+#elif (defined (__arm__))
+        ucontext_t* ucp = (ucontext_t*)mystery;
+        GC_handleSigProf ((code_pointer) ucp->uc_mcontext.arm_pc);
 #else
 #error Profiling handler is missing for this architecture
 #endif




More information about the MLton-commit mailing list