nvm placeholder, enable nvm by default
This commit is contained in:
parent
d4be37469e
commit
98166dd809
4
src/h.h
4
src/h.h
@ -472,8 +472,8 @@ static B m_atop( B g, B h);
|
||||
#include <time.h>
|
||||
static inline u64 nsTime() {
|
||||
struct timespec t;
|
||||
timespec_get(&t, TIME_UTC);
|
||||
// clock_gettime(CLOCK_REALTIME, &t);
|
||||
// timespec_get(&t, TIME_UTC); // doesn't seem to exist on Android
|
||||
clock_gettime(CLOCK_REALTIME, &t);
|
||||
return t.tv_sec*1000000000ull + t.tv_nsec;
|
||||
}
|
||||
|
||||
|
||||
5
src/jit/nvm.c
Normal file
5
src/jit/nvm.c
Normal file
@ -0,0 +1,5 @@
|
||||
#if defined(__x86_64) || defined(__amd64__)
|
||||
#include "nvm_x86_64.c"
|
||||
#else
|
||||
#include "nvm_placeholder.c"
|
||||
#endif
|
||||
5
src/jit/nvm_placeholder.c
Normal file
5
src/jit/nvm_placeholder.c
Normal file
@ -0,0 +1,5 @@
|
||||
#include "../core.h"
|
||||
#include "nvm.h"
|
||||
B evalJIT(Body* b, Scope* sc, u8* ptr) { thrM("JIT: Not supported"); }
|
||||
Nvm_res m_nvm(Body* b) { thrM("JIT: Not supported"); }
|
||||
void nvm_free(u8* ptr) { thrM("JIT: Not supported"); }
|
||||
10
src/vm.h
10
src/vm.h
@ -1,7 +1,13 @@
|
||||
#pragma once
|
||||
|
||||
#ifndef JIT_START
|
||||
#define JIT_START -1 // number of calls for when to start JITting. -1: never JIT; 0: JIT everything, 1: JIT after 1 non-JIT invocation; max ¯1+2⋆16
|
||||
|
||||
#if defined(__x86_64) || defined(__amd64__)
|
||||
#ifndef JIT_START
|
||||
#define JIT_START 2 // number of calls for when to start JITting. -1: never JIT; 0: JIT everything, n: JIT after n non-JIT invocations; max ¯1+2⋆16
|
||||
#endif
|
||||
#else
|
||||
#undef JIT_START
|
||||
#define JIT_START -1
|
||||
#endif
|
||||
|
||||
enum {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user