l=GetOpSize(l);
cycles=0; interrupted=false;
switch(f) {
+ case 0x21:
+ MAP_IRQ_BEGIN();
+ AddMapCycles(288);
+ WS_START(1);
+ MakeJ0(J,D);
+ AddMapCycles(282);
+ WClear(C);
+ AddMapCycles(898-282-288);
+ WS_END();
+ MAP_IRQ_END();
+ break;
case 0x22:
{
int shift=((-l)&0xFF00)>>8, exp=(-l)&0x1F;
GetMem(HILO(0x44),tmp,dl,0);
DoMap(f,tmp,l);
break;
+ case 0x21:
case 0x30:
case 0x31:
case 0x43:
wordsize=DEF_WORDSIZE;
}
+void cMapMath::WClear(BIGNUM *r, int w)
+{
+ if(!w) w=wordsize;
+ BN_rshift(r,r,w<<6);
+ BN_lshift(r,r,w<<6);
+}
+
bool cMapMath::ModAdd(BIGNUM *r, BIGNUM *a, BIGNUM *b, BIGNUM *d)
{
BN_add(r,a,b);
void MonMul(BIGNUM *o, BIGNUM *a, BIGNUM *b, BIGNUM *c, BIGNUM *d, BIGNUM *j, int w);
void MonStart(int w);
void MonLoop(BIGNUM *o, BIGNUM *a, BIGNUM *b, BIGNUM *c, BIGNUM *d, BIGNUM *j);
+ void WClear(BIGNUM *r, int w=0);
// statefull
void MonMul(BIGNUM *o, BIGNUM *a, BIGNUM *b);
void MonMul(BIGNUM *o, BIGNUM *a, BIGNUM *b, int w);