xen-vtx-unstable

view xen/arch/x86/rwlock.c @ 6759:b5d91089e42c

Newer binutils is a bit stricter and errors out when you try
to use movl on a 16 bit word on x86_64. Using just a "mov"
compiles fine and should result in the same code.

{standard input}: Assembler messages:
{standard input}:2138: Error: suffix or operands invalid for `mov'
{standard input}:2140: Error: suffix or operands invalid for `mov'
{standard input}:2142: Error: suffix or operands invalid for `mov'
{standard input}:2144: Error: suffix or operands invalid for `mov'

Signed-off-by: Rik van Riel <riel@redhat.com>
author kaf24@firebug.cl.cam.ac.uk
date Tue Sep 13 10:21:22 2005 +0000 (2005-09-13)
parents 0e23f01219c6
children
line source
1 #include <asm/atomic.h>
2 #include <asm/rwlock.h>
4 #if defined(CONFIG_SMP)
5 asm(
6 ".align 4\n"
7 ".globl __write_lock_failed\n"
8 "__write_lock_failed:\n"
9 " " LOCK "addl $" RW_LOCK_BIAS_STR ",(%"__OP"ax)\n"
10 "1: rep; nop\n"
11 " cmpl $" RW_LOCK_BIAS_STR ",(%"__OP"ax)\n"
12 " jne 1b\n"
13 " " LOCK "subl $" RW_LOCK_BIAS_STR ",(%"__OP"ax)\n"
14 " jnz __write_lock_failed\n"
15 " ret\n"
17 ".align 4\n"
18 ".globl __read_lock_failed\n"
19 "__read_lock_failed:\n"
20 " lock ; incl (%"__OP"ax)\n"
21 "1: rep; nop\n"
22 " cmpl $1,(%"__OP"ax)\n"
23 " js 1b\n"
24 " lock ; decl (%"__OP"ax)\n"
25 " js __read_lock_failed\n"
26 " ret\n"
27 );
28 #endif