[llvm-commits] [llvm-gcc-4.2] r84062 - in /llvm-gcc-4.2/trunk/gcc: c-common.c llvm-convert.cpp tree.h
Dale Johannesen
dalej at apple.com
Tue Oct 13 17:09:54 PDT 2009
Author: johannes
Date: Tue Oct 13 19:09:54 2009
New Revision: 84062
URL: http://llvm.org/viewvc/llvm-project?rev=84062&view=rev
Log:
Set msasm bit on asm's derived from asm blocks.
Modified:
llvm-gcc-4.2/trunk/gcc/c-common.c
llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp
llvm-gcc-4.2/trunk/gcc/tree.h
Modified: llvm-gcc-4.2/trunk/gcc/c-common.c
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/c-common.c?rev=84062&r1=84061&r2=84062&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/c-common.c (original)
+++ llvm-gcc-4.2/trunk/gcc/c-common.c Tue Oct 13 19:09:54 2009
@@ -7959,6 +7959,8 @@
stmt = build_stmt (ASM_EXPR, sexpr, NULL_TREE, NULL_TREE, clobbers, NULL_TREE);
clobbers = NULL_TREE;
ASM_VOLATILE_P (stmt) = 1;
+ /* LLVM LOCAL */
+ ASM_ASM_BLOCK (stmt) = 1;
(void)add_stmt (stmt);
}
#endif
@@ -7968,6 +7970,8 @@
sexpr = build_string (strlen (iasm_buffer), iasm_buffer);
stmt = build_stmt (ASM_EXPR, sexpr, NULL_TREE, NULL_TREE, NULL_TREE, NULL_TREE);
ASM_VOLATILE_P (stmt) = 1;
+ /* LLVM LOCAL */
+ ASM_ASM_BLOCK (stmt) = 1;
(void)add_stmt (stmt);
/* Build .line "line-number" directive. */
@@ -7975,6 +7979,8 @@
sexpr = build_string (strlen (iasm_buffer), iasm_buffer);
stmt = build_stmt (ASM_EXPR, sexpr, NULL_TREE, NULL_TREE, NULL_TREE, NULL_TREE);
ASM_VOLATILE_P (stmt) = 1;
+ /* LLVM LOCAL */
+ ASM_ASM_BLOCK (stmt) = 1;
(void)add_stmt (stmt);
iasm_buffer[0] = '\0';
@@ -8126,6 +8132,8 @@
/* Treat as volatile always. */
stmt = build_stmt (ASM_EXPR, sexpr, outputs, inputs, clobbers, uses);
ASM_VOLATILE_P (stmt) = 1;
+ /* LLVM LOCAL */
+ ASM_ASM_BLOCK (stmt) = 1;
add_stmt (stmt);
input_location.line = saved_lineno;
return;
@@ -8738,6 +8746,8 @@
/* Simple asm statements are treated as volatile. */
stmt = build_stmt (ASM_EXPR, sexpr, outputs, inputs, clobbers, NULL_TREE);
ASM_VOLATILE_P (stmt) = 1;
+ /* LLVM LOCAL */
+ ASM_ASM_BLOCK (stmt) = 1;
stmt = add_stmt (stmt);
#endif
return stmt;
@@ -8965,6 +8975,8 @@
/* Treat as volatile always. */
stmt = build_stmt (ASM_EXPR, strlab, NULL_TREE, inputs, NULL_TREE, NULL_TREE);
ASM_VOLATILE_P (stmt) = 1;
+ /* LLVM LOCAL */
+ ASM_ASM_BLOCK (stmt) = 1;
add_stmt (stmt);
}
@@ -8972,6 +8984,8 @@
/* Treat as volatile always. */
stmt = build_stmt (ASM_EXPR, strlab, NULL_TREE, inputs, NULL_TREE, NULL_TREE);
ASM_VOLATILE_P (stmt) = 1;
+ /* LLVM LOCAL */
+ ASM_ASM_BLOCK (stmt) = 1;
add_stmt (stmt);
}
/* APPLE LOCAL end CW asm blocks */
Modified: llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp?rev=84062&r1=84061&r2=84062&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp (original)
+++ llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp Tue Oct 13 19:09:54 2009
@@ -4634,7 +4634,8 @@
}
Value *Asm = InlineAsm::get(FTy, NewAsmStr, ConstraintStr,
- ASM_VOLATILE_P(exp) || !ASM_OUTPUTS(exp));
+ ASM_VOLATILE_P(exp) || !ASM_OUTPUTS(exp),
+ ASM_ASM_BLOCK(exp));
CallInst *CV = Builder.CreateCall(Asm, CallOps.begin(), CallOps.end(),
CallResultTypes.empty() ? "" : "asmtmp");
CV->setDoesNotThrow();
Modified: llvm-gcc-4.2/trunk/gcc/tree.h
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/tree.h?rev=84062&r1=84061&r2=84062&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/tree.h (original)
+++ llvm-gcc-4.2/trunk/gcc/tree.h Tue Oct 13 19:09:54 2009
@@ -449,6 +449,10 @@
OMP_SECTION
OMP_PARALLEL_COMBINED in
OMP_PARALLEL
+ LLVM LOCAL begin msasm bit on asm
+ ASM_ASM_BLOCK in
+ ASM_EXPR
+ LLVM LOCAL end
protected_flag:
@@ -1548,6 +1552,8 @@
ASM_OPERAND with no operands. */
#define ASM_INPUT_P(NODE) (TREE_STATIC (NODE))
#define ASM_VOLATILE_P(NODE) (TREE_PUBLIC (NODE))
+/* LLVM LOCAL msasm bit in asm */
+#define ASM_ASM_BLOCK(NODE) (TREE_PRIVATE (NODE))
/* COND_EXPR accessors. */
#define COND_EXPR_COND(NODE) (TREE_OPERAND (COND_EXPR_CHECK (NODE), 0))
More information about the llvm-commits
mailing list