From 15b9880136b6b4754a6e6498c81932e553246d9f Mon Sep 17 00:00:00 2001 From: Kartik Agaram Date: Sat, 22 Aug 2020 14:35:44 -0700 Subject: 6727 - bugfix in a multiply instruction Also more error-detection for this case all across the toolchain. --- 308allocate-array.subx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to '308allocate-array.subx') diff --git a/308allocate-array.subx b/308allocate-array.subx index 01eb1dc3..2d3d1a9d 100644 --- a/308allocate-array.subx +++ b/308allocate-array.subx @@ -6,12 +6,15 @@ allocate-array2: # ad: (addr allocation-descriptor), array-len: int, elem-size: 89/<- %ebp 4/r32/esp # . save registers 50/push-eax + 52/push-edx # 8b/-> *(ebp+0xc) 0/r32/eax - f7 4/subop/multiply-into 0/r32/eax *(ebp+0x10) + f7 4/subop/multiply-into-eax-edx *(ebp+0x10) + # TODO: check edx for overflow (allocate-array *(ebp+8) %eax *(ebp+0x14)) $allocate-array2:end: # . restore registers + 5a/pop-to-edx 58/pop-to-eax # . epilogue 89/<- %esp 5/r32/ebp -- cgit 1.4.1-2-gfad0