Skip to content

Commit 33d7de7

Browse files
committed
Merge branch 'master' of jsoftware.com:jsource
2 parents ab4ee4e + b9c42eb commit 33d7de7

18 files changed

Lines changed: 157 additions & 27 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ jsrc/jversion.h
1313
foo.ijs
1414
jj.ijs
1515
test*.txt
16+
*.tmp
1617

1718
# windows - most output files go to %userprofile%\jbld\jout
1819
# some end up in the project folder and are marked here

jsrc/Jnative.mk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ LOCAL_MODULE_FILENAME := libjnative
99
LOCAL_LDLIBS :=
1010

1111
ifeq ($(TARGET_ARCH_ABI),arm64-v8a)
12-
LOCAL_CFLAGS := -fPIC -Os -fvisibility=hidden -fwrapv -Werror -fno-strict-aliasing -march=armv8-a
12+
LOCAL_CFLAGS := -fPIC -Os -fvisibility=hidden -fwrapv -Werror -fno-strict-aliasing -DC_CRC32C=1 -DEMU_AVX=1 -DPYXES=1 -march=armv8-a
1313
LOCAL_ARM_NEON := true
1414
endif
1515
ifeq ($(TARGET_ARCH_ABI),armeabi-v7a)
@@ -21,7 +21,7 @@ ifeq ($(TARGET_ARCH_ABI),armeabi)
2121
LOCAL_ARM_MODE := thumb
2222
endif
2323
ifeq ($(TARGET_ARCH),x86_64)
24-
LOCAL_CFLAGS := -fPIC -Os -fvisibility=hidden -fwrapv -Werror -fno-strict-aliasing -march=x86-64 -msse4.2 -mpopcnt -fno-stack-protector
24+
LOCAL_CFLAGS := -fPIC -Os -fvisibility=hidden -fwrapv -Werror -fno-strict-aliasing -DC_CRC32C=1 -DEMU_AVX=1 -DPYXES=1 -march=x86-64 -msse4.2 -mpopcnt -fno-stack-protector
2525
endif
2626
ifeq ($(TARGET_ARCH),x86)
2727
LOCAL_CFLAGS := -fPIC -Os -fvisibility=hidden -fwrapv -Werror -fno-strict-aliasing -march=i686 -mssse3 -mfpmath=sse -fno-stack-protector

jsrc/jt.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,5 @@ typedef JST* JS; // shared part of struct
366366
#define THREADID(jt) ((((I)(jt)&(JTALIGNBDY-1))>>LGTHREADBLKSIZE)-(offsetof(struct JSTstruct, threaddata[0])>>LGTHREADBLKSIZE)) // thread number from jt. Thread 0 is the master
367367
#define JTTHREAD0(jt) (JJTOJ(jt)->threaddata) // the array of JTT structs
368368
#define JTFORTHREAD(jt,n) (&(JTTHREAD0(jt)[n])) // JTT struct for thread n
369-
#if !(defined(ANDROID) && defined(__x86_64__) && MAXTASKS<2)
370369
enum {xxxx = 1/(offsetof(struct JSTstruct, threaddata[MAXTASKS])<=JTALIGNBDY) }; // assert not too many threads
371370
enum {xxxxx = 1/(offsetof(struct JSTstruct, threaddata[1])-offsetof(struct JSTstruct, threaddata[0])==((I)1<<LGTHREADBLKSIZE)) }; // assert size of threaddata what we expected
372-
#endif

jsrc/vi.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -905,7 +905,7 @@ static IOFSMALLRANGE(jtio42,I,US) static IOFSMALLRANGE(jtio44,I,UI4) // 4-byte
905905
case IEPS: {T*av=(T*)u+m; DQ(ac, DQ(c, x=(xe); j=-m; while(j<0 &&(exp))++j; *zb++=j<0; wv+=q;); av+=p; if(1==wc)wv=v0;);} break; \
906906
}}
907907

908-
static void jtiosc(J jt,I mode,I m,I c,I ac,I wc,A a,A w,A z){B*zb;I j,p,q,*u,*v,zn,*zv;
908+
static A jtiosc(J jt,I mode,I m,I c,I ac,I wc,A a,A w,A z){B*zb;I j,p,q,*u,*v,zn,*zv;
909909
p=1<ac?m:0; q=1<wc||1<c;
910910
zn=AN(z);
911911
zv=AV(z); zb=(B*)zv; u=AV(a); v=AV(w);
@@ -922,6 +922,7 @@ static void jtiosc(J jt,I mode,I m,I c,I ac,I wc,A a,A w,A z){B*zb;I j,p,q,*u,*v
922922
case FLX: if(1.0==jt->cct)SCDO(D, *wv,x!=av[j])
923923
else{D cct=jt->cct; SCDO(D, *wv,!TCMPEQ(cct,x,av[j]));} break;
924924
}
925+
RETF(z);
925926
} /* right argument cell is scalar; only for modes IIDOT IICO IEPS */
926927

927928

make2/build_jnative.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,23 @@ common="$OPENMP -fPIC -O2 -fvisibility=hidden -fno-strict-aliasing \
110110

111111
fi
112112

113+
USE_PYXES="${USE_PYXES:=1}"
114+
if [ $USE_PYXES -eq 1 ] ; then
115+
common="$common -DPYXES=1"
116+
LDTHREAD=" -pthread "
117+
else
118+
common="$common -DPYXES=0"
119+
fi
120+
121+
if [ -z "${j64x##*32*}" ]; then
122+
USE_EMU_AVX=0
123+
else
124+
USE_EMU_AVX="${USE_EMU_AVX:=1}"
125+
fi
126+
if [ $USE_EMU_AVX -eq 1 ] ; then
127+
common="$common -DEMU_AVX=1"
128+
fi
129+
113130
case $jplatform\_$j64x in
114131

115132
linux_j32)

make2/clean.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,9 @@ find ../dllsrc -name "*.o" -type f -delete
2121
find ../sleef/src -name "*.o" -type f -delete
2222
find ../base64 -name "*.o" -type f -delete
2323
find obj -name "*.o" -type f -delete || true
24+
25+
find ../jsrc -name "*.tmp" -type f -delete
26+
find ../dllsrc -name "*.tmp" -type f -delete
27+
find ../sleef/src -name "*.tmp" -type f -delete
28+
find ../base64 -name "*.tmp" -type f -delete
29+
find obj -name "*.tmp" -type f -delete || true

makemsvc/jconsole/makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ endif
3131
RCS= ../../makevs/jconsole/jconsole.rc
3232

3333
ifndef LD
34-
LD=link
34+
LD=lld-link
3535
endif
3636

3737
%.o: %.c

makemsvc/jconsole/makefile.win

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ CFLAGSLN= -DREADLINE -DUSE_LINENOISE
3131
RCS= ../../makevs/jconsole/jconsole.rc
3232

3333
!ifndef LD
34-
LD=link
34+
LD=lld-link
3535
!endif
3636

3737
.c.o:

makemsvc/jdll/makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ DEF= ../../dllsrc/jdll.def
252252
RCS= ../../dllsrc/jdll.rc
253253

254254
ifndef LD
255-
LD=link
255+
LD=lld-link
256256
endif
257257

258258
%.o: %.c

makemsvc/jdll/makefile.win

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ DEF= ../../dllsrc/jdll.def
252252
RCS= ../../dllsrc/jdll.rc
253253

254254
!ifndef LD
255-
LD=link
255+
LD=lld-link
256256
!endif
257257

258258
.c.o:

0 commit comments

Comments
 (0)