diff --git a/src/corelib/arch/qatomic_i386.h b/src/corelib/arch/qatomic_i386.h index 0c75d3540b..d2ed66adcc 100644 --- a/src/corelib/arch/qatomic_i386.h +++ b/src/corelib/arch/qatomic_i386.h @@ -258,7 +258,7 @@ T QBasicAtomicOps::fetchAndAddRelaxed(T &_q_value, typename QAtomicAdditiv asm volatile("lock\n" "xadd %0,%1" : "=r" (result), "+m" (_q_value) - : "0" (valueToAdd * QAtomicAdditiveType::AddScale) + : "0" (T(valueToAdd * QAtomicAdditiveType::AddScale)) : "memory"); return result; } @@ -270,7 +270,7 @@ T QBasicAtomicOps<1>::fetchAndAddRelaxed(T &_q_value, typename QAtomicAdditiveTy asm volatile("lock\n" "xadd %0,%1" : "=q" (result), "+m" (_q_value) - : "0" (valueToAdd * QAtomicAdditiveType::AddScale) + : "0" (T(valueToAdd * QAtomicAdditiveType::AddScale)) : "memory"); return result; } diff --git a/src/corelib/arch/qatomic_x86_64.h b/src/corelib/arch/qatomic_x86_64.h index 342cd12294..db334700b2 100644 --- a/src/corelib/arch/qatomic_x86_64.h +++ b/src/corelib/arch/qatomic_x86_64.h @@ -284,7 +284,7 @@ T QBasicAtomicOps::fetchAndAddRelaxed(T &_q_value, typename QAtomicAdditiv asm volatile("lock\n" "xadd %0,%1" : "=r" (result), "+m" (_q_value) - : "0" (valueToAdd * QAtomicAdditiveType::AddScale) + : "0" (T(valueToAdd * QAtomicAdditiveType::AddScale)) : "memory"); return result; } @@ -296,7 +296,7 @@ T QBasicAtomicOps<1>::fetchAndAddRelaxed(T &_q_value, typename QAtomicAdditiveTy asm volatile("lock\n" "xadd %0,%1" : "=q" (result), "+m" (_q_value) - : "0" (valueToAdd * QAtomicAdditiveType::AddScale) + : "0" (T(valueToAdd * QAtomicAdditiveType::AddScale)) : "memory"); return result; }