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:
@@ -27,8 +27,21 @@
|
||||
* optimizations.
|
||||
*/
|
||||
intptr_t(atomic_load)(void *p, size_t n) {
|
||||
intptr_t x;
|
||||
x = 0;
|
||||
memcpy(&x, p, MAX(n, sizeof(x)));
|
||||
return x;
|
||||
intptr_t x = 0;
|
||||
switch (n) {
|
||||
case 1:
|
||||
__builtin_memcpy(&x, p, 1);
|
||||
return x;
|
||||
case 2:
|
||||
__builtin_memcpy(&x, p, 2);
|
||||
return x;
|
||||
case 4:
|
||||
__builtin_memcpy(&x, p, 4);
|
||||
return x;
|
||||
case 8:
|
||||
__builtin_memcpy(&x, p, 8);
|
||||
return x;
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user