diff options
| author | sayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-01-07 01:05:37 +0000 |
|---|---|---|
| committer | sayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-01-07 01:05:37 +0000 |
| commit | 4a3d6195e417716187f101f60f3d4f2c1fd0c0ea (patch) | |
| tree | c4319946d2662609ef86dd5bf713bce3fe21a094 | |
| parent | 5a1be5742466996037b478057239abf9672f499e (diff) | |
| download | ppe42-gcc-4a3d6195e417716187f101f60f3d4f2c1fd0c0ea.tar.gz ppe42-gcc-4a3d6195e417716187f101f60f3d4f2c1fd0c0ea.zip | |
PR target/6077
* gcc.c (input_suffix_matches): Tweak the semantics of %{.s:...}
and %{.S:...} (and their negative variants) to test whether the
input file is assembler or pre-processed-assembler independent of
the actual filename extension.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@93023 138bc75d-0d04-0410-961f-82ee72b054a4
| -rw-r--r-- | gcc/ChangeLog | 8 | ||||
| -rw-r--r-- | gcc/gcc.c | 16 |
2 files changed, 24 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 965fe599e17..9c8a8618389 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,13 @@ 2005-01-06 Roger Sayle <roger@eyesopen.com> + PR target/6077 + * gcc.c (input_suffix_matches): Tweak the semantics of %{.s:...} + and %{.S:...} (and their negative variants) to test whether the + input file is assembler or pre-processed-assembler independent of + the actual filename extension. + +2005-01-06 Roger Sayle <roger@eyesopen.com> + * simplify-rtx.c (simplify_subreg): Simplify truncations of shifts of sign or zero extended values. diff --git a/gcc/gcc.c b/gcc/gcc.c index 56d50de8479..99d92f95438 100644 --- a/gcc/gcc.c +++ b/gcc/gcc.c @@ -5460,6 +5460,22 @@ handle_spec_function (const char *p) static inline bool input_suffix_matches (const char *atom, const char *end_atom) { + /* We special case the semantics of {.s:...} and {.S:...} and their + negative variants. Instead of testing the input filename suffix, + we test whether the input source file is an assembler file or an + assembler-with-cpp file respectively. This allows us to correctly + handle the -x command line option. */ + + if (atom + 1 == end_atom + && input_file_compiler + && input_file_compiler->suffix) + { + if (*atom == 's') + return !strcmp (input_file_compiler->suffix, "@assembler"); + if (*atom == 'S') + return !strcmp (input_file_compiler->suffix, "@assembler-with-cpp"); + } + return (input_suffix && !strncmp (input_suffix, atom, end_atom - atom) && input_suffix[end_atom - atom] == '\0'); |

