From 3350c34a74844e21ea69077e01efff3bae64bdcd Mon Sep 17 00:00:00 2001 From: Kartik Agaram Date: Tue, 23 Mar 2021 17:31:08 -0700 Subject: . --- html/linux/314divide.subx.html | 77 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 html/linux/314divide.subx.html (limited to 'html/linux/314divide.subx.html') diff --git a/html/linux/314divide.subx.html b/html/linux/314divide.subx.html new file mode 100644 index 00000000..8ed12251 --- /dev/null +++ b/html/linux/314divide.subx.html @@ -0,0 +1,77 @@ + + + + +Mu - linux/314divide.subx + + + + + + + + + + +https://github.com/akkartik/mu/blob/main/linux/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