[MLton-commit] r7256
Wesley Terpstra
wesley at mlton.org
Tue Oct 13 10:33:33 PDT 2009
Alpha support
----------------------------------------------------------------------
U mlton/trunk/bin/mlton-script
U mlton/trunk/runtime/Makefile
U mlton/trunk/runtime/basis/Word/Word.c
U mlton/trunk/runtime/platform/linux.c
----------------------------------------------------------------------
Modified: mlton/trunk/bin/mlton-script
===================================================================
--- mlton/trunk/bin/mlton-script 2009-10-13 15:47:08 UTC (rev 7255)
+++ mlton/trunk/bin/mlton-script 2009-10-13 17:33:31 UTC (rev 7256)
@@ -100,6 +100,7 @@
-mlb-path-map "$lib/mlb-path-map" \
-target-as-opt amd64 '-m64' \
-target-as-opt x86 '-m32' \
+ -target-cc-opt alpha '-mieee' \
-target-cc-opt amd64 '-m64' \
-target-cc-opt darwin \
'-I/usr/local/include
@@ -120,6 +121,7 @@
-malign-jumps=2
-malign-loops=2' \
-target-link-opt amd64 '-m64' \
+ -target-link-opt alpha '-mieee' \
-target-link-opt darwin "$darwinLinkOpts" \
-target-link-opt freebsd '-L/usr/local/lib/' \
-target-link-opt aix '-maix64' \
Modified: mlton/trunk/runtime/Makefile
===================================================================
--- mlton/trunk/runtime/Makefile 2009-10-13 15:47:08 UTC (rev 7255)
+++ mlton/trunk/runtime/Makefile 2009-10-13 17:33:31 UTC (rev 7256)
@@ -55,6 +55,10 @@
endif
endif
+ifeq ($(TARGET_ARCH), alpha)
+FLAGS += -mieee
+endif
+
ifeq ($(TARGET_ARCH), amd64)
FLAGS += -m64
DEBUGFLAGS += -gstabs+
Modified: mlton/trunk/runtime/basis/Word/Word.c
===================================================================
--- mlton/trunk/runtime/basis/Word/Word.c 2009-10-13 15:47:08 UTC (rev 7255)
+++ mlton/trunk/runtime/basis/Word/Word.c 2009-10-13 17:33:31 UTC (rev 7256)
@@ -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__) || defined(__s390__))
+#if ! (defined(__alpha__) || 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 15:47:08 UTC (rev 7255)
+++ mlton/trunk/runtime/platform/linux.c 2009-10-13 17:33:31 UTC (rev 7256)
@@ -13,9 +13,6 @@
#define EIP 14
#endif
-/* potentially correct for other archs:
- * alpha: ucp->m_context.sc_pc
- */
static void catcher (__attribute__ ((unused)) int sig,
__attribute__ ((unused)) siginfo_t* sip,
void* mystery) {
@@ -26,6 +23,9 @@
#endif
ucontext_t* ucp = (ucontext_t*)mystery;
GC_handleSigProf ((code_pointer) ucp->uc_mcontext.gregs[REG_RIP]);
+#elif (defined (__alpha__))
+ ucontext_t* ucp = (ucontext_t*)mystery;
+ GC_handleSigProf ((code_pointer) (ucp->uc_mcontext.sc_pc));
#elif (defined (__hppa__))
ucontext_t* ucp = (ucontext_t*)mystery;
GC_handleSigProf ((code_pointer) (ucp->uc_mcontext.sc_iaoq[0] & ~0x3UL));
More information about the MLton-commit
mailing list