Rev 5222 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 5222 | Rev 6324 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | /* macro.c - macro support for gas |
1 | /* macro.c - macro support for gas |
2 | Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, |
- | |
3 | 2004, 2005, 2006, 2007, 2008, 2011, 2012, 2013 Free Software Foundation, Inc. |
2 | Copyright (C) 1994-2015 Free Software Foundation, Inc. |
Line 4... | Line 3... | ||
4 | 3 | ||
5 | Written by Steve and Judy Chamberlain of Cygnus Support, |
4 | Written by Steve and Judy Chamberlain of Cygnus Support, |
Line 6... | Line 5... | ||
6 | sac@cygnus.com |
5 | sac@cygnus.com |
Line 210... | Line 209... | ||
210 | /* Reset the string to not include the ending rune. */ |
209 | /* Reset the string to not include the ending rune. */ |
211 | ptr->len = line_start; |
210 | ptr->len = line_start; |
212 | break; |
211 | break; |
213 | } |
212 | } |
214 | } |
213 | } |
- | 214 | ||
- | 215 | /* PR gas/16908 |
|
- | 216 | Apply and discard .linefile directives that appear within |
|
- | 217 | the macro. For long macros, one might want to report the |
|
- | 218 | line number information associated with the lines within |
|
- | 219 | the macro definition, but we would need more infrastructure |
|
- | 220 | to make that happen correctly (e.g. resetting the line |
|
- | 221 | number when expanding the macro), and since for short |
|
- | 222 | macros we clearly prefer reporting the point of expansion |
|
- | 223 | anyway, there's not an obviously better fix here. */ |
|
- | 224 | if (strncasecmp (ptr->ptr + i, "linefile", 8) == 0) |
|
- | 225 | { |
|
- | 226 | char *saved_input_line_pointer = input_line_pointer; |
|
- | 227 | char saved_eol_char = ptr->ptr[ptr->len]; |
|
- | 228 | ||
- | 229 | ptr->ptr[ptr->len] = '\0'; |
|
- | 230 | input_line_pointer = ptr->ptr + i + 8; |
|
- | 231 | s_app_line (0); |
|
- | 232 | ptr->ptr[ptr->len] = saved_eol_char; |
|
- | 233 | input_line_pointer = saved_input_line_pointer; |
|
- | 234 | ptr->len = line_start; |
|
- | 235 | } |
|
215 | } |
236 | } |
Line 216... | Line 237... | ||
216 | 237 | ||
217 | /* Add the original end-of-line char to the end and keep running. */ |
238 | /* Add the original end-of-line char to the end and keep running. */ |
218 | sb_add_char (ptr, more); |
239 | sb_add_char (ptr, more); |