]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
rs6000: Fix logic for when to emit .machine (PR71216)
authorSegher Boessenkool <segher@kernel.crashing.org>
Wed, 27 Jul 2016 16:14:12 +0000 (18:14 +0200)
committerSegher Boessenkool <segher@gcc.gnu.org>
Wed, 27 Jul 2016 16:14:12 +0000 (18:14 +0200)
The current logic determining whether to use .machine in the generated
asm code puts it there if the compiler is not configured with a default
target cpu, _or_ no -mcpu= was given on the command line.  It should
be "and" instead.

PR target/71216
* config/rs6000/rs6000.c (rs6000_file_start): Fix condition for
when to emit a ".machine" pseudo-op.

From-SVN: r238789

gcc/ChangeLog
gcc/config/rs6000/rs6000.c

index d5982cedf7772ca792aaae83cfa4dccaf41f269f..f4db4290785e7e3de9d08b712b9e33efcfc4c282 100644 (file)
@@ -1,3 +1,9 @@
+2016-07-27  Segher Boessenkool  <segher@kernel.crashing.org>
+
+       PR target/71216
+       * config/rs6000/rs6000.c (rs6000_file_start): Fix condition for
+       when to emit a ".machine" pseudo-op.
+
 2016-07-26  Alan Modra  <amodra@gmail.com>
 
        PR target/72103
index 11b7355c6a8b94c1f0a7e72faebed87a1f69daa0..2f30413ca6ec895180437dfb4ede3b6378cecf8d 100644 (file)
@@ -5180,8 +5180,8 @@ rs6000_file_start (void)
     }
 
 #ifdef USING_ELFOS_H
-  if (rs6000_default_cpu == 0 || rs6000_default_cpu[0] == '\0'
-      || !global_options_set.x_rs6000_cpu_index)
+  if (!(rs6000_default_cpu && rs6000_default_cpu[0])
+      && !global_options_set.x_rs6000_cpu_index)
     {
       fputs ("\t.machine ", asm_out_file);
       if ((rs6000_isa_flags & OPTION_MASK_DIRECT_MOVE) != 0)