Fix #14151 (#14205) [backport]

(cherry picked from commit d5c014e59b)
This commit is contained in:
slangmgh
2020-05-03 15:47:21 +08:00
committed by narimiran
parent c90bbe3201
commit d15cbb229a

View File

@@ -281,10 +281,7 @@ static int __tcc_cas(int *ptr, int oldVal, int newVal)
: "r" (newVal), "m" (*ptr), "a" (oldVal)
: "memory");
if (ret)
return 0;
else
return 1;
return ret;
}
""".}
else:
@@ -301,10 +298,7 @@ static int __tcc_cas(int *ptr, int oldVal, int newVal)
: "r" (newVal), "m" (*ptr), "a" (oldVal)
: "memory");
if (ret)
return 0;
else
return 1;
return ret;
}
""".}