From 775f77c3346d231fc6133de2c7da2bb1e8ef0c2e Mon Sep 17 00:00:00 2001 From: Kartik Agaram Date: Sun, 29 Nov 2020 13:36:32 -0800 Subject: 7306 --- html/314divide.subx.html | 77 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 html/314divide.subx.html (limited to 'html/314divide.subx.html') diff --git a/html/314divide.subx.html b/html/314divide.subx.html new file mode 100644 index 00000000..d284f8e7 --- /dev/null +++ b/html/314divide.subx.html @@ -0,0 +1,77 @@ + + + + +Mu - 314divide.subx + + + + + + + + + + +https://github.com/akkartik/mu/blob/master/314divide.subx +
+ 1 == code
+ 2 
+ 3 integer-divide:  # a: int, b: int -> quotient/eax: int, remainder/edx: int
+ 4     # . prologue
+ 5     55/push-ebp
+ 6     89/<- %ebp 4/r32/esp
+ 7     # eax = a
+ 8     8b/-> *(ebp+8) 0/r32/eax
+ 9     # edx = all 0s or all 1s
+10     99/sign-extend-eax-into-edx
+11     # quotient, remainder = divide eax by b
+12     f7 7/subop/divide-eax-edx-by *(ebp+0xc)
+13 $integer-divide:end:
+14     # . epilogue
+15     89/<- %esp 5/r32/ebp
+16     5d/pop-to-ebp
+17     c3/return
+
+ + + -- cgit 1.4.1-2-gfad0