mirror of git://gcc.gnu.org/git/gcc.git
PR modula2/117777: m2 does not allow single const string in asm volatile
gm2 does not allow single const string in ASM VOLATILE. The bugfix is to modify AsmOperands in all passes except P3Build.bnf (which is correct). The remaining passes need to make the term following the ConstExpression optional. gcc/m2/ChangeLog: PR modula2/117777 * gm2-compiler/P0SyntaxCheck.bnf (AsmOperands): Allow term after ConstExpression to be optional. * gm2-compiler/P1Build.bnf (AsmOperands): Ditto. * gm2-compiler/P2Build.bnf (AsmOperands): Ditto. * gm2-compiler/PCBuild.bnf (AsmOperands): Ditto. * gm2-compiler/PHBuild.bnf (AsmOperands): Ditto. gcc/testsuite/ChangeLog: PR modula2/117777 * gm2/extensions/asm/pass/conststr.mod: New test. Signed-off-by: Gaius Mulley <gaiusmod2@gmail.com>
This commit is contained in:
parent
f6e00226a4
commit
e6d26a21e0
|
@ -968,7 +968,7 @@ NamedOperand := '[' Ident ']' =:
|
|||
|
||||
AsmOperandName := [ NamedOperand ] =:
|
||||
|
||||
AsmOperands := ConstExpression ':' AsmList [ ':' AsmList [ ':' TrashList ] ]
|
||||
AsmOperands := ConstExpression [ ':' AsmList [ ':' AsmList [ ':' TrashList ] ] ]
|
||||
=:
|
||||
|
||||
AsmList := [ AsmElement ] { ',' AsmElement } =:
|
||||
|
|
|
@ -1048,7 +1048,7 @@ NamedOperand := '[' Ident ']' =:
|
|||
|
||||
AsmOperandName := [ NamedOperand ] =:
|
||||
|
||||
AsmOperands := ConstExpression ':' AsmList [ ':' AsmList [ ':' TrashList ] ]
|
||||
AsmOperands := ConstExpression [ ':' AsmList [ ':' AsmList [ ':' TrashList ] ] ]
|
||||
=:
|
||||
|
||||
AsmList := [ AsmElement ] { ',' AsmElement } =:
|
||||
|
|
|
@ -1257,7 +1257,7 @@ NamedOperand := '[' Ident ']' =:
|
|||
|
||||
AsmOperandName := [ NamedOperand ] =:
|
||||
|
||||
AsmOperands := ConstExpression ':' AsmList [ ':' AsmList [ ':' TrashList ] ]
|
||||
AsmOperands := ConstExpression [ ':' AsmList [ ':' AsmList [ ':' TrashList ] ] ]
|
||||
=:
|
||||
|
||||
AsmList := [ AsmElement ] { ',' AsmElement } =:
|
||||
|
|
|
@ -1292,7 +1292,7 @@ NamedOperand := '[' Ident ']' =:
|
|||
|
||||
AsmOperandName := [ NamedOperand ] =:
|
||||
|
||||
AsmOperands := ConstExpression ':' AsmList [ ':' AsmList [ ':' TrashList ] ]
|
||||
AsmOperands := ConstExpression [ ':' AsmList [ ':' AsmList [ ':' TrashList ] ] ]
|
||||
=:
|
||||
|
||||
AsmList := [ AsmElement ] { ',' AsmElement } =:
|
||||
|
|
|
@ -1246,7 +1246,7 @@ NamedOperand := '[' Ident ']' =:
|
|||
|
||||
AsmOperandName := [ NamedOperand ] =:
|
||||
|
||||
AsmOperands := ConstExpression ':' AsmList [ ':' AsmList [ ':' TrashList ] ]
|
||||
AsmOperands := ConstExpression [ ':' AsmList [ ':' AsmList [ ':' TrashList ] ] ]
|
||||
=:
|
||||
|
||||
AsmList := [ AsmElement ] { ',' AsmElement } =:
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
MODULE conststr ;
|
||||
|
||||
BEGIN
|
||||
ASM VOLATILE ("")
|
||||
END conststr.
|
Loading…
Reference in New Issue