Bug 5895 - Usage of .exitm outside a .macro block equivalent to .end
Summary: Usage of .exitm outside a .macro block equivalent to .end
Status: RESOLVED FIXED
Alias: None
Product: binutils
Classification: Unclassified
Component: gas (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-03-06 23:31 UTC by Evandro
Modified: 2008-03-13 10:54 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments
Proposed patch to fix this issue. (311 bytes, patch)
2008-03-06 23:32 UTC, Evandro
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Evandro 2008-03-06 23:31:21 UTC
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
Comment 1 Evandro 2008-03-06 23:32:26 UTC
Created attachment 2311 [details]
Proposed patch to fix this issue.
Comment 2 Nick Clifton 2008-03-13 10:54:48 UTC
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.