if (in != stdin)
fclose(in);
+ /* Check for undefined symbols */
+ yasm_symtab_parser_finalize(yasm_object_get_symtab(object));
+
+ if (yasm_get_num_errors(warning_error) > 0) {
+ yasm_errwarn_output_all(yasm_object_get_linemap(object), warning_error,
+ print_yasm_error, print_yasm_warning);
+ cleanup(object);
+ return EXIT_FAILURE;
+ }
+
/* Finalize parse */
yasm_object_finalize(object);
return EXIT_FAILURE;
}
- yasm_symtab_parser_finalize(yasm_object_get_symtab(object));
+ /* Optimize */
cur_optimizer_module->optimize(object);
if (yasm_get_num_errors(warning_error) > 0) {
EXTRA_DIST += modules/arch/x86/tests/negequ.hex
EXTRA_DIST += modules/arch/x86/tests/nomem64-err.asm
EXTRA_DIST += modules/arch/x86/tests/nomem64-err.errwarn
+EXTRA_DIST += modules/arch/x86/tests/nomem64-err2.asm
+EXTRA_DIST += modules/arch/x86/tests/nomem64-err2.errwarn
EXTRA_DIST += modules/arch/x86/tests/nomem64.asm
EXTRA_DIST += modules/arch/x86/tests/nomem64.errwarn
EXTRA_DIST += modules/arch/x86/tests/nomem64.hex
--:2: invalid combination of opcode and operands
--:3: invalid combination of opcode and operands
--:4: warning: `es' segment register ignored in 64-bit mode
--:4: invalid combination of opcode and operands
--:6: `pushaw' invalid in 64-bit mode
--:6: invalid combination of opcode and operands
--:7: `popa' invalid in 64-bit mode
--:7: invalid combination of opcode and operands
--:8: `lds' invalid in 64-bit mode
--:8: invalid combination of opcode and operands
--:9: `aas' invalid in 64-bit mode
--:9: invalid combination of opcode and operands
--:10: `das' invalid in 64-bit mode
--:10: invalid combination of opcode and operands
--:11: `aad' invalid in 64-bit mode
--:11: invalid combination of opcode and operands
--:12: `into' invalid in 64-bit mode
--:12: invalid combination of opcode and operands
--:13: `salc' invalid in 64-bit mode
--:13: invalid combination of opcode and operands
--:15: warning: `xmm9' is a register in 64-bit mode
--:16: warning: `rax' is a register in 64-bit mode
--:17: warning: `rdx' is a register in 64-bit mode
--:18: warning: `cdqe' is an instruction in 64-bit mode
--:19: warning: `swapgs' is an instruction in 64-bit mode
+-:2: warning: `es' segment register ignored in 64-bit mode
+-:4: `pushaw' invalid in 64-bit mode
+-:5: `popa' invalid in 64-bit mode
+-:6: `lds' invalid in 64-bit mode
+-:7: `aas' invalid in 64-bit mode
+-:8: `das' invalid in 64-bit mode
+-:9: `aad' invalid in 64-bit mode
+-:10: `into' invalid in 64-bit mode
+-:11: `salc' invalid in 64-bit mode
+-:13: warning: `xmm9' is a register in 64-bit mode
+-:14: warning: `rax' is a register in 64-bit mode
+-:15: warning: `rdx' is a register in 64-bit mode
+-:16: warning: `cdqe' is an instruction in 64-bit mode
+-:17: warning: `swapgs' is an instruction in 64-bit mode