From 1f24fd3e734381f5e268d3a9897a2268b6d0485b Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Fri, 10 Jun 2016 12:38:16 +0000 Subject: [PATCH] Use __USER_LABEL_PREFIX__ in asm statement A target may have a prefix in function symbol. Update interrrupt tests to use __USER_LABEL_PREFIX__ for function symbol in asm statement. * gcc.dg/guality/pr68037-1.c (ASMNAME): New. (ASMNAME2): Likewise. (main): Replace fn in asm statement with ASMNAME ("fn"). * gcc.dg/guality/pr68037-2.c: Likewise. * gcc.dg/guality/pr68037-3.c: Likewise. * gcc.dg/torture/pr68037-1.c: Likewise. * gcc.dg/torture/pr68037-2.c: Likewise. * gcc.dg/torture/pr68037-3.c: Likewise. From-SVN: r237304 --- gcc/testsuite/ChangeLog | 11 +++++++++++ gcc/testsuite/gcc.dg/guality/pr68037-1.c | 4 +++- gcc/testsuite/gcc.dg/guality/pr68037-2.c | 4 +++- gcc/testsuite/gcc.dg/guality/pr68037-3.c | 4 +++- gcc/testsuite/gcc.dg/torture/pr68037-1.c | 4 +++- gcc/testsuite/gcc.dg/torture/pr68037-2.c | 4 +++- gcc/testsuite/gcc.dg/torture/pr68037-3.c | 4 +++- 7 files changed, 29 insertions(+), 6 deletions(-) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 07c63895c6e..2e640a5b189 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,14 @@ +2016-06-10 H.J. Lu + + * gcc.dg/guality/pr68037-1.c (ASMNAME): New. + (ASMNAME2): Likewise. + (main): Replace fn in asm statement with ASMNAME ("fn"). + * gcc.dg/guality/pr68037-2.c: Likewise. + * gcc.dg/guality/pr68037-3.c: Likewise. + * gcc.dg/torture/pr68037-1.c: Likewise. + * gcc.dg/torture/pr68037-2.c: Likewise. + * gcc.dg/torture/pr68037-3.c: Likewise. + 2016-06-10 Bernd Edlinger PR inline-asm/68843 diff --git a/gcc/testsuite/gcc.dg/guality/pr68037-1.c b/gcc/testsuite/gcc.dg/guality/pr68037-1.c index c3ea645e92c..74f61ec5f96 100644 --- a/gcc/testsuite/gcc.dg/guality/pr68037-1.c +++ b/gcc/testsuite/gcc.dg/guality/pr68037-1.c @@ -14,6 +14,8 @@ typedef unsigned int uword_t __attribute__ ((mode (__word__))); #define STRING(x) XSTRING(x) #define XSTRING(x) #x +#define ASMNAME(cname) ASMNAME2 (__USER_LABEL_PREFIX__, cname) +#define ASMNAME2(prefix, cname) XSTRING (prefix) cname struct interrupt_frame { @@ -53,7 +55,7 @@ main () push $" STRING (CS) "; \ push $" STRING (IP) "; \ push $" STRING (ERROR) "; \ - jmp fn"); + jmp " ASMNAME ("fn")); return 0; } diff --git a/gcc/testsuite/gcc.dg/guality/pr68037-2.c b/gcc/testsuite/gcc.dg/guality/pr68037-2.c index 6f7e920d106..c3cd73d2a65 100644 --- a/gcc/testsuite/gcc.dg/guality/pr68037-2.c +++ b/gcc/testsuite/gcc.dg/guality/pr68037-2.c @@ -13,6 +13,8 @@ typedef unsigned int uword_t __attribute__ ((mode (__word__))); #define STRING(x) XSTRING(x) #define XSTRING(x) #x +#define ASMNAME(cname) ASMNAME2 (__USER_LABEL_PREFIX__, cname) +#define ASMNAME2(prefix, cname) XSTRING (prefix) cname struct interrupt_frame { @@ -49,7 +51,7 @@ main () push $" STRING (FLAGS) "; \ push $" STRING (CS) "; \ push $" STRING (IP) "; \ - jmp fn"); + jmp " ASMNAME ("fn")); return 0; } diff --git a/gcc/testsuite/gcc.dg/guality/pr68037-3.c b/gcc/testsuite/gcc.dg/guality/pr68037-3.c index 504a931eb33..6e054720f47 100644 --- a/gcc/testsuite/gcc.dg/guality/pr68037-3.c +++ b/gcc/testsuite/gcc.dg/guality/pr68037-3.c @@ -16,6 +16,8 @@ typedef int aligned __attribute__((aligned(64))); #define STRING(x) XSTRING(x) #define XSTRING(x) #x +#define ASMNAME(cname) ASMNAME2 (__USER_LABEL_PREFIX__, cname) +#define ASMNAME2(prefix, cname) XSTRING (prefix) cname struct interrupt_frame { @@ -65,7 +67,7 @@ main () push $" STRING (FLAGS) "; \ push $" STRING (CS) "; \ push $" STRING (IP) "; \ - jmp fn"); + jmp " ASMNAME ("fn")); return 0; } diff --git a/gcc/testsuite/gcc.dg/torture/pr68037-1.c b/gcc/testsuite/gcc.dg/torture/pr68037-1.c index 15fe08c156f..23d7c6f397a 100644 --- a/gcc/testsuite/gcc.dg/torture/pr68037-1.c +++ b/gcc/testsuite/gcc.dg/torture/pr68037-1.c @@ -14,6 +14,8 @@ typedef unsigned int uword_t __attribute__ ((mode (__word__))); #define STRING(x) XSTRING(x) #define XSTRING(x) #x +#define ASMNAME(cname) ASMNAME2 (__USER_LABEL_PREFIX__, cname) +#define ASMNAME2(prefix, cname) XSTRING (prefix) cname struct interrupt_frame { @@ -53,6 +55,6 @@ main () push $" STRING (CS) "; \ push $" STRING (IP) "; \ push $" STRING (ERROR) "; \ - jmp fn"); + jmp " ASMNAME ("fn")); return 0; } diff --git a/gcc/testsuite/gcc.dg/torture/pr68037-2.c b/gcc/testsuite/gcc.dg/torture/pr68037-2.c index 00ba7d45464..18f98442ceb 100644 --- a/gcc/testsuite/gcc.dg/torture/pr68037-2.c +++ b/gcc/testsuite/gcc.dg/torture/pr68037-2.c @@ -13,6 +13,8 @@ typedef unsigned int uword_t __attribute__ ((mode (__word__))); #define STRING(x) XSTRING(x) #define XSTRING(x) #x +#define ASMNAME(cname) ASMNAME2 (__USER_LABEL_PREFIX__, cname) +#define ASMNAME2(prefix, cname) XSTRING (prefix) cname struct interrupt_frame { @@ -49,6 +51,6 @@ main () push $" STRING (FLAGS) "; \ push $" STRING (CS) "; \ push $" STRING (IP) "; \ - jmp fn"); + jmp " ASMNAME ("fn")); return 0; } diff --git a/gcc/testsuite/gcc.dg/torture/pr68037-3.c b/gcc/testsuite/gcc.dg/torture/pr68037-3.c index abf8adbc734..86324f1a8fb 100644 --- a/gcc/testsuite/gcc.dg/torture/pr68037-3.c +++ b/gcc/testsuite/gcc.dg/torture/pr68037-3.c @@ -16,6 +16,8 @@ typedef int aligned __attribute__((aligned(64))); #define STRING(x) XSTRING(x) #define XSTRING(x) #x +#define ASMNAME(cname) ASMNAME2 (__USER_LABEL_PREFIX__, cname) +#define ASMNAME2(prefix, cname) XSTRING (prefix) cname struct interrupt_frame { @@ -65,6 +67,6 @@ main () push $" STRING (FLAGS) "; \ push $" STRING (CS) "; \ push $" STRING (IP) "; \ - jmp fn"); + jmp " ASMNAME ("fn")); return 0; } -- 2.30.2