mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-05 12:12:28 +00:00
Strengthen the pledge() polyfill
This commit is contained in:
parent
a6f65eea7c
commit
3c92adfd6e
79 changed files with 1457 additions and 357 deletions
|
@ -17,9 +17,14 @@
|
|||
│ PERFORMANCE OF THIS SOFTWARE. │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/bits/bits.h"
|
||||
#include "libc/calls/calls.h"
|
||||
#include "libc/testlib/ezbench.h"
|
||||
#include "libc/testlib/testlib.h"
|
||||
|
||||
__attribute__((__constructor__)) static void init(void) {
|
||||
pledge("stdio rpath", 0);
|
||||
}
|
||||
|
||||
unsigned P[] = {
|
||||
// 33333222222222111111111000000000
|
||||
0b000011000000010000000001000000000, //
|
||||
|
@ -106,7 +111,5 @@ TEST(bextra, 9bit) {
|
|||
}
|
||||
|
||||
BENCH(bextra, bench) {
|
||||
EZBENCH2("bextra 0/32", donothing, bextra(P, 0, 32));
|
||||
EZBENCH2("bextra 1/31", donothing, bextra(P, 1, 31));
|
||||
EZBENCH2("bextra 1/32", donothing, bextra(P, 1, 32));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue