Commit 1f24fd3e by H.J. Lu Committed by H.J. Lu

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
parent ad551c07
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
......
......@@ -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;
}
......
......@@ -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;
}
......
......@@ -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;
}
......
......@@ -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;
}
......@@ -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;
}
......@@ -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;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment