Fix #14151 (#14205) [backport]

This commit is contained in:
slangmgh
2020-05-03 15:47:21 +08:00
committed by GitHub
parent b447ff7860
commit d5c014e59b

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;
}
""".}