Skip to content

Commit 416fab3

Browse files
authored
Merge pull request #31 from codereport/remove-32
Removing 32-bit Support
2 parents 4a7105f + 02655c3 commit 416fab3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+98
-982
lines changed

base64/lib/arch/generic/32/dec_loop.c

Lines changed: 0 additions & 86 deletions
This file was deleted.

base64/lib/arch/generic/32/enc_loop.c

Lines changed: 0 additions & 73 deletions
This file was deleted.

base64/lib/arch/generic/codec-generic.c

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,32 +7,17 @@
77
#include "../../codecs.h"
88
#include "../../env.h"
99

10-
#if BASE64_WORDSIZE == 32
11-
# include "32/enc_loop.c"
12-
#elif BASE64_WORDSIZE == 64
13-
# include "64/enc_loop.c"
14-
#endif
15-
16-
#if BASE64_WORDSIZE >= 32
17-
# include "32/dec_loop.c"
18-
#endif
10+
#include "64/enc_loop.c"
1911

2012
BASE64_ENC_FUNCTION(plain)
2113
{
2214
#include "enc_head.c"
23-
#if BASE64_WORDSIZE == 32
24-
enc_loop_generic_32(&s, &slen, &o, &olen);
25-
#elif BASE64_WORDSIZE == 64
2615
enc_loop_generic_64(&s, &slen, &o, &olen);
27-
#endif
2816
#include "enc_tail.c"
2917
}
3018

3119
BASE64_DEC_FUNCTION(plain)
3220
{
3321
#include "dec_head.c"
34-
#if BASE64_WORDSIZE >= 32
35-
dec_loop_generic_32(&s, &slen, &o, &olen);
36-
#endif
3722
#include "dec_tail.c"
3823
}

jsrc/a.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,11 +89,7 @@ F1(jtbdot){A b,h=0;I j=0,n,*v;
8989
/* 2 - box list of results corresp. to arguments */
9090
/* unused entries are set to 0 */
9191

92-
#if SY_64
9392
#define HIC(x,y) ((UI)x+10495464745870458733U*(UI)y)
94-
#else
95-
#define HIC(x,y) ((UI)x+2838338383U*(UI)y)
96-
#endif
9793

9894
static A jtmemoget(J jt,I x,I y,A self){A h,*hv,q;I*jv,k,m,*v;
9995
h=FAV(self)->fgh[2]; hv=AAV(h);

jsrc/am.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,8 @@ static A jtmerge1(J jt,A w,A ind){A z;B*b;C*wc,*zc;D*wd,*zd;I c,it,j,k,m,r,*s,t,
3939
switch(MCASE(CTTZ(it),k)){
4040
case MCASE(B01X,sizeof(C)): DO(c, *zc++=wc[i+c*(I)*b++];); break;
4141
case MCASE(B01X,sizeof(I)): DO(c, *zi++=wi[i+c*(I)*b++];); break;
42-
#if !SY_64
43-
case MCASE(B01X,sizeof(D)): DO(c, *zd++=wd[i+c*(I)*b++];); break;
44-
#endif
4542
case MCASE(INTX,sizeof(C)): DO(c, MINDEX; *zc++=wc[i+c*j];); break;
4643
case MCASE(INTX,sizeof(I)): DO(c, MINDEX; *zi++=wi[i+c*j];); break;
47-
#if !SY_64
48-
case MCASE(INTX,sizeof(D)): DO(c, MINDEX; *zd++=wd[i+c*j];); break;
49-
#endif
5044
default: if(it&B01)DO(c, MC(zc,wc+k*(i+c*(I)*b++),k); zc+=k;)
5145
else DO(c, MINDEX; MC(zc,wc+k*(i+c*j ),k); zc+=k;); break;
5246
}

jsrc/andjnative.c

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -151,13 +151,9 @@ static int javaWd(JNIEnv *env, jclass jcls, int type, A w, A *pz, const char*loc
151151
pinta[3*i+2] = -1;
152152
}
153153
jintArray intb= (*env)->NewIntArray(env, AN(*w1));
154-
#if SY_64
155154
jint *pintb = (*env)->GetIntArrayElements(env, intb, 0);
156155
for (j=0; j<AN(*w1); j++) pintb[j]=(jint)*(AV(*w1)+j);
157156
(*env)->ReleaseIntArrayElements(env, intb, pintb, 0);
158-
#else
159-
(*env)->SetIntArrayRegion(env, intb, 0, AN(*w1), (jint*)AV(*w1));
160-
#endif
161157
(*env)->SetObjectArrayElement(env, inarr, i, intb);
162158
(*env)->DeleteLocalRef(env,intb);
163159
}
@@ -202,13 +198,9 @@ static int javaWd(JNIEnv *env, jclass jcls, int type, A w, A *pz, const char*loc
202198
} else {
203199
*pz=jega(INT,len,2,ishape);
204200
}
205-
#if SY_64
206201
jint *parray = (*env)->GetIntArrayElements(env, array, 0);
207202
for (j=0; j<len; j++) *(AV(*pz)+j)=parray[j];
208203
(*env)->ReleaseIntArrayElements(env, array, parray, 0);
209-
#else
210-
(*env)->GetIntArrayRegion(env, array, 0, len, (jint*)AV(*pz));
211-
#endif
212204
} else {
213205
LOGD("result not string or integers");
214206
rc=3;

jsrc/ao.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,11 +87,7 @@ static DF1(jtobqfslash){A y,z;B b=0,p;C er,id,*wv;I c,d,k,m,m1,mn,n,n1,r,*s,wt;
8787
} /* f//.y for atomic f */
8888

8989

90-
#if SY_64
9190
#define TYMESF(x) {LD t=*u--*(LD)*v++; x=(I)t; BOV(t<IMIN||IMAX<t);}
92-
#else
93-
#define TYMESF(x) {D t=*u--*( D)*v++; x=(I)t; BOV(t<IMIN||IMAX<t);}
94-
#endif
9591
#define ACCUMF {B p;I y; TYMESF(y); p=0>x; x+=y; BOV(p==0>y&&p!=0>x);}
9692

9793
#define PMCASE(t,c,d) (65536*(c)+256*(d)+(t))

jsrc/ar.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,7 @@ static DF1(jtreduce);
1515
#define PARITY2 u=(B*)&s; b=0; b^=*u++; b^=*u++;
1616
#define PARITY4 u=(B*)&s; b=0; b^=*u++; b^=*u++; b^=*u++; b^=*u++;
1717
#define PARITY8 u=(B*)&s; b=0; b^=*u++; b^=*u++; b^=*u++; b^=*u++; b^=*u++; b^=*u++; b^=*u++; b^=*u++;
18-
19-
#if SY_64
2018
#define PARITYW PARITY8
21-
#else
22-
#define PARITYW PARITY4
23-
#endif
2419

2520
#if SY_ALIGN
2621
#define VDONE(T,PAR) \

jsrc/ca.c

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,8 @@ static X jtxmodpow(J jt,A a,A w,A h){A ox,z;
3636
}
3737

3838
#define DMOD 46340 /* <. %: _1+2^31 */
39-
40-
#if SY_64
4139
#define XMOD 3037000499 /* <. %: _1+2^63 */
42-
#else
43-
#define XMOD 94906265 /* <. %: _1+2^53 */
4440
static I dmodpow(D x,I n,D m){D z=1; while(n){if(1&n)z=fmod(z*x,m); x=fmod(x*x,m); n>>=1;} R(I)z;}
45-
#endif
4641

4742
static I imodpow(I x,I n,I m){I z=1; while(n){if(1&n)z=(z*x)%m; x=(x*x)%m; n>>=1;} R z;}
4843

@@ -62,11 +57,7 @@ static DF2(jtmodpow2){A h;B b,c;I at,m,n,wt,x,z;
6257
if(XMOD<m||XMOD<-m||m==IMIN||x==IMIN)R cvt(INT,xmodpow(a,w,h));
6358
if(b=0>m)m=-m;
6459
if(c=0>x)x=-x; x=x%m; if(c)x=m-x;
65-
#if SY_64
6660
z=imodpow(x,n,m);
67-
#else
68-
z=m>DMOD?dmodpow((D)x,n,(D)m):imodpow(x,n,m);
69-
#endif
7061
R sc(b?z-m:z);
7162
} /* a m&|@^ w ; m guaranteed to be INT or XNUM */
7263

jsrc/cc.c

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -543,11 +543,7 @@ static A jtgetnewpd(J jt, UC* pd, A pd0){A new;
543543
}
544544

545545
// copy n atoms of type wt to type zt
546-
#if SY_64
547546
void copyTT(void *zv, void *wv, I n, I zt, I wt){
548-
#else
549-
void jtcopyTT(J jt, void *zv, void *wv, I n, I zt, I wt){
550-
#endif
551547
if(TYPESEQ(zt,wt))MC(zv,wv,n<<bplg(zt));
552548
else if(zt&INT){I *targ=zv; B *src=wv; DQ(n, *targ++ = *src++;)} // B01-> int promotion
553549
else {D *targ=zv; I *src=wv; DQ(n, *targ++ = (D)*src++;)}
@@ -759,13 +755,7 @@ DF2(jtcut2){F2PREFIP;PROLOG(0025);A fs,z,zz;I neg,pfx;C id,*v1,*wv,*zc;I cger[12
759755
VARPS adocv; varps(adocv,fs,wt,0); // qualify the operation, returning action routine and conversion info
760756
if(adocv.f){C*z0=0,*zc;I t,zk,zt; // if the operation is a primitive that we can apply / to... z0 will hold a neutral if we have to calculate one
761757
zt=rtype(adocv.cv);
762-
#if SY_64
763758
GA(zz,zt,m*wcn,r,AS(w)); AS(zz)[0]=m;
764-
#else
765-
// plusinsI writes past the end of its result area if d==1 and there is overflow (normally that would be OK and would be converted to D inplace). Here it overruns the buffer,
766-
// so we allocate one extra word just in case
767-
GA(zz,zt,m*wcn+1,r,AS(w)); AS(zz)[0]=m; AN(zz)=m*wcn;
768-
#endif
769759
if(!AN(zz))R zz; // don't run function on empty arg
770760
I atomsize=bpnoun(zt);
771761
zc=CAV(zz); zk=wcn*atomsize;

0 commit comments

Comments
 (0)