mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-04 10:18:31 +00:00
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:
parent
3384a5a48c
commit
74d48f7cb6
5 changed files with 114 additions and 7 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue