diff options
author | H.J. Lu <hongjiu.lu@intel.com> | 2016-06-10 12:38:16 +0000 |
---|---|---|
committer | H.J. Lu <hjl@gcc.gnu.org> | 2016-06-10 05:38:16 -0700 |
commit | 1f24fd3e734381f5e268d3a9897a2268b6d0485b (patch) | |
tree | 82dd00249086a48332bd0e2a11532457aa79d471 /gcc | |
parent | ad551c07abd4d9227fad658d14f1fc68340db16e (diff) | |
download | gcc-1f24fd3e734381f5e268d3a9897a2268b6d0485b.zip gcc-1f24fd3e734381f5e268d3a9897a2268b6d0485b.tar.gz gcc-1f24fd3e734381f5e268d3a9897a2268b6d0485b.tar.bz2 |
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
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/ChangeLog | 11 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/guality/pr68037-1.c | 4 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/guality/pr68037-2.c | 4 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/guality/pr68037-3.c | 4 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/torture/pr68037-1.c | 4 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/torture/pr68037-2.c | 4 | ||||
-rw-r--r-- | 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 07c6389..2e640a5 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,14 @@ +2016-06-10 H.J. Lu <hongjiu.lu@intel.com> + + * 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 <bernd.edlinger@hotmail.de> 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 c3ea645..74f61ec 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 6f7e920..c3cd73d 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 504a931..6e05472 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 15fe08c..23d7c6f 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 00ba7d4..18f9844 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 abf8adb..86324f1 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; } |