If .exitm is used outside a macro definition, then it behaves as .end, stopping further processing. For example: .macro MAC xor %eax, %eax .endm .exitm MAC bogus %eax, %eax # never flagged as illegal insn .end
Created attachment 2311 [details] Proposed patch to fix this issue.
Hi Evandro, Thank you very much for reporting this bug and providing a patch to fix it. I have checked your patch in, along with the changelog entry below. I also added a testcase to the gas testsuite in order to make sure that this problem does not reoccur. Cheers Nick gas/ChangeLog 2008-03-13 Evandro Menezes <evandro@yahoo.com> PR gas/5895 * read.c (s_mexit): Warn if attempting to exit a macro when not inside a macro definition. gas/testsuite/ChangeLog 2008-03-13 Nick Clifton <nickc@redhat.com> PR gas/5895 * gas/macros/exit.s: New test case. * gas/macros/macros.exp: Run the new test, expect it to produce an error result.