1 # 2-arg version of allocate-array. 2 3 == code 4 5 allocate-array2: # ad: (addr allocation-descriptor), array-len: int, elem-size: int, out: (addr handle array _) 6 # . prologue 7 55/push-ebp 8 89/<- %ebp 4/r32/esp 9 # . save registers 10 50/push-eax 11 52/push-edx 12 # 13 8b/-> *(ebp+0xc) 0/r32/eax 14 f7 4/subop/multiply-into-edx-eax *(ebp+0x10) 15 # TODO: check edx for overflow 16 (allocate-array *(ebp+8) %eax *(ebp+0x14)) 17 $allocate-array2:end: 18 # . restore registers 19 5a/pop-to-edx 20 58/pop-to-eax 21 # . epilogue 22 89/<- %esp 5/r32/ebp 23 5d/pop-to-ebp 24 c3/return