kernel & addons: Build with the non-legacy GCC even on x86_gcc2h.

Only one code change: for some reason, GCC chokes on the cr3 functions
as macros (throwing errors about invalid registers.) The BSDs have them
as inline functions instead, so they are converted to that here.

Tested and working. There seems to be about a 10% decrease in CPU time
on some compilation benchmarks that I briefly tried.

Change-Id: I31666297394d7619f83fca6ff5f933ddd6f07420
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4515
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
This commit is contained in:
Augustin Cavalier
2021-10-02 18:29:40 +00:00
committed by waddlesplash
parent 407f08de29
commit 7aa5574713
20 changed files with 85 additions and 56 deletions
@@ -34,8 +34,11 @@
_v; \
})
#define x86_write_cr3(value) \
__asm__("mov %0,%%cr3" : : "r" (value))
static inline void
x86_write_cr3(size_t value)
{
__asm__("mov %0,%%cr3" : : "r" (value) : "memory");
}
#define x86_read_cr4() ({ \
size_t _v; \