Fix decode_number_or_symbol.

parent c07dcc31
......@@ -431,6 +431,7 @@ emit_escaped_string_end:
;; Input in EAX
;; Destroys: ECX
;; Returns: EAX (valid), EDX (number value)
decode_number_or_char:
;; The first argument does not begin with an apex, call
......@@ -976,9 +977,8 @@ parse_block_call:
je platform_panic
;; Call decode_number_or_symbol
push ebx
mov eax, ebx
call decode_number_or_symbol
add esp, 4
mov ebx, eax
;; Call pop_var
......@@ -1109,9 +1109,12 @@ parse_block_end:
ret
;; Input in EAX
;; Destroys: EBX, ECX, EDX
;; Returns: EAX
decode_number_or_symbol:
;; Call decode_number_or_char
mov eax, [esp+4]
;; Try to decode as number
mov ebx, eax
call decode_number_or_char
;; If it returned true, return
......@@ -1122,10 +1125,8 @@ decode_number_or_symbol:
decode_number_or_symbol_symbol:
;; Get symbol address
mov eax, [esp+4]
mov edx, eax
call find_symbol_or_zero
add esp, 4
mov edx, ebx
call find_symbol_or_panic
ret
......@@ -1233,14 +1234,12 @@ parse_const:
;; Get another token and interpret it as a number or symbol
call get_token
push eax
call decode_number_or_symbol
add esp, 4
;; Add a symbol
mov edx, -2
mov ecx, eax
mov eax, ebx
mov eax, [buf2_ptr]
call add_symbol_wrapper
jmp parse_loop
......
......@@ -15,6 +15,11 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
const TEST_ALL 1
const TEST_MAP TEST_ALL
const TEST_INT64 TEST_ALL
const TEST_C TEST_ALL
const RUN_MM0 1
const RUN_ASM 0
const RUN_FASM 0
......@@ -22,9 +27,6 @@ const RUN_C 0
const RUN_MESCC 0
const RUN_MCPP 0
const RUN_TINYCC 1
const TEST_MAP 1
const TEST_INT64 1
const TEST_C 1
const USE_TRIVIAL_MALLOC 0
const USE_SIMPLE_MALLOC 0
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment