diff mbox series

V12 patch #6 of 14, Add -mcpu=future target-supports options

Message ID 20200110004307.GF30103@ibm-toto.the-meissners.org
State New
Headers show
Series V12 patch #6 of 14, Add -mcpu=future target-supports options | expand

Commit Message

Michael Meissner Jan. 10, 2020, 12:43 a.m. UTC
This patch is the same as V11, #7:
https://gcc.gnu.org/ml/gcc-patches/2019-12/msg01495.html

This patch adds the necessary options to target-supports.exp to enable the
specific target supports for -mcpu=future.  It contains changes that you asked
for some time ago.  Can I check this into the trunk?

2020-01-09  Michael Meissner  <meissner@linux.ibm.com>

	* lib/target-supports.exp (check_effective_target_powerpc_pcrel):
	New target for PowerPC -mcpu=future support.
	(check_effective_target_powerpc_prefixed_addr): New target for
	PowerPC -mcpu=future support.
diff mbox series

Patch

Index: gcc/testsuite/lib/target-supports.exp
===================================================================
--- gcc/testsuite/lib/target-supports.exp	(revision 280069)
+++ gcc/testsuite/lib/target-supports.exp	(working copy)
@@ -2161,6 +2161,23 @@  proc check_p9modulo_hw_available { } {
     }]
 }
 
+# Return 1 if the target generates PC-relative instructions automatically
+proc check_effective_target_powerpc_pcrel { } {
+    return [check_no_messages_and_pattern powerpc_pcrel \
+	{\mpld\M.*[@]pcrel} assembly {
+	    static long s;
+	    long *p = &s;
+	    long foo (void) { return s; }
+	} {-O2 -mcpu=future}]
+}
+
+# Return 1 if the target generates prefixed instructions automatically
+proc check_effective_target_powerpc_prefixed_addr { } {
+    return [check_no_messages_and_pattern powerpc_prefixed_addr \
+	{\mpld\M} assembly {
+	    long foo (long *p) { return p[0x12345]; }
+	} {-O2 -mcpu=future}]
+}
 
 # Return 1 if the target supports executing FUTURE instructions, 0 otherwise.
 # Cache the result.  It is assumed that if a simulator does not support the