diff options
author | aoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-03-09 07:36:43 +0000 |
---|---|---|
committer | aoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-03-09 07:36:43 +0000 |
commit | 09fb10e8536409ff71e3580d00064a9ca99bc3a8 (patch) | |
tree | 48b68219ea2954e8bd644e2a8f092df8fd7a9b90 /gcc/stmt.c | |
parent | 58d16c5f65a4e27ed9c17f0dd1135a6d9d941bfd (diff) | |
download | gcc-09fb10e8536409ff71e3580d00064a9ca99bc3a8.tar.gz |
* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@122742 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/stmt.c')
-rw-r--r-- | gcc/stmt.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/gcc/stmt.c b/gcc/stmt.c index 9b4e24f4c05..20ce1aa4d50 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; } |