aboutsummaryrefslogtreecommitdiff
path: root/gcc/stmt.c
diff options
context:
space:
mode:
authorAlexandre Oliva <aoliva@redhat.com>2007-03-09 07:36:43 +0000
committerAlexandre Oliva <aoliva@gcc.gnu.org>2007-03-09 07:36:43 +0000
commitbff4b63d31059f3ebf918e70ca00d5eb4dcbc62e (patch)
tree48b68219ea2954e8bd644e2a8f092df8fd7a9b90 /gcc/stmt.c
parent1296c31f09a6f9ec9030f4641f8a3bc50e509dc7 (diff)
downloadgcc-bff4b63d31059f3ebf918e70ca00d5eb4dcbc62e.zip
gcc-bff4b63d31059f3ebf918e70ca00d5eb4dcbc62e.tar.gz
gcc-bff4b63d31059f3ebf918e70ca00d5eb4dcbc62e.tar.bz2
rtl.def (ASM_INPUT): Add location.
* rtl.def (ASM_INPUT): Add location. * rtl.h (ASM_INPUT_SOURCE_LOCATION): New. (ASM_INPUT_SOURCE_FILE, ASM_INPUT_SOURCE_LINE): New. (decode_asm_operands): Add loc operand. (gen_rtx_ASM_INPUT, gen_rtx_ASM_INPUT_loc): Define. * stmt.c (expand_asm): Rename to... (expand_asm_loc): ... this. Add locus argument. Pass it on to gen_rtx_ASM_INPUT_loc. (expand_asm_expr): Adjust. * recog.c (decode_asm_operands): Add loc operand. (check_asm_operands, extract_insn): Adjust. * reload1.c (maybe_fix_stack_asms): Likewise. * final.c (asm_insn_count): Likewise. (final_scan_insn): Output # line before and after asm. From-SVN: r122742
Diffstat (limited to 'gcc/stmt.c')
-rw-r--r--gcc/stmt.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/gcc/stmt.c b/gcc/stmt.c
index 9b4e24f..20ce1aa 100644
--- a/gcc/stmt.c
+++ b/gcc/stmt.c
@@ -1,6 +1,6 @@
/* Expands front end tree to back end RTL for GCC
Copyright (C) 1987, 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997,
- 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+ 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
Free Software Foundation, Inc.
This file is part of GCC.
@@ -260,15 +260,16 @@ n_occurrences (int c, const char *s)
insn is volatile; don't optimize it. */
static void
-expand_asm (tree string, int vol)
+expand_asm_loc (tree string, int vol, location_t locus)
{
rtx body;
if (TREE_CODE (string) == ADDR_EXPR)
string = TREE_OPERAND (string, 0);
- body = gen_rtx_ASM_INPUT (VOIDmode,
- ggc_strdup (TREE_STRING_POINTER (string)));
+ body = gen_rtx_ASM_INPUT_loc (VOIDmode,
+ ggc_strdup (TREE_STRING_POINTER (string)),
+ locus);
MEM_VOLATILE_P (body) = vol;
@@ -1094,7 +1095,7 @@ expand_asm_expr (tree exp)
if (ASM_INPUT_P (exp))
{
- expand_asm (ASM_STRING (exp), ASM_VOLATILE_P (exp));
+ expand_asm_loc (ASM_STRING (exp), ASM_VOLATILE_P (exp), input_location);
return;
}