about summary refs log tree commit diff stats
path: root/400.mu
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2020-11-27 13:24:50 -0800
committerKartik Agaram <vc@akkartik.com>2020-11-27 21:37:20 -0800
commit6f65b65f7d7261d79b58df25e5e0b20bfbc240ec (patch)
tree02197d3c76d993cf61ff0c2a5ff2bf7e016462b3 /400.mu
parent704265bd3c805ea71c0a0bc8a4280de46976b126 (diff)
downloadmu-6f65b65f7d7261d79b58df25e5e0b20bfbc240ec.tar.gz
7290
I've wrestled for a long time with how to support integer division with
its hard-coded registers. The answer's always been staring me in the face:
just turn it into a function! We already expect function outputs to go
to hard-coded registers.
Diffstat (limited to '400.mu')
-rw-r--r--400.mu2
1 files changed, 2 insertions, 0 deletions
diff --git a/400.mu b/400.mu
index 4f95c226..d3ff0e9b 100644
--- a/400.mu
+++ b/400.mu
@@ -185,3 +185,5 @@ sig stream-final s: (addr stream byte) -> _/eax: byte
 #sig copy-bytes src: (addr byte), dest: (addr byte), n: int
 sig copy-array-object src: (addr array _), dest-ah: (addr handle array _)
 sig copy-file src: (addr buffered-file), dest-ah: (addr handle buffered-file), filename: (addr array byte)
+
+sig integer-divide a: int, b: int -> _/eax: int, _/edx: int