diff options
Diffstat (limited to '308allocate-array.subx')
-rw-r--r-- | 308allocate-array.subx | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/308allocate-array.subx b/308allocate-array.subx new file mode 100644 index 00000000..7040106c --- /dev/null +++ b/308allocate-array.subx @@ -0,0 +1,19 @@ +# 2-arg version of allocate-array. + +allocate-array2: # ad: (addr allocation-descriptor), elem-size: int, array-len: int, out: (addr handle array _) + # . prologue + 55/push-ebp + 89/<- %ebp 4/r32/esp + # . save registers + 50/push-eax + # + 8b/-> *(ebp+0xc) 0/r32/eax + f7 4/subop/multiply-into 0/r32/eax *(ebp+0x10) + (allocate-array *(ebp+8) %eax *(ebp+0x14)) +$allocate-array2:end: + # . restore registers + 58/pop-to-eax + # . epilogue + 89/<- %esp 5/r32/ebp + 5d/pop-to-ebp + c3/return |