Commit 80d4431c authored by Michael Büsch's avatar Michael Büsch

b43-asm: Terminate instructions with ; instead of |

This removes support for assembly comments with ";"
Use C/C++ style comments, please
/* comment */
// comment
The preprocessor will take care of them.
Signed-off-by: Michael Büsch's avatarMichael Buesch <mb@bu3sch.de>
parent e253c5e3
......@@ -48,4 +48,4 @@ if [ "$infile" != "-" ]; then
fi
fi
$CPP -traditional-cpp "$infile" | $B43_ASM "-" "$outfile" $@
$CPP -x c++ -traditional-cpp "$infile" | $B43_ASM "-" "$outfile" $@
......@@ -38,7 +38,7 @@ extern struct initvals_sect *cur_initvals_sect;
%token SECTION_TEXT SECTION_IVALS
%token ASM_ARCH ASM_START SPR GPR OFFR LR COMMA BRACK_OPEN BRACK_CLOSE PAREN_OPEN PAREN_CLOSE HEXNUM DECNUM ARCH_NEWWORLD ARCH_OLDWORLD LABEL IDENT LABELREF
%token ASM_ARCH ASM_START SPR GPR OFFR LR COMMA SEMICOLON BRACK_OPEN BRACK_CLOSE PAREN_OPEN PAREN_CLOSE HEXNUM DECNUM ARCH_NEWWORLD ARCH_OLDWORLD LABEL IDENT LABELREF
%token PLUS MINUS MULTIPLY DIVIDE BITW_OR BITW_AND BITW_XOR BITW_NOT LEFTSHIFT RIGHTSHIFT
......@@ -72,9 +72,9 @@ line : line_terminator {
}
;
/* Allow terminating lines with the "|" char */
/* Allow terminating lines with the ";" char */
line_terminator : /* Nothing */
| BITW_OR line_terminator
| SEMICOLON line_terminator
;
section_switch : SECTION_TEXT {
......
......@@ -48,7 +48,6 @@ NEWLINE ((\r)|(\n)|(\r\n))
{WS}+ { update_lineinfo(); /* whitespace */ }
{NEWLINE} { cur_lineinfo.lineno++; update_lineinfo(); }
;.*$ { update_lineinfo(); /* comment */ }
^{WS}*"%"{WS}*arch { update_lineinfo(); return ASM_ARCH; }
^{WS}*"%"{WS}*start { update_lineinfo(); return ASM_START; }
......@@ -62,6 +61,7 @@ off/[0-6] { update_lineinfo(); return OFFR; }
lr/[0-3] { update_lineinfo(); return LR; }
, { update_lineinfo(); return COMMA; }
; { update_lineinfo(); return SEMICOLON; }
\[ { update_lineinfo(); return BRACK_OPEN; }
\] { update_lineinfo(); return BRACK_CLOSE; }
\( { update_lineinfo(); return PAREN_OPEN; }
......
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