src/cpu/mips/vm/templateTable_mips_64.cpp

changeset 89
179d203c9b2b
parent 88
02ae7081a1a7
child 104
36f7453a6977
equal deleted inserted replaced
88:02ae7081a1a7 89:179d203c9b2b
1300 1300
1301 __ bind(not_zero); 1301 __ bind(not_zero);
1302 __ mfhi(FSR); 1302 __ mfhi(FSR);
1303 } 1303 }
1304 1304
1305 // the multiplier in SSR||FSR, the multiplicand in stack
1306 // the result in SSR||FSR
1307 // used registers : T2, T3
1308 void TemplateTable::lmul() { 1305 void TemplateTable::lmul() {
1309 transition(ltos, ltos); 1306 transition(ltos, ltos);
1310 Label done; 1307 __ pop_l(T2);
1311 1308 if(UseLoongsonISA){
1312 __ pop_l(T2, T3); 1309 __ gsdmult(FSR, T2, FSR);
1313 #ifdef ASSERT 1310 } else {
1314 { 1311 __ dmult(T2, FSR);
1315 Label L; 1312 __ mflo(FSR);
1316 __ orr(AT, T3, SSR); 1313 }
1317 __ beq(AT, R0, L); 1314 }
1318 __ delayed()->nop();
1319 //FIXME, aoqi
1320 //__ stop("lmul, wrong stack");
1321 __ bind(L);
1322 }
1323 #endif
1324 __ orr(AT, T2, FSR);
1325 __ beq(AT, R0, done);
1326 __ delayed()->nop();
1327
1328 __ dmultu(T2, FSR);
1329 __ daddu(SSR, SSR, T3);
1330 __ nop();
1331 __ mflo(FSR);
1332 __ mfhi(SSR);
1333 __ b(done);
1334 __ delayed()->nop();
1335
1336 __ bind(done);
1337 }
1338 1315
1339 // NOTE: i DONT use the Interpreter::_throw_ArithmeticException_entry 1316 // NOTE: i DONT use the Interpreter::_throw_ArithmeticException_entry
1340 void TemplateTable::ldiv() { 1317 void TemplateTable::ldiv() {
1341 transition(ltos, ltos); 1318 transition(ltos, ltos);
1342 Label normal; 1319 Label normal;

mercurial