Re: [cfe-users] RFC v2: Re: cacheflush.2

2020-12-11 Thread Alejandro Colomar (man-pages) via cfe-users
Hi Michael, On 12/11/20 9:15 AM, Michael Kerrisk (man-pages) wrote: > i Alex, > > On 12/10/20 9:56 PM, Alejandro Colomar (man-pages) wrote: >> Hi all, >> >> v2: >> >> [ >> NOTES >>Unless you need the finer grained control that this system >>call provides, you probably want to

[cfe-users] RFC v2: Re: cacheflush.2

2020-12-11 Thread Alejandro Colomar (man-pages) via cfe-users
Hi all, v2: [ NOTES Unless you need the finer grained control that this system call provides, you probably want to use the GCC built-in function __builtin___clear_cache(), which provides a more portable interface: void __builtin___clear_cache(vo

Re: [cfe-users] cacheflush.2

2020-12-11 Thread Alejandro Colomar (man-pages) via cfe-users
Hi Heinrich, It looks like a bug (or at least an undocumented divergence from GCC) in Clang/LLVM. Or I couldn't find the documentation for it. Clang uses 'char *': https://github.com/llvm/llvm-project/blob/7faf62a80bfc3a9dfe34133681fcc31f8e8d658b/clang/include/clang/Basic/Builtins.def#L583 GCC

Re: [cfe-users] cacheflush.2

2020-12-11 Thread Alejandro Colomar (man-pages) via cfe-users
It looks like GCC recently moved from 'char *' to 'void *'. This SO question[1] (4 years ago) quotes the GCC docs and they had 'char *'. Maybe Clang hasn't noticed the change. I'll report a bug. [1]: https://stackoverflow.com/q/35741814/6872717 On 12/9/20 8:15 PM, Alejandro Colomar (man-pages) wr

[cfe-users] RFC v3: Re: cacheflush.2

2020-12-11 Thread Alejandro Colomar (man-pages) via cfe-users
Hi all, Please review this text: [ NOTES Unless you need the finer grained control that this system call provides, you probably want to use the GCC built-in function __builtin___clear_cache(), which provides a more portable interface: void __bui

[cfe-users] RFC v4: Re: cacheflush.2

2020-12-11 Thread Alejandro Colomar (man-pages) via cfe-users
I forgot to add a junk to the text. v4: NOTES Unless you need the finer grained control that this system call provides, you probably want to use the GCC built-in function __builtin___clear_cache(), which provides a portable interface across platforms supported

Re: [cfe-users] cacheflush.2

2020-12-21 Thread Alejandro Colomar (man-pages) via cfe-users
Hello Martin, Thanks for the correction! Then the prototypes that changes from 'char *' to 'void *' in r269082 were not exposed to the user, right? I guess then those are just internal implementation where GCC did use 'char *'. Where is the actual prototype exposed to the user declared? Thanks,

[cfe-users] Ping: cacheflush.2

2020-12-21 Thread Alejandro Colomar (man-pages) via cfe-users
Hi Martin, I sent you an email, but I received a "delivery failure". If you're reading this from a list, could you answer, please? Thanks, Alex On 12/14/20 11:34 PM, Alejandro Colomar (man-pages) wrote: > Hello Martin, > > Thanks for the correction! > Then the prototypes that changes from 'cha

Re: [cfe-users] Ping: cacheflush.2

2020-12-21 Thread Alejandro Colomar (man-pages) via cfe-users
Hi Martin, Thanks! It's good to learn some GCC internal details :) Cheers, Alex On 12/18/20 5:51 PM, Martin Sebor wrote: > On 12/18/20 3:42 AM, Alejandro Colomar (man-pages) wrote: >> Hi Martin, >> >> I sent you an email, but I received a "delivery failure". >> If you're reading this from a li

[cfe-users] Ping: [PATCH v6] cacheflush.2: Document __builtin___clear_cache() as a more portable alternative

2020-12-21 Thread Alejandro Colomar (man-pages) via cfe-users
Ping On 12/15/20 2:30 PM, Alejandro Colomar wrote: > Reported-by: Heinrich Schuchardt > Signed-off-by: Alejandro Colomar > Cc: Martin Sebor > Cc: Dave Martin > --- > > v6: > - GCC has always exposed 'void *', as Martin Sebor noted. > It's Clang (and maybe others) that (following GCC's docs)