diff options
author | Kartik Agaram <vc@akkartik.com> | 2020-05-21 15:42:32 -0700 |
---|---|---|
committer | Kartik Agaram <vc@akkartik.com> | 2020-05-21 15:42:32 -0700 |
commit | 401b4b18ea76e2d6c7a638f9b3499adf0c571de9 (patch) | |
tree | ab69b90e7896be8e3188c2643f523a3b5de6283c /apps/mu.subx | |
parent | c1804838791ef62e377cfc6bb036aca21ae8e85f (diff) | |
download | mu-401b4b18ea76e2d6c7a638f9b3499adf0c571de9.tar.gz |
mu.subx: 7 failing tests remaining
Just for user-defined types.
Diffstat (limited to 'apps/mu.subx')
-rw-r--r-- | apps/mu.subx | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/apps/mu.subx b/apps/mu.subx index 106a06f7..117a1819 100644 --- a/apps/mu.subx +++ b/apps/mu.subx @@ -2699,7 +2699,7 @@ test-convert-index-into-array-on-stack-with-literal: 5d/pop-to-ebp c3/return -_failing-test-convert-index-into-array-using-offset: +test-convert-index-into-array-using-offset: # . prologue 55/push-ebp 89/<- %ebp 4/r32/esp @@ -2750,7 +2750,7 @@ _failing-test-convert-index-into-array-using-offset: 5d/pop-to-ebp c3/return -_failing-test-convert-index-into-array-using-offset-on-stack: +test-convert-index-into-array-using-offset-on-stack: # . prologue 55/push-ebp 89/<- %ebp 4/r32/esp @@ -8816,14 +8816,17 @@ translate-mu-compute-index-stmt: # out: (addr buffered-file), stmt: (addr stmt) (write-buffered *(ebp+8) "69/multiply") # ecx = stmt 8b/-> *(ebp+0xc) 1/r32/ecx - # var first-inout/edx: (handle stmt-var) = stmt->inouts[0] - 8b/-> *(ecx+8) 2/r32/edx # Stmt1-inouts + # var first-inout/ebx: (addr stmt-var) = stmt->inouts[0] + (lookup *(ecx+0xc) *(ecx+0x10)) # Stmt1-inouts Stmt1-inouts => eax + 89/<- %ebx 0/r32/eax $translate-mu-compute-index-stmt:emit-index: - (emit-subx-var-as-rm32 *(ebp+8) *(edx+4)) # Stmt-var-next + (lookup *(ebx+8) *(ebx+0xc)) # Stmt-var-next Stmt-var-next => eax + (emit-subx-var-as-rm32 *(ebp+8) %eax) (write-buffered *(ebp+8) Space) $translate-mu-compute-index-stmt:emit-elem-size: - # var base/ebx: (handle var) - 8b/-> *edx 3/r32/ebx # Stmt-var-value + # var base/ebx: (addr var) + (lookup *ebx *(ebx+4)) # Stmt-var-value Stmt-var-value => eax + 89/<- %ebx 0/r32/eax # print size-of(element(base->type)) (array-element-type-id %ebx) # => eax (size-of-type-id %eax) # => eax @@ -8831,9 +8834,10 @@ $translate-mu-compute-index-stmt:emit-elem-size: (write-buffered *(ebp+8) "/imm32 ") $translate-mu-compute-index-stmt:emit-output: # outputs[0] "/r32" - 8b/-> *(ecx+0xc) 0/r32/eax # Stmt1-outputs - 8b/-> *eax 0/r32/eax # Stmt-var-value - (get Registers *(eax+0x10) 0xc "Registers") # Var-register => eax + (lookup *(ecx+0x14) *(ecx+0x18)) # Stmt1-outputs Stmt1-outputs => eax + (lookup *eax *(eax+4)) # Stmt-var-value Stmt-var-value => eax + (lookup *(eax+0x18) *(eax+0x1c)) # Var-register Var-register => eax + (get Registers %eax 0xc "Registers") # => eax: (addr int) (print-int32-buffered *(ebp+8) *eax) (write-buffered *(ebp+8) "/r32\n") $translate-mu-compute-index-stmt:end: |