Skip to content

Commit

Permalink
asm: Add .equiv and .quv defines (#1557)
Browse files Browse the repository at this point in the history
* asm: Add .equiv define

* Asm, Units: gas: test .equ, .equiv, .eqv

* asm: Add .eqv define. Treat .equ, .equiv, .eqv as OP_EQU

GNU AS documentation of the directives:
.equiv:
  https://sourceware.org/binutils/docs/as/Equiv.html#Equiv
.eqv:
  https://sourceware.org/binutils/docs/as/Eqv.html#Eqv

(squash 3 comments into one commit by @masatake).
  • Loading branch information
markferry authored and masatake committed Sep 26, 2017
1 parent b953728 commit e1bc2a3
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
3 changes: 3 additions & 0 deletions Units/parser-asm.r/gas.s.d/expected.tags
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
X input.s /^#define X /;" d line:7 file: end:7
_EQU input.s /^.equ _EQU equ1$/;" d line:14
_EQUIV input.s /^.equiv _EQUIV equiv2$/;" d line:15
_EQV input.s /^.eqv _EQV eqv3$/;" d line:16
altsum input.s /^.macro altsum from=0, to=6$/;" m line:8 end:13
sum input.s /^.macro sum from=0, to=5$/;" m line:1 end:6
3 changes: 3 additions & 0 deletions Units/parser-asm.r/gas.s.d/input.s
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,6 @@
sum "(\from+1)",\to
.endif
.endm
.equ _EQU equ1
.equiv _EQUIV equiv2
.eqv _EQV eqv3
4 changes: 3 additions & 1 deletion parsers/asm.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,10 @@ static const keywordTable AsmKeywords [] = {
{ "record", OP_RECORD },
{ "sections", OP_SECTIONS },

/* This one is used in GNU as. */
/* These are used in GNU as. */
{ "section", OP_SECTION },
{ "equiv", OP_EQU },
{ "eqv", OP_EQU },

{ "set", OP_SET },
{ "struct", OP_STRUCT }
Expand Down

0 comments on commit e1bc2a3

Please sign in to comment.