Signed mod now calls __aeabi_idivmod instead of __modi3.

The ARM CPU does not have an integer division or modulo instruction. So the compiler must call
a helper function supplied by the C runtime. The helper function we had been calling,
__modi3, is not defined in our current C runtime, because gcc doesn't call it. Instead,
gcc calls __aeabi_idivmod, a function which computes both the dividend and the modulus at once.

We call __aeabi_idivmod now. We ignore the returned dividend, and just use the modulus.

Add a tiny test program to verify that mod works now.

Add sort.expected, the expected output of the sort.

The sort test now compiles and runs, but fails due to issues unrelated to modulus.
Need to investigate.
diff --git a/src/arm.md b/src/arm.md
index 35f777c..2b20ec3 100644
--- a/src/arm.md
+++ b/src/arm.md
@@ -327,7 +327,7 @@
 reg: DIVF4(reg,reg)  "\tfdvs\t%c, %0, %1\n"  1
 reg: DIVF8(reg,reg)  "\tdvfd\t%c, %0, %1\n"  1
 
-reg: MODI4(reg,reg)  "\tbl \t__modsi3\n"    1
+reg: MODI4(reg,reg)  "\tbl \t__aeabi_idivmod\n"    1
 reg: MODU4(reg,reg)  "\tbl\t|x$uremainder|\n"   1
 
 stmt: LABELV    "%a:\n"
@@ -469,11 +469,16 @@
 			setreg(p, ireg[n]);
 		}
 		break;
-	case DIV+I: case DIV+U: case MOD+I: case MOD+U:
+	case DIV+I: case DIV+U:
 		setreg(p, ireg[0]);
 		rtarget(p, 1, ireg[0]);
 		rtarget(p, 0, ireg[1]);
 		break;
+	case MOD+I: case MOD+U:
+		setreg(p, ireg[1]);
+		rtarget(p, 0, ireg[0]);
+		rtarget(p, 1, ireg[1]);
+		break;
 	}
 }
 static void clobber(p) Node p; {
@@ -484,6 +489,9 @@
 	case CALL+F: case CALL+I: case CALL+U: case CALL+P: case CALL+V:
 		spill(0xf, FREG, p);
 		break;
+	case MOD+I: case MOD+U:
+		/* spill(1, IREG, p); */
+		break;
 	}
 }
 static int imm(p) Node p; {
diff --git a/tst/sort.expected b/tst/sort.expected
new file mode 100644
index 0000000..75e1f0d
--- /dev/null
+++ b/tst/sort.expected
@@ -0,0 +1,20 @@
+exchange(1,9)
+exchange(3,7)
+exchange(5,6)
+exchange(0,5)
+exchange(0,3)
+exchange(0,0)
+exchange(1,2)
+exchange(6,6)
+exchange(8,9)
+exchange(7,8)
+-51
+-1
+0
+1
+3
+10
+18
+32
+567
+789
diff --git a/tst/test-android.py b/tst/test-android.py
index e18cc6a..7e63e89 100755
--- a/tst/test-android.py
+++ b/tst/test-android.py
@@ -14,19 +14,22 @@
   "incr",
   "init",
   "limits",
-  "nsievebits",
+  "sort", # bad output, bus error.
   "struct",
-  "switch"
+  "switch",
+  "testmod"
+]
+
+slow = [
+  "nsievebits"
 ]
 
 problems = [
-  "a", # short version of cf
-  "cf", # internal compiler error spill
-  "cq", # floats
-  "cvt", #floats
-  "front", # type error, compile error type in argument 4 to qsort
+  "cf", # floating point
+  "cq", # floating point
+  "cvt", # floating point
+  "front", # This is a test of the front end, it's supposed to fail in a variety of ways.
   "paranoia", # inline asm
-  "sort", # loader undefined reference to __modsi3
   "spill", # floating point
   "stdarg", # preprocessor issues
   "wf1", #requires input on stdin
diff --git a/tst/testmod.c b/tst/testmod.c
new file mode 100644
index 0000000..23881db
--- /dev/null
+++ b/tst/testmod.c
@@ -0,0 +1,8 @@
+extern void printf(const char* s,...);
+
+void main(int argc, char** argv) {
+    int i;
+    for (i = 1; i < 12; i++) {
+        printf("%d %% %d = %d\n", i, 3, i % 3);
+    }
+}
diff --git a/tst/testmod.expected b/tst/testmod.expected
new file mode 100644
index 0000000..875d12b
--- /dev/null
+++ b/tst/testmod.expected
@@ -0,0 +1,11 @@
+1 % 3 = 1
+2 % 3 = 2
+3 % 3 = 0
+4 % 3 = 1
+5 % 3 = 2
+6 % 3 = 0
+7 % 3 = 1
+8 % 3 = 2
+9 % 3 = 0
+10 % 3 = 1
+11 % 3 = 2