From f03bb260c90ad013aa4e55af36382875011c95b8 Mon Sep 17 00:00:00 2001 From: Eli Friedman Date: Fri, 12 Aug 2011 22:50:01 +0000 Subject: Move "atomic" and "volatile" designations on instructions after the opcode of the instruction. Note that this change affects the existing non-atomic load and store instructions; the parser now accepts both forms, and the change is noted in the release notes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137527 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/VMCore/AsmWriter.cpp | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'lib/VMCore/AsmWriter.cpp') diff --git a/lib/VMCore/AsmWriter.cpp b/lib/VMCore/AsmWriter.cpp index d166604113..1fc94ba7ca 100644 --- a/lib/VMCore/AsmWriter.cpp +++ b/lib/VMCore/AsmWriter.cpp @@ -1658,16 +1658,6 @@ void AssemblyWriter::printInstruction(const Instruction &I) { else Out << '%' << SlotNum << " = "; } - - // If this is an atomic load or store, print out the atomic marker. - if ((isa(I) && cast(I).isAtomic()) || - (isa(I) && cast(I).isAtomic())) - Out << "atomic "; - - // If this is a volatile load or store, print out the volatile marker. - if ((isa(I) && cast(I).isVolatile()) || - (isa(I) && cast(I).isVolatile())) - Out << "volatile "; if (isa(I) && cast(I).isTailCall()) Out << "tail "; @@ -1675,6 +1665,18 @@ void AssemblyWriter::printInstruction(const Instruction &I) { // Print out the opcode... Out << I.getOpcodeName(); + // If this is an atomic load or store, print out the atomic marker. + if ((isa(I) && cast(I).isAtomic()) || + (isa(I) && cast(I).isAtomic())) + Out << " atomic"; + + // If this is a volatile operation, print out the volatile marker. + if ((isa(I) && cast(I).isVolatile()) || + (isa(I) && cast(I).isVolatile()) || + (isa(I) && cast(I).isVolatile()) || + (isa(I) && cast(I).isVolatile())) + Out << " volatile"; + // Print out optimization information. WriteOptimizationInfo(Out, &I); -- cgit v1.2.3