Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Xen: Changelog

[xen-unstable] x86: don't use .subsection when compiling with clang

 

 

Xen changelog RSS feed   Index | Next | Previous | View Threaded


patchbot at xen

Apr 13, 2012, 9:33 AM

Post #1 of 1 (87 views)
Permalink
[xen-unstable] x86: don't use .subsection when compiling with clang

# HG changeset patch
# User Tim Deegan <tim [at] xen>
# Date 1334146233 -3600
# Node ID 1d8fb1330f98d3eae982c2540c8a2acab7f00009
# Parent d5f9005dfc4ac2edb444e342a427dbe0f2cdf2f5
x86: don't use .subsection when compiling with clang

LLVM's assembler doesn't support the .subsection directive, so put
the out-of-line failure path in .fixup instead.

Signed-off-by: Tim Deegan <tim [at] xen>
Acked-by: Jan Beulich <jbeulich [at] suse>
Acked-by: Keir Fraser <keir [at] xen>
Committed-by: Tim Deegan <tim [at] xen>
---


diff -r d5f9005dfc4a -r 1d8fb1330f98 xen/include/asm-x86/spinlock.h
--- a/xen/include/asm-x86/spinlock.h Wed Apr 11 13:10:33 2012 +0100
+++ b/xen/include/asm-x86/spinlock.h Wed Apr 11 13:10:33 2012 +0100
@@ -45,11 +45,19 @@ static always_inline int _raw_read_trylo
asm volatile (
" lock; decl %0 \n"
" jns 2f \n"
+#ifdef __clang__ /* clang's builtin assember can't do .subsection */
+ "1: .pushsection .fixup,\"ax\"\n"
+#else
"1: .subsection 1 \n"
+#endif
"2: lock; incl %0 \n"
" decl %1 \n"
" jmp 1b \n"
+#ifdef __clang__
+ " .popsection \n"
+#else
" .subsection 0 \n"
+#endif
: "=m" (rw->lock), "=r" (acquired) : "1" (1) : "memory" );

return acquired;

_______________________________________________
Xen-changelog mailing list
Xen-changelog [at] lists
http://lists.xensource.com/xen-changelog

Xen changelog RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.