Description: Add RISCV64 support
Author: Wesley W. Terpstra <terpstra@debian.org>
Forwarded: no
Reviewed-by: Ryan Kavanagh <rak@debian.org>
Last-Update: 2021-10-06
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
Index: mlton/basis-library/mlton/platform.sig
===================================================================
--- mlton.orig/basis-library/mlton/platform.sig	2021-10-06 16:45:12.857794991 -0400
+++ mlton/basis-library/mlton/platform.sig	2021-10-06 16:45:12.853795347 -0400
@@ -10,7 +10,8 @@
       structure Arch:
          sig
             datatype t = Alpha | AMD64 | ARM | ARM64 | HPPA | IA64 | m68k |
-                         MIPS | MIPS64 | PowerPC | PowerPC64 | RISCV | S390 | Sparc | X86
+                         MIPS | MIPS64 | PowerPC | PowerPC64 | RISCV |
+                         RISCV64 | S390 | Sparc | X86
 
             val fromString: string -> t option
             val host: t
Index: mlton/basis-library/mlton/platform.sml
===================================================================
--- mlton.orig/basis-library/mlton/platform.sml	2021-10-06 16:45:12.857794991 -0400
+++ mlton/basis-library/mlton/platform.sml	2021-10-06 16:45:12.853795347 -0400
@@ -29,6 +29,7 @@
                 (PowerPC, "PowerPC"),
                 (PowerPC64, "PowerPC64"),
                 (RISCV, "RISCV"),
+                (RISCV64, "RISCV64"),
                 (S390, "S390"),
                 (Sparc, "Sparc"),
                 (X86, "X86")]
Index: mlton/basis-library/primitive/prim-mlton.sml
===================================================================
--- mlton.orig/basis-library/primitive/prim-mlton.sml	2021-10-06 16:45:12.857794991 -0400
+++ mlton/basis-library/primitive/prim-mlton.sml	2021-10-06 16:45:12.853795347 -0400
@@ -160,6 +160,7 @@
              | PowerPC
              | PowerPC64
              | RISCV
+             | RISCV64
              | S390
              | Sparc
              | X86
@@ -178,6 +179,7 @@
                 | "powerpc" => PowerPC
                 | "powerpc64" => PowerPC64
                 | "riscv" => RISCV
+                | "riscv64" => RISCV64
                 | "s390" => S390
                 | "sparc" => Sparc
                 | "x86" => X86
Index: mlton/bin/platform
===================================================================
--- mlton.orig/bin/platform	2021-10-06 16:45:12.857794991 -0400
+++ mlton/bin/platform	2021-10-06 16:45:12.853795347 -0400
@@ -134,6 +134,9 @@
 Power*)
         HOST_ARCH=powerpc
 ;;
+riscv64)
+	HOST_ARCH=riscv64
+;;
 riscv*)
         HOST_ARCH=riscv
 ;;
Index: mlton/doc/guide/src/MLtonPlatform.adoc
===================================================================
--- mlton.orig/doc/guide/src/MLtonPlatform.adoc	2021-10-06 16:45:12.857794991 -0400
+++ mlton/doc/guide/src/MLtonPlatform.adoc	2021-10-06 16:45:12.853795347 -0400
@@ -8,7 +8,7 @@
       structure Arch:
          sig
             datatype t = Alpha | AMD64 | ARM | ARM64 | HPPA | IA64 | m68k
-                       | MIPS | PowerPC | PowerPC64 | S390 | Sparc | X86
+                       | MIPS | PowerPC | PowerPC64 | RISCV64 | S390 | Sparc | X86
 
             val fromString: string -> t option
             val host: t
Index: mlton/lib/stubs/mlton-stubs/mlton.sml
===================================================================
--- mlton.orig/lib/stubs/mlton-stubs/mlton.sml	2021-10-06 16:45:12.857794991 -0400
+++ mlton/lib/stubs/mlton-stubs/mlton.sml	2021-10-06 16:45:12.853795347 -0400
@@ -161,7 +161,7 @@
                struct
                   datatype t = Alpha | AMD64 | ARM | ARM64 | HPPA | IA64 |
                                m68k | MIPS | MIPS64 | PowerPC | PowerPC64 | RISCV |
-                               S390 | Sparc | X86
+                               RISCV64 | S390 | Sparc | X86
 
                   val all = [(Alpha, "Alpha"),
                              (AMD64, "AMD64"),
@@ -175,6 +175,7 @@
                              (PowerPC, "PowerPC"),
                              (PowerPC64, "PowerPC64"),
                              (RISCV, "RISCV"),
+                             (RISCV64, "RISCV64"),
                              (S390, "S390"),
                              (Sparc, "Sparc"),
                              (X86, "X86")]
Index: mlton/lib/stubs/mlton-stubs/platform.sig
===================================================================
--- mlton.orig/lib/stubs/mlton-stubs/platform.sig	2021-10-06 16:45:12.857794991 -0400
+++ mlton/lib/stubs/mlton-stubs/platform.sig	2021-10-06 16:45:12.853795347 -0400
@@ -10,7 +10,8 @@
       structure Arch:
          sig
             datatype t = Alpha | AMD64 | ARM | ARM64 | HPPA | IA64 | m68k |
-                         MIPS | MIPS64 | PowerPC | PowerPC64 | RISCV | S390 | Sparc | X86
+                         MIPS | MIPS64 | PowerPC | PowerPC64 | RISCV | RISCV64 |
+                         S390 | Sparc | X86
 
             val fromString: string -> t option
             val host: t
Index: mlton/mlton/main/main.fun
===================================================================
--- mlton.orig/mlton/main/main.fun	2021-10-06 16:45:12.857794991 -0400
+++ mlton/mlton/main/main.fun	2021-10-06 16:45:12.857794991 -0400
@@ -201,6 +201,7 @@
        | IA64 => true
        | MIPS => true
        | MIPS64 => true
+       | RISCV64 => true
        | Sparc => true
        | S390 => true
        | _ => false
Index: mlton/runtime/cenv.h
===================================================================
--- mlton.orig/runtime/cenv.h	2021-10-06 16:45:12.857794991 -0400
+++ mlton/runtime/cenv.h	2021-10-06 16:45:12.857794991 -0400
@@ -109,6 +109,8 @@
 #include "platform/powerpc64.h"
 #elif (defined (__ppc__)) || (defined (__powerpc__))
 #include "platform/powerpc.h"
+#elif (defined(__riscv) && defined(__riscv_xlen) && __riscv_xlen == 64)
+#include "platform/riscv64.h"
 #elif (defined (__riscv))
 #include "platform/riscv.h"
 #elif (defined (__s390__))
Index: mlton/runtime/platform/linux.c
===================================================================
--- mlton.orig/runtime/platform/linux.c	2021-10-06 16:45:12.857794991 -0400
+++ mlton/runtime/platform/linux.c	2021-10-06 16:45:12.857794991 -0400
@@ -31,6 +31,9 @@
 #elif (defined (__ppc__)) || (defined (__powerpc__))
         ucontext_t* ucp = (ucontext_t*)context;
         GC_handleSigProf ((code_pointer) ucp->uc_mcontext.regs->nip);
+#elif (defined(__riscv) && defined(__riscv_xlen) && __riscv_xlen == 64)
+        ucontext_t* ucp = (ucontext_t*)context;
+        GC_handleSigProf ((code_pointer) ucp->uc_mcontext.__gregs[REG_PC]);
 #elif (defined (__sparc__))
         struct sigcontext* scp = (struct sigcontext*)context;
 #if __WORDSIZE == 64
Index: mlton/runtime/platform/riscv64.h
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ mlton/runtime/platform/riscv64.h	2021-10-06 16:45:12.857794991 -0400
@@ -0,0 +1 @@
+#define MLton_Platform_Arch_host "riscv64"
Index: mlton/regression/mlton.share.riscv64-linux.ok
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ mlton/regression/mlton.share.riscv64-linux.ok	2021-10-06 16:45:12.857794991 -0400
@@ -0,0 +1,718 @@
+size of a is 2408
+0 => NONE
+1 => (1, 1)
+2 => (0, 2)
+3 => (1, 0)
+4 => (0, 1)
+5 => (1, 2)
+6 => (0, 0)
+7 => (1, 1)
+8 => (0, 2)
+9 => (1, 0)
+10 => (0, 1)
+11 => (1, 2)
+12 => (0, 0)
+13 => (1, 1)
+14 => (0, 2)
+15 => (1, 0)
+16 => (0, 1)
+17 => (1, 2)
+18 => (0, 0)
+19 => (1, 1)
+20 => (0, 2)
+21 => (1, 0)
+22 => (0, 1)
+23 => (1, 2)
+24 => (0, 0)
+25 => (1, 1)
+26 => (0, 2)
+27 => (1, 0)
+28 => (0, 1)
+29 => (1, 2)
+30 => (0, 0)
+31 => (1, 1)
+32 => (0, 2)
+33 => (1, 0)
+34 => (0, 1)
+35 => (1, 2)
+36 => (0, 0)
+37 => (1, 1)
+38 => (0, 2)
+39 => (1, 0)
+40 => (0, 1)
+41 => (1, 2)
+42 => (0, 0)
+43 => (1, 1)
+44 => (0, 2)
+45 => (1, 0)
+46 => (0, 1)
+47 => (1, 2)
+48 => (0, 0)
+49 => (1, 1)
+50 => (0, 2)
+51 => (1, 0)
+52 => (0, 1)
+53 => (1, 2)
+54 => (0, 0)
+55 => (1, 1)
+56 => (0, 2)
+57 => (1, 0)
+58 => (0, 1)
+59 => (1, 2)
+60 => (0, 0)
+61 => (1, 1)
+62 => (0, 2)
+63 => (1, 0)
+64 => (0, 1)
+65 => (1, 2)
+66 => (0, 0)
+67 => (1, 1)
+68 => (0, 2)
+69 => (1, 0)
+70 => (0, 1)
+71 => (1, 2)
+72 => (0, 0)
+73 => (1, 1)
+74 => (0, 2)
+75 => (1, 0)
+76 => (0, 1)
+77 => (1, 2)
+78 => (0, 0)
+79 => (1, 1)
+80 => (0, 2)
+81 => (1, 0)
+82 => (0, 1)
+83 => (1, 2)
+84 => (0, 0)
+85 => (1, 1)
+86 => (0, 2)
+87 => (1, 0)
+88 => (0, 1)
+89 => (1, 2)
+90 => (0, 0)
+91 => (1, 1)
+92 => (0, 2)
+93 => (1, 0)
+94 => (0, 1)
+95 => (1, 2)
+96 => (0, 0)
+97 => (1, 1)
+98 => (0, 2)
+99 => (1, 0)
+size of a is 920
+0 => NONE
+1 => (1, 1)
+2 => (0, 2)
+3 => (1, 0)
+4 => (0, 1)
+5 => (1, 2)
+6 => (0, 0)
+7 => (1, 1)
+8 => (0, 2)
+9 => (1, 0)
+10 => (0, 1)
+11 => (1, 2)
+12 => (0, 0)
+13 => (1, 1)
+14 => (0, 2)
+15 => (1, 0)
+16 => (0, 1)
+17 => (1, 2)
+18 => (0, 0)
+19 => (1, 1)
+20 => (0, 2)
+21 => (1, 0)
+22 => (0, 1)
+23 => (1, 2)
+24 => (0, 0)
+25 => (1, 1)
+26 => (0, 2)
+27 => (1, 0)
+28 => (0, 1)
+29 => (1, 2)
+30 => (0, 0)
+31 => (1, 1)
+32 => (0, 2)
+33 => (1, 0)
+34 => (0, 1)
+35 => (1, 2)
+36 => (0, 0)
+37 => (1, 1)
+38 => (0, 2)
+39 => (1, 0)
+40 => (0, 1)
+41 => (1, 2)
+42 => (0, 0)
+43 => (1, 1)
+44 => (0, 2)
+45 => (1, 0)
+46 => (0, 1)
+47 => (1, 2)
+48 => (0, 0)
+49 => (1, 1)
+50 => (0, 2)
+51 => (1, 0)
+52 => (0, 1)
+53 => (1, 2)
+54 => (0, 0)
+55 => (1, 1)
+56 => (0, 2)
+57 => (1, 0)
+58 => (0, 1)
+59 => (1, 2)
+60 => (0, 0)
+61 => (1, 1)
+62 => (0, 2)
+63 => (1, 0)
+64 => (0, 1)
+65 => (1, 2)
+66 => (0, 0)
+67 => (1, 1)
+68 => (0, 2)
+69 => (1, 0)
+70 => (0, 1)
+71 => (1, 2)
+72 => (0, 0)
+73 => (1, 1)
+74 => (0, 2)
+75 => (1, 0)
+76 => (0, 1)
+77 => (1, 2)
+78 => (0, 0)
+79 => (1, 1)
+80 => (0, 2)
+81 => (1, 0)
+82 => (0, 1)
+83 => (1, 2)
+84 => (0, 0)
+85 => (1, 1)
+86 => (0, 2)
+87 => (1, 0)
+88 => (0, 1)
+89 => (1, 2)
+90 => (0, 0)
+91 => (1, 1)
+92 => (0, 2)
+93 => (1, 0)
+94 => (0, 1)
+95 => (1, 2)
+96 => (0, 0)
+97 => (1, 1)
+98 => (0, 2)
+99 => (1, 0)
+size of a is 1640
+0 => NONE
+1 => (1, 1)
+2 => (1, 1)
+3 => (0, 0)
+4 => (1, 1)
+5 => (2, 2)
+6 => (1, 1)
+7 => (1, 1)
+8 => (1, 1)
+9 => (0, 0)
+10 => (1, 1)
+11 => (2, 2)
+12 => (1, 1)
+13 => (1, 1)
+14 => (1, 1)
+15 => (0, 0)
+16 => (1, 1)
+17 => (2, 2)
+18 => (1, 1)
+19 => (1, 1)
+20 => (1, 1)
+21 => (0, 0)
+22 => (1, 1)
+23 => (2, 2)
+24 => (1, 1)
+25 => (1, 1)
+26 => (1, 1)
+27 => (0, 0)
+28 => (1, 1)
+29 => (2, 2)
+30 => (1, 1)
+31 => (1, 1)
+32 => (1, 1)
+33 => (0, 0)
+34 => (1, 1)
+35 => (2, 2)
+36 => (1, 1)
+37 => (1, 1)
+38 => (1, 1)
+39 => (0, 0)
+40 => (1, 1)
+41 => (2, 2)
+42 => (1, 1)
+43 => (1, 1)
+44 => (1, 1)
+45 => (0, 0)
+46 => (1, 1)
+47 => (2, 2)
+48 => (1, 1)
+49 => (1, 1)
+50 => (1, 1)
+51 => (0, 0)
+52 => (1, 1)
+53 => (2, 2)
+54 => (1, 1)
+55 => (1, 1)
+56 => (1, 1)
+57 => (0, 0)
+58 => (1, 1)
+59 => (2, 2)
+60 => (1, 1)
+61 => (1, 1)
+62 => (1, 1)
+63 => (0, 0)
+64 => (1, 1)
+65 => (2, 2)
+66 => (1, 1)
+67 => (1, 1)
+68 => (1, 1)
+69 => (0, 0)
+70 => (1, 1)
+71 => (2, 2)
+72 => (1, 1)
+73 => (1, 1)
+74 => (1, 1)
+75 => (0, 0)
+76 => (1, 1)
+77 => (2, 2)
+78 => (1, 1)
+79 => (1, 1)
+80 => (1, 1)
+81 => (0, 0)
+82 => (1, 1)
+83 => (2, 2)
+84 => (1, 1)
+85 => (1, 1)
+86 => (1, 1)
+87 => (0, 0)
+88 => (1, 1)
+89 => (2, 2)
+90 => (1, 1)
+91 => (1, 1)
+92 => (1, 1)
+93 => (0, 0)
+94 => (1, 1)
+95 => (2, 2)
+96 => (1, 1)
+97 => (1, 1)
+98 => (1, 1)
+99 => (0, 0)
+size of a is 872
+0 => NONE
+1 => (1, 1)
+2 => (1, 1)
+3 => (0, 0)
+4 => (1, 1)
+5 => (2, 2)
+6 => (1, 1)
+7 => (1, 1)
+8 => (1, 1)
+9 => (0, 0)
+10 => (1, 1)
+11 => (2, 2)
+12 => (1, 1)
+13 => (1, 1)
+14 => (1, 1)
+15 => (0, 0)
+16 => (1, 1)
+17 => (2, 2)
+18 => (1, 1)
+19 => (1, 1)
+20 => (1, 1)
+21 => (0, 0)
+22 => (1, 1)
+23 => (2, 2)
+24 => (1, 1)
+25 => (1, 1)
+26 => (1, 1)
+27 => (0, 0)
+28 => (1, 1)
+29 => (2, 2)
+30 => (1, 1)
+31 => (1, 1)
+32 => (1, 1)
+33 => (0, 0)
+34 => (1, 1)
+35 => (2, 2)
+36 => (1, 1)
+37 => (1, 1)
+38 => (1, 1)
+39 => (0, 0)
+40 => (1, 1)
+41 => (2, 2)
+42 => (1, 1)
+43 => (1, 1)
+44 => (1, 1)
+45 => (0, 0)
+46 => (1, 1)
+47 => (2, 2)
+48 => (1, 1)
+49 => (1, 1)
+50 => (1, 1)
+51 => (0, 0)
+52 => (1, 1)
+53 => (2, 2)
+54 => (1, 1)
+55 => (1, 1)
+56 => (1, 1)
+57 => (0, 0)
+58 => (1, 1)
+59 => (2, 2)
+60 => (1, 1)
+61 => (1, 1)
+62 => (1, 1)
+63 => (0, 0)
+64 => (1, 1)
+65 => (2, 2)
+66 => (1, 1)
+67 => (1, 1)
+68 => (1, 1)
+69 => (0, 0)
+70 => (1, 1)
+71 => (2, 2)
+72 => (1, 1)
+73 => (1, 1)
+74 => (1, 1)
+75 => (0, 0)
+76 => (1, 1)
+77 => (2, 2)
+78 => (1, 1)
+79 => (1, 1)
+80 => (1, 1)
+81 => (0, 0)
+82 => (1, 1)
+83 => (2, 2)
+84 => (1, 1)
+85 => (1, 1)
+86 => (1, 1)
+87 => (0, 0)
+88 => (1, 1)
+89 => (2, 2)
+90 => (1, 1)
+91 => (1, 1)
+92 => (1, 1)
+93 => (0, 0)
+94 => (1, 1)
+95 => (2, 2)
+96 => (1, 1)
+97 => (1, 1)
+98 => (1, 1)
+99 => (0, 0)
+size of a is 4008
+0 => NONE
+1 => (1, 1)
+2 => (0, 2)
+3 => (1, 0)
+4 => (0, 1)
+5 => (1, 2)
+6 => (0, 0)
+7 => (1, 1)
+8 => (0, 2)
+9 => (1, 0)
+10 => (0, 1)
+11 => (1, 2)
+12 => (0, 0)
+13 => (1, 1)
+14 => (0, 2)
+15 => (1, 0)
+16 => (0, 1)
+17 => (1, 2)
+18 => (0, 0)
+19 => (1, 1)
+20 => (0, 2)
+21 => (1, 0)
+22 => (0, 1)
+23 => (1, 2)
+24 => (0, 0)
+25 => (1, 1)
+26 => (0, 2)
+27 => (1, 0)
+28 => (0, 1)
+29 => (1, 2)
+30 => (0, 0)
+31 => (1, 1)
+32 => (0, 2)
+33 => (1, 0)
+34 => (0, 1)
+35 => (1, 2)
+36 => (0, 0)
+37 => (1, 1)
+38 => (0, 2)
+39 => (1, 0)
+40 => (0, 1)
+41 => (1, 2)
+42 => (0, 0)
+43 => (1, 1)
+44 => (0, 2)
+45 => (1, 0)
+46 => (0, 1)
+47 => (1, 2)
+48 => (0, 0)
+49 => (1, 1)
+50 => (0, 2)
+51 => (1, 0)
+52 => (0, 1)
+53 => (1, 2)
+54 => (0, 0)
+55 => (1, 1)
+56 => (0, 2)
+57 => (1, 0)
+58 => (0, 1)
+59 => (1, 2)
+60 => (0, 0)
+61 => (1, 1)
+62 => (0, 2)
+63 => (1, 0)
+64 => (0, 1)
+65 => (1, 2)
+66 => (0, 0)
+67 => (1, 1)
+68 => (0, 2)
+69 => (1, 0)
+70 => (0, 1)
+71 => (1, 2)
+72 => (0, 0)
+73 => (1, 1)
+74 => (0, 2)
+75 => (1, 0)
+76 => (0, 1)
+77 => (1, 2)
+78 => (0, 0)
+79 => (1, 1)
+80 => (0, 2)
+81 => (1, 0)
+82 => (0, 1)
+83 => (1, 2)
+84 => (0, 0)
+85 => (1, 1)
+86 => (0, 2)
+87 => (1, 0)
+88 => (0, 1)
+89 => (1, 2)
+90 => (0, 0)
+91 => (1, 1)
+92 => (0, 2)
+93 => (1, 0)
+94 => (0, 1)
+95 => (1, 2)
+96 => (0, 0)
+97 => (1, 1)
+98 => (0, 2)
+99 => (1, 0)
+size of a is 2520
+0 => NONE
+1 => (1, 1)
+2 => (0, 2)
+3 => (1, 0)
+4 => (0, 1)
+5 => (1, 2)
+6 => (0, 0)
+7 => (1, 1)
+8 => (0, 2)
+9 => (1, 0)
+10 => (0, 1)
+11 => (1, 2)
+12 => (0, 0)
+13 => (1, 1)
+14 => (0, 2)
+15 => (1, 0)
+16 => (0, 1)
+17 => (1, 2)
+18 => (0, 0)
+19 => (1, 1)
+20 => (0, 2)
+21 => (1, 0)
+22 => (0, 1)
+23 => (1, 2)
+24 => (0, 0)
+25 => (1, 1)
+26 => (0, 2)
+27 => (1, 0)
+28 => (0, 1)
+29 => (1, 2)
+30 => (0, 0)
+31 => (1, 1)
+32 => (0, 2)
+33 => (1, 0)
+34 => (0, 1)
+35 => (1, 2)
+36 => (0, 0)
+37 => (1, 1)
+38 => (0, 2)
+39 => (1, 0)
+40 => (0, 1)
+41 => (1, 2)
+42 => (0, 0)
+43 => (1, 1)
+44 => (0, 2)
+45 => (1, 0)
+46 => (0, 1)
+47 => (1, 2)
+48 => (0, 0)
+49 => (1, 1)
+50 => (0, 2)
+51 => (1, 0)
+52 => (0, 1)
+53 => (1, 2)
+54 => (0, 0)
+55 => (1, 1)
+56 => (0, 2)
+57 => (1, 0)
+58 => (0, 1)
+59 => (1, 2)
+60 => (0, 0)
+61 => (1, 1)
+62 => (0, 2)
+63 => (1, 0)
+64 => (0, 1)
+65 => (1, 2)
+66 => (0, 0)
+67 => (1, 1)
+68 => (0, 2)
+69 => (1, 0)
+70 => (0, 1)
+71 => (1, 2)
+72 => (0, 0)
+73 => (1, 1)
+74 => (0, 2)
+75 => (1, 0)
+76 => (0, 1)
+77 => (1, 2)
+78 => (0, 0)
+79 => (1, 1)
+80 => (0, 2)
+81 => (1, 0)
+82 => (0, 1)
+83 => (1, 2)
+84 => (0, 0)
+85 => (1, 1)
+86 => (0, 2)
+87 => (1, 0)
+88 => (0, 1)
+89 => (1, 2)
+90 => (0, 0)
+91 => (1, 1)
+92 => (0, 2)
+93 => (1, 0)
+94 => (0, 1)
+95 => (1, 2)
+96 => (0, 0)
+97 => (1, 1)
+98 => (0, 2)
+99 => (1, 0)
+size of a is 4008
+0 => NONE
+1 => (1, 1)
+2 => (0, 2)
+3 => (1, 0)
+4 => (0, 1)
+5 => (1, 2)
+6 => (0, 0)
+7 => (1, 1)
+8 => (0, 2)
+9 => (1, 0)
+10 => (0, 1)
+11 => (1, 2)
+12 => (0, 0)
+13 => (1, 1)
+14 => (0, 2)
+15 => (1, 0)
+16 => (0, 1)
+17 => (1, 2)
+18 => (0, 0)
+19 => (1, 1)
+20 => (0, 2)
+21 => (1, 0)
+22 => (0, 1)
+23 => (1, 2)
+24 => (0, 0)
+25 => (1, 1)
+26 => (0, 2)
+27 => (1, 0)
+28 => (0, 1)
+29 => (1, 2)
+30 => (0, 0)
+31 => (1, 1)
+32 => (0, 2)
+33 => (1, 0)
+34 => (0, 1)
+35 => (1, 2)
+36 => (0, 0)
+37 => (1, 1)
+38 => (0, 2)
+39 => (1, 0)
+40 => (0, 1)
+41 => (1, 2)
+42 => (0, 0)
+43 => (1, 1)
+44 => (0, 2)
+45 => (1, 0)
+46 => (0, 1)
+47 => (1, 2)
+48 => (0, 0)
+49 => (1, 1)
+50 => (0, 2)
+51 => (1, 0)
+52 => (0, 1)
+53 => (1, 2)
+54 => (0, 0)
+55 => (1, 1)
+56 => (0, 2)
+57 => (1, 0)
+58 => (0, 1)
+59 => (1, 2)
+60 => (0, 0)
+61 => (1, 1)
+62 => (0, 2)
+63 => (1, 0)
+64 => (0, 1)
+65 => (1, 2)
+66 => (0, 0)
+67 => (1, 1)
+68 => (0, 2)
+69 => (1, 0)
+70 => (0, 1)
+71 => (1, 2)
+72 => (0, 0)
+73 => (1, 1)
+74 => (0, 2)
+75 => (1, 0)
+76 => (0, 1)
+77 => (1, 2)
+78 => (0, 0)
+79 => (1, 1)
+80 => (0, 2)
+81 => (1, 0)
+82 => (0, 1)
+83 => (1, 2)
+84 => (0, 0)
+85 => (1, 1)
+86 => (0, 2)
+87 => (1, 0)
+88 => (0, 1)
+89 => (1, 2)
+90 => (0, 0)
+91 => (1, 1)
+92 => (0, 2)
+93 => (1, 0)
+94 => (0, 1)
+95 => (1, 2)
+96 => (0, 0)
+97 => (1, 1)
+98 => (0, 2)
+99 => (1, 0)
+size of a is 2400008
+(1, 1)
+size of a is 800120
+(1, 1)
+size is 296
+size is 136
+abcdef abcdef
+size is 88
+size is 56
+abcdef abcdef
+1 2
Index: mlton/regression/size2.riscv64-linux.ok
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ mlton/regression/size2.riscv64-linux.ok	2021-10-06 16:45:12.857794991 -0400
@@ -0,0 +1,24 @@
+The size of a char is = 0 bytes.
+The size of an int list of length 4 is = 96 bytes.
+The size of a string of length 10 is = 40 bytes.
+The size of an int array of length 10 is = 64 bytes.
+The size of a double array of length 10 is = 104 bytes.
+The size of a (word32 * double) array of length 10 is = 184 bytes.
+The size of a (word32 * word32 * double) array of length 10 is = 184 bytes.
+The size of a (word64 * double) array of length 10 is = 184 bytes.
+The size of a (word16 * double) array of length 10 is = 184 bytes.
+The size of a word64 array of length 10 is = 104 bytes.
+The size of a (word32 * word64) array of length 10 is = 184 bytes.
+The size of a (word32 * word32 * word64) array of length 10 is = 184 bytes.
+The size of a (word64 * word64) array of length 10 is = 184 bytes.
+The size of a (word16 * word64) array of length 10 is = 184 bytes.
+The size of an array of length 10 of 2-ples of ints is = 104 bytes.
+The size of an array of length 10 of 2-ples of (shared) ints is = 104 bytes.
+The size of an array of length 10 of arrays of length 20 of ints is = 1144 bytes.
+The size of an array of length 10 of (shared) arrays of length 20 of ints is = 208 bytes.
+The size of an array of length 10 of tuples of word16 * (arrays of length 20 of ints) is = 1224 bytes.
+The size of an array of length 10 of tuples of word32 * (arrays of length 20 of ints) is = 1224 bytes.
+The size of an array of length 10 of tuples of word64 * (arrays of length 20 of ints) is = 1224 bytes.
+The size of an array of length 10 of tuples of real32 * (arrays of length 20 of ints) is = 1224 bytes.
+The size of an array of length 10 of tuples of real64 * (arrays of length 20 of ints) is = 1224 bytes.
+The size of a useless function is = 0 bytes.
Index: mlton/regression/size3.riscv64-linux.ok
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ mlton/regression/size3.riscv64-linux.ok	2021-10-06 16:45:12.857794991 -0400
@@ -0,0 +1,114 @@
+The size of unit is = 0 bytes.
+The size of unit * unit is = 0 bytes.
+The size of bool is = 0 bytes.
+The size of bool * bool is = 16 bytes.
+The size of day is = 0 bytes.
+The size of day * day is = 0 bytes.
+The size of a char is = 0 bytes.
+The size of a char * char is = 0 bytes.
+The size of a word8 is = 0 bytes.
+The size of a word8 * word8 is = 0 bytes.
+The size of a word16 is = 0 bytes.
+The size of a word16 * word16 is = 0 bytes.
+The size of a word32 is = 0 bytes.
+The size of a word32 * word32 is = 16 bytes.
+The size of a word64 is = 0 bytes.
+The size of a word64 * word64 is = 24 bytes.
+The size of a word64 * word64 * word64 is = 32 bytes.
+The size of a word64 * word64 * word64 * word64 is = 40 bytes.
+The size of a unit list of length 4 is = 64 bytes.
+The size of a bool list of length 4 is = 96 bytes.
+The size of a day list of length 4 is = 96 bytes.
+The size of an int list of length 4 is = 96 bytes.
+The size of a string of length 10 is = 40 bytes.
+The size of a word64 array of length 0 is = 24 bytes.
+The size of a word64 array of length 1 is = 32 bytes.
+The size of a word64 array of length 2 is = 40 bytes.
+The size of a word64 array of length 3 is = 48 bytes.
+The size of a word64 array of length 4 is = 56 bytes.
+The size of a word64 array of length 5 is = 64 bytes.
+The size of a word64 array of length 6 is = 72 bytes.
+The size of a word64 array of length 7 is = 80 bytes.
+The size of a word64 array of length 8 is = 88 bytes.
+The size of a word64 array of length 9 is = 96 bytes.
+The size of a word64 array of length 10 is = 104 bytes.
+The size of a word64 array of length 11 is = 112 bytes.
+The size of a word64 array of length 12 is = 120 bytes.
+The size of a word32 array of length 0 is = 24 bytes.
+The size of a word32 array of length 1 is = 32 bytes.
+The size of a word32 array of length 2 is = 32 bytes.
+The size of a word32 array of length 3 is = 40 bytes.
+The size of a word32 array of length 4 is = 40 bytes.
+The size of a word32 array of length 5 is = 48 bytes.
+The size of a word32 array of length 6 is = 48 bytes.
+The size of a word32 array of length 7 is = 56 bytes.
+The size of a word32 array of length 8 is = 56 bytes.
+The size of a word32 array of length 9 is = 64 bytes.
+The size of a word32 array of length 10 is = 64 bytes.
+The size of a word32 array of length 11 is = 72 bytes.
+The size of a word32 array of length 12 is = 72 bytes.
+The size of a word16 array of length 0 is = 24 bytes.
+The size of a word16 array of length 1 is = 32 bytes.
+The size of a word16 array of length 2 is = 32 bytes.
+The size of a word16 array of length 3 is = 32 bytes.
+The size of a word16 array of length 4 is = 32 bytes.
+The size of a word16 array of length 5 is = 40 bytes.
+The size of a word16 array of length 6 is = 40 bytes.
+The size of a word16 array of length 7 is = 40 bytes.
+The size of a word16 array of length 8 is = 40 bytes.
+The size of a word16 array of length 9 is = 48 bytes.
+The size of a word16 array of length 10 is = 48 bytes.
+The size of a word16 array of length 11 is = 48 bytes.
+The size of a word16 array of length 12 is = 48 bytes.
+The size of a word8 array of length 0 is = 24 bytes.
+The size of a word8 array of length 1 is = 32 bytes.
+The size of a word8 array of length 2 is = 32 bytes.
+The size of a word8 array of length 3 is = 32 bytes.
+The size of a word8 array of length 4 is = 32 bytes.
+The size of a word8 array of length 5 is = 32 bytes.
+The size of a word8 array of length 6 is = 32 bytes.
+The size of a word8 array of length 7 is = 32 bytes.
+The size of a word8 array of length 8 is = 32 bytes.
+The size of a word8 array of length 9 is = 40 bytes.
+The size of a word8 array of length 10 is = 40 bytes.
+The size of a word8 array of length 11 is = 40 bytes.
+The size of a word8 array of length 12 is = 40 bytes.
+The size of a unit array of length 0 is = 24 bytes.
+The size of a unit array of length 1 is = 24 bytes.
+The size of a unit array of length 2 is = 24 bytes.
+The size of a unit array of length 3 is = 24 bytes.
+The size of a unit array of length 4 is = 24 bytes.
+The size of a unit array of length 5 is = 24 bytes.
+The size of a unit array of length 6 is = 24 bytes.
+The size of a unit array of length 7 is = 24 bytes.
+The size of a unit array of length 8 is = 24 bytes.
+The size of a unit array of length 9 is = 24 bytes.
+The size of a unit array of length 10 is = 24 bytes.
+The size of a unit array of length 11 is = 24 bytes.
+The size of a unit array of length 12 is = 24 bytes.
+The size of a word64 ref is = 16 bytes.
+The size of a word32 ref is = 16 bytes.
+The size of a word16 ref is = 16 bytes.
+The size of a word8 ref is = 16 bytes.
+The size of a unit ref is = 8 bytes.
+The size of a double array of length 10 is = 104 bytes.
+The size of a (word32 * double) array of length 10 is = 184 bytes.
+The size of a (word32 * word32 * double) array of length 10 is = 184 bytes.
+The size of a (word64 * double) array of length 10 is = 184 bytes.
+The size of a (word16 * double) array of length 10 is = 184 bytes.
+The size of a word64 array of length 10 is = 104 bytes.
+The size of a (word32 * word64) array of length 10 is = 184 bytes.
+The size of a (word32 * word32 * word64) array of length 10 is = 184 bytes.
+The size of a (word64 * word64) array of length 10 is = 184 bytes.
+The size of a (word16 * word64) array of length 10 is = 184 bytes.
+The size of an array of length 10 of 2-ples of ints is = 104 bytes.
+The size of an array of length 10 of 2-ples of (shared) ints is = 104 bytes.
+The size of an array of length 10 of arrays of length 20 of ints is = 1144 bytes.
+The size of an array of length 10 of (shared) arrays of length 20 of ints is = 208 bytes.
+The size of an array of length 10 of tuples of word16 * (arrays of length 20 of ints) is = 1224 bytes.
+The size of an array of length 10 of tuples of word32 * (arrays of length 20 of ints) is = 1224 bytes.
+The size of an array of length 10 of tuples of word64 * (arrays of length 20 of ints) is = 1224 bytes.
+The size of an array of length 10 of tuples of real32 * (arrays of length 20 of ints) is = 1224 bytes.
+The size of an array of length 10 of tuples of real64 * (arrays of length 20 of ints) is = 1224 bytes.
+The size of a useless function is = 0 bytes.
+The size of an empty string is = 24 bytes.
