From af6ed8f063cd3d12b9f1435a2b274f24e708e35b Mon Sep 17 00:00:00 2001
From: Iain Sandoe <iain@sandoe.co.uk>
Date: Mon, 12 Oct 2020 15:02:39 +0100
Subject: [PATCH] testsuite, Objective-C, Darwin, Arm64 : adjust scan-asms for
 arm64.

We need to pick up xword and word instead of quad and long.

(cherry picked from commit af20a9f5bbd84561965876fb01468863a4a33b8b)
Signed-off-by: Kirill A. Korinsky <kirill@korins.ky>
---
 gcc/testsuite/obj-c++.dg/torture/strings/const-str-10.mm | 2 +-
 gcc/testsuite/obj-c++.dg/torture/strings/const-str-11.mm | 2 +-
 gcc/testsuite/obj-c++.dg/torture/strings/const-str-9.mm  | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git gcc/testsuite/obj-c++.dg/torture/strings/const-str-10.mm gcc/testsuite/obj-c++.dg/torture/strings/const-str-10.mm
index e1dad124cd6..eb89710d890 100644
--- gcc/testsuite/obj-c++.dg/torture/strings/const-str-10.mm
+++ gcc/testsuite/obj-c++.dg/torture/strings/const-str-10.mm
@@ -33,4 +33,4 @@ const NSConstantString *appKey = @"MyApp";
 /* { dg-final { scan-assembler ".section __OBJC, __cstring_object" { target { *-*-darwin* && { ! lp64 } } } } } */
 /* { dg-final { scan-assembler ".section __DATA, __objc_stringobj" { target { *-*-darwin* && { lp64 } } } } } */
 /* { dg-final { scan-assembler ".long\t__NSConstantStringClassReference\n\t.long\t.*\n\t.long\t5\n\t.data" { target { *-*-darwin* && { ! lp64 } } } } } */
-/* { dg-final { scan-assembler ".quad\t_OBJC_CLASS_._NSConstantString\n\t.quad\t.*\n\t.long\t5\n\t.space" { target { *-*-darwin* && { lp64 } } } } } */
+/* { dg-final { scan-assembler {.(quad|xword)\t_OBJC_CLASS_._NSConstantString\n\t.(quad|xword)\t.*\n\t.(long|word)\t5\n\t.space} { target { *-*-darwin* && { lp64 } } } } } */
diff --git gcc/testsuite/obj-c++.dg/torture/strings/const-str-11.mm gcc/testsuite/obj-c++.dg/torture/strings/const-str-11.mm
index 30a9228a64e..c1b58dc6cb8 100644
--- gcc/testsuite/obj-c++.dg/torture/strings/const-str-11.mm
+++ gcc/testsuite/obj-c++.dg/torture/strings/const-str-11.mm
@@ -33,4 +33,4 @@ const XStr *appKey = @"MyApp";
 /* { dg-final { scan-assembler ".section __OBJC, __cstring_object" { target { *-*-darwin* && { ! lp64 } } } } } */
 /* { dg-final { scan-assembler ".section __DATA, __objc_stringobj" { target { *-*-darwin* && { lp64 } } } } } */
 /* { dg-final { scan-assembler ".long\t__XStrClassReference\n\t.long\t.*\n\t.long\t5\n\t.data"  { target { *-*-darwin* && { ! lp64 } } } } } */
-/* { dg-final { scan-assembler ".quad\t_OBJC_CLASS_._XStr\n\t.quad\t.*\n\t.long\t5\n\t.space" { target { *-*-darwin* && { lp64 } } } } } */
+/* { dg-final { scan-assembler {.(quad|xword)\t_OBJC_CLASS_._XStr\n\t.(quad|xword)\t.*\n\t.(long|word)\t5\n\t.space} { target { *-*-darwin* && { lp64 } } } } } */
diff --git gcc/testsuite/obj-c++.dg/torture/strings/const-str-9.mm gcc/testsuite/obj-c++.dg/torture/strings/const-str-9.mm
index a1a14295e90..8457f46be53 100644
--- gcc/testsuite/obj-c++.dg/torture/strings/const-str-9.mm
+++ gcc/testsuite/obj-c++.dg/torture/strings/const-str-9.mm
@@ -25,4 +25,4 @@ const NSConstantString *appKey = @"MyApp";
 /* { dg-final { scan-assembler ".section __OBJC, __cstring_object" { target { *-*-darwin* && { ! lp64 } } } } } */
 /* { dg-final { scan-assembler ".section __DATA, __objc_stringobj" { target { *-*-darwin* && { lp64 } } } } } */
 /* { dg-final { scan-assembler ".long\t__NSConstantStringClassReference\n\t.long\t.*\n\t.long\t5\n\t.data" { target { *-*-darwin* && { ! lp64 } } } } } */
-/* { dg-final { scan-assembler ".quad\t_OBJC_CLASS_._NSConstantString\n\t.quad\t.*\n\t.long\t5\n\t.space" { target { *-*-darwin* && { lp64 } } } } } */
+/* { dg-final { scan-assembler {.(quad|xword)\t_OBJC_CLASS_._NSConstantString\n\t.(quad|xword)\t.*\n\t.(long|word)\t5\n\t.space} { target { *-*-darwin* && { lp64 } } } } } */
-- 
2.42.1

