File tree Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -477,6 +477,8 @@ section .text
477477section .data
478478 %%tmp dd 0
479479 %%read_tmp dd 0
480+ %%addr_expr_tmp dd 0
481+ %%eax_tmp dd 0
480482
481483section .text
482484%%after_data:
@@ -521,6 +523,10 @@ section .text
521523 %error "Incorrect parameter (string)"
522524%else
523525; may be, address expression?
526+ mov [ %%eax_tmp ], eax
527+ lea eax , % 2
528+ mov [ %%addr_expr_tmp ], eax
529+ mov eax , [ %%eax_tmp ]
524530 pushf
525531 push eax
526532 push ecx
@@ -572,7 +578,7 @@ section .text
572578
573579%else
574580; may be, address expression? postprocessing
575- lea eax , % 2
581+ mov eax , [ %%addr_expr_tmp ]
576582 %if % 1 = 1
577583 mov cl , byte [ %%read_tmp ]
578584 mov byte [ eax ], cl
Original file line number Diff line number Diff line change @@ -628,6 +628,8 @@ section .text
628628section .data
629629 %%read_tmp dq 0
630630 %%tmp dq 0
631+ %%addr_expr_tmp dd 0
632+ %%rax_tmp dd 0
631633section .text
632634 %%after_data:
633635 IS_GPR % 2
@@ -676,6 +678,10 @@ section .text
676678%else
677679; may be, address expression?
678680; we will have to do postprocessing after scanf
681+ mov [ %%rax_tmp ], rax
682+ lea rax , % 2
683+ mov [ %%addr_expr_tmp ], rax
684+ mov rax , [ %%rax_tmp ]
679685 pushfq
680686 push rax
681687 push rcx
@@ -743,7 +749,7 @@ section .text
743749 popfq
744750%else
745751 ; may be, address expression? postprocessing
746- lea rax , % 2
752+ mov rax , [ %%addr_expr_tmp ]
747753 %if % 1 = 1
748754 mov cl , byte [ %%read_tmp ]
749755 mov byte [ rax ], cl
You can’t perform that action at this time.
0 commit comments