summaryrefslogtreecommitdiff
path: root/emulators/qemu-devel/files/extra-patch-bsd-user-arm-target_arch_thread.h
blob: 5876e74de3fdfc547b5fce46462f08d0464cb781 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
diff --git a/bsd-user/arm/target_arch_thread.h b/bsd-user/arm/target_arch_thread.h
index e69f612..ee4d67d 100644
--- a/bsd-user/arm/target_arch_thread.h
+++ b/bsd-user/arm/target_arch_thread.h
@@ -29,8 +29,8 @@ static inline void target_thread_set_upcall(CPUARMState *regs, abi_ulong entry,
      * Make sure the stack is properly aligned.
      * arm/include/param.h (STACKLIGN() macro)
      */
-    sp = ((u_int)(stack_base + stack_size) & ~(8-1)) -
-        sizeof(struct target_trapframe);
+    sp = (u_int)((stack_base + stack_size) -
+        sizeof(struct target_trapframe)) & ~0x7;
 
     /* sp = stack base */
     regs->regs[13] = sp;