Definen LLP64 data model for code completion

This change should not be interpreted as an intent to support MSVC which
appears to live on in VSCode IntelliSense for what's dead will never die
This commit is contained in:
Justine Tunney 2021-02-04 16:55:56 -08:00
parent 3384a5a48c
commit 74d48f7cb6
5 changed files with 114 additions and 7 deletions

View file

@ -27,6 +27,20 @@
* optimizations.
*/
intptr_t(atomic_store)(void *p, intptr_t x, size_t n) {
memcpy(p, &x, MAX(n, sizeof(x)));
return x;
switch (n) {
case 1:
__builtin_memcpy(p, &x, 1);
return x;
case 2:
__builtin_memcpy(p, &x, 2);
return x;
case 4:
__builtin_memcpy(p, &x, 4);
return x;
case 8:
__builtin_memcpy(p, &x, 8);
return x;
default:
return 0;
}
}