mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-27 14:58:30 +00:00
Get codebase completely working with LLVM
You can now build Cosmopolitan with Clang: make -j8 MODE=llvm o/llvm/examples/hello.com The assembler and linker code is now friendly to LLVM too. So it's not needed to configure Clang to use binutils under the hood. If you love LLVM then you can now use pure LLVM.
This commit is contained in:
parent
0e36cb3ac4
commit
e75ffde09e
4528 changed files with 7776 additions and 11640 deletions
|
@ -20,19 +20,19 @@
|
|||
#include "libc/notice.inc"
|
||||
.source __FILE__
|
||||
|
||||
/ Resizes the space allocated for p to size n, only if this can be
|
||||
/ done without moving p (i.e., only if there is adjacent space
|
||||
/ available if n is greater than p's current allocated size, or n
|
||||
/ is less than or equal to p's size). This may be used instead of
|
||||
/ plain realloc if an alternative allocation strategy is needed
|
||||
/ upon failure to expand space, for example, reallocation of a
|
||||
/ buffer that must be memory-aligned or cleared. You can use
|
||||
/ realloc_in_place to trigger these alternatives only when needed.
|
||||
/
|
||||
/ @param rdi (p) is address of current allocation
|
||||
/ @param rsi (newsize) is number of bytes needed
|
||||
/ @return rax is result, or NULL w/ errno
|
||||
/ @see dlrealloc_in_place()
|
||||
// Resizes the space allocated for p to size n, only if this can be
|
||||
// done without moving p (i.e., only if there is adjacent space
|
||||
// available if n is greater than p's current allocated size, or n
|
||||
// is less than or equal to p's size). This may be used instead of
|
||||
// plain realloc if an alternative allocation strategy is needed
|
||||
// upon failure to expand space, for example, reallocation of a
|
||||
// buffer that must be memory-aligned or cleared. You can use
|
||||
// realloc_in_place to trigger these alternatives only when needed.
|
||||
//
|
||||
// @param rdi (p) is address of current allocation
|
||||
// @param rsi (newsize) is number of bytes needed
|
||||
// @return rax is result, or NULL w/ errno
|
||||
// @see dlrealloc_in_place()
|
||||
realloc_in_place:
|
||||
jmp *hook_realloc_in_place(%rip)
|
||||
.endfn realloc_in_place,globl
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue