]> xenbits.xensource.com Git - people/dariof/xen.git/commitdiff
x86: fix GET_STACK_END
authorWei Liu <wei.liu2@citrix.com>
Wed, 24 Jan 2018 20:26:26 +0000 (20:26 +0000)
committerWei Liu <wei.liu2@citrix.com>
Thu, 25 Jan 2018 11:34:17 +0000 (11:34 +0000)
AIUI the purpose of having the .if directive is to make GET_STACK_END
work with any general purpose registers. The code as-is would produce
the wrong result for r8. Fix it.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/include/asm-x86/asm_defns.h

index d2d91ca1faa601501fcc869a875c566162e1788a..6a2b833db621d31aedaa142f5b15a4da4d8df272 100644 (file)
@@ -120,7 +120,7 @@ void ret_from_intr(void);
 
 #define STACK_CPUINFO_FIELD(field) (1 - CPUINFO_sizeof + CPUINFO_##field)
 #define GET_STACK_END(reg)                        \
-        .if .Lr##reg > 8;                         \
+        .if .Lr##reg >= 8;                        \
         movq $STACK_SIZE-1, %r##reg;              \
         .else;                                    \
         movl $STACK_SIZE-1, %e##reg;              \