From 3350c34a74844e21ea69077e01efff3bae64bdcd Mon Sep 17 00:00:00 2001 From: Kartik Agaram Date: Tue, 23 Mar 2021 17:31:08 -0700 Subject: . --- html/linux/308allocate-array.subx.html | 85 ++++++++++++++++++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 html/linux/308allocate-array.subx.html (limited to 'html/linux/308allocate-array.subx.html') diff --git a/html/linux/308allocate-array.subx.html b/html/linux/308allocate-array.subx.html new file mode 100644 index 00000000..5ac1e3ed --- /dev/null +++ b/html/linux/308allocate-array.subx.html @@ -0,0 +1,85 @@ + + + + +Mu - linux/308allocate-array.subx + + + + + + + + + + +https://github.com/akkartik/mu/blob/main/linux/308allocate-array.subx +
+ 1 # 2-arg version of allocate-array.
+ 2 # Really only intended to be called from code generated by mu.subx.
+ 3 
+ 4 == code
+ 5 
+ 6 allocate-array2:  # ad: (addr allocation-descriptor), array-len: int, elem-size: int, out: (addr handle array _)
+ 7     # . prologue
+ 8     55/push-ebp
+ 9     89/<- %ebp 4/r32/esp
+10     # . save registers
+11     50/push-eax
+12     52/push-edx
+13     #
+14     8b/-> *(ebp+0xc) 0/r32/eax
+15     f7 4/subop/multiply-into-edx-eax *(ebp+0x10)
+16     # TODO: check edx for overflow
+17     (allocate-array *(ebp+8) %eax *(ebp+0x14))
+18 $allocate-array2:end:
+19     # . restore registers
+20     5a/pop-to-edx
+21     58/pop-to-eax
+22     # . epilogue
+23     89/<- %esp 5/r32/ebp
+24     5d/pop-to-ebp
+25     c3/return
+
+ + + -- cgit 1.4.1-2-gfad0