diff options
author | andreao <andreao@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-07-10 15:35:19 +0000 |
---|---|---|
committer | andreao <andreao@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-07-10 15:35:19 +0000 |
commit | ec87fd1e87afef4791623daa4ff56c45bd44cfda (patch) | |
tree | de5c5c2f89f297c2846caad5ec96a1f18dfbebab | |
parent | a26b8b0566c7045d594bea66348820136635ac90 (diff) |
if the string passed to asm starts with '#' cosider it a comment
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/st/cli-be@149480 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/config/cil32/emit-cil.c | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/gcc/config/cil32/emit-cil.c b/gcc/config/cil32/emit-cil.c index a4052bee090..18971c7f6d0 100644 --- a/gcc/config/cil32/emit-cil.c +++ b/gcc/config/cil32/emit-cil.c @@ -1723,11 +1723,21 @@ emit_cil_stmt (FILE *file, const_cil_stmt stmt) } break; case CIL_STRING: - fprintf (file, - "\n\t// BEGIN ASM" - "\n\t%s" - "\n\t// END ASM", - TREE_STRING_POINTER (cil_string (stmt))); + { + tree t = cil_string (stmt); + const char *str; + const char *str2; + unsigned int len; + + str = TREE_STRING_POINTER (t); + len = TREE_STRING_LENGTH (t); + + fprintf (file, "\n\t// BEGIN ASM"); + for (str2 = str; str2[0] && ISSPACE(str2[0]); ++str2) + ; + fprintf (file, "\n\t%s%s", (str2[0] == '#') ? "//" : "", str); + fprintf (file,"\n\t// END ASM"); + } break; default: |