Lines Matching refs:__
58 #define __ codegen->GetAssembler()-> macro
73 __ Move(V0, trg_reg); in MoveFromReturnRegister()
79 __ MovS(F0, trg_reg); in MoveFromReturnRegister()
81 __ MovD(F0, trg_reg); in MoveFromReturnRegister()
107 __ Bind(GetEntryLabel()); in EmitNativeCode()
130 __ B(GetExitLabel()); in EmitNativeCode()
142 #undef __
150 #define __ assembler-> macro
167 __ Mfc1(out_lo, in); in MoveFPToInt()
168 __ MoveFromFpuHigh(out_hi, in); in MoveFPToInt()
172 __ Mfc1(out, in); in MoveFPToInt()
209 __ Mtc1(in_lo, out); in MoveIntToFP()
210 __ MoveToFpuHigh(in_hi, out); in MoveIntToFP()
214 __ Mtc1(in, out); in MoveIntToFP()
262 __ Wsbh(out, in); in GenReverse()
263 __ Seh(out, out); in GenReverse()
265 __ Sll(TMP, in, 24); in GenReverse()
266 __ Sra(TMP, TMP, 16); in GenReverse()
267 __ Sll(out, in, 16); in GenReverse()
268 __ Srl(out, out, 24); in GenReverse()
269 __ Or(out, out, TMP); in GenReverse()
276 __ Rotr(out, in, 16); in GenReverse()
277 __ Wsbh(out, out); in GenReverse()
281 __ Sll(TMP, in, 16); in GenReverse()
282 __ Srl(out, in, 16); in GenReverse()
283 __ Or(out, out, TMP); in GenReverse()
285 __ LoadConst32(AT, 0x00FF00FF); in GenReverse()
286 __ And(TMP, out, AT); in GenReverse()
287 __ Sll(TMP, TMP, 8); in GenReverse()
288 __ Srl(out, out, 8); in GenReverse()
289 __ And(out, out, AT); in GenReverse()
290 __ Or(out, out, TMP); in GenReverse()
294 __ Bitswap(out, out); in GenReverse()
296 __ LoadConst32(AT, 0x0F0F0F0F); in GenReverse()
297 __ And(TMP, out, AT); in GenReverse()
298 __ Sll(TMP, TMP, 4); in GenReverse()
299 __ Srl(out, out, 4); in GenReverse()
300 __ And(out, out, AT); in GenReverse()
301 __ Or(out, TMP, out); in GenReverse()
302 __ LoadConst32(AT, 0x33333333); in GenReverse()
303 __ And(TMP, out, AT); in GenReverse()
304 __ Sll(TMP, TMP, 2); in GenReverse()
305 __ Srl(out, out, 2); in GenReverse()
306 __ And(out, out, AT); in GenReverse()
307 __ Or(out, TMP, out); in GenReverse()
308 __ LoadConst32(AT, 0x55555555); in GenReverse()
309 __ And(TMP, out, AT); in GenReverse()
310 __ Sll(TMP, TMP, 1); in GenReverse()
311 __ Srl(out, out, 1); in GenReverse()
312 __ And(out, out, AT); in GenReverse()
313 __ Or(out, TMP, out); in GenReverse()
323 __ Rotr(AT, in_hi, 16); in GenReverse()
324 __ Rotr(TMP, in_lo, 16); in GenReverse()
325 __ Wsbh(out_lo, AT); in GenReverse()
326 __ Wsbh(out_hi, TMP); in GenReverse()
333 __ Sll(TMP, in_lo, 16); in GenReverse()
334 __ Srl(AT, in_lo, 16); in GenReverse()
335 __ Or(TMP, TMP, AT); // Hold in TMP until it's safe in GenReverse()
338 __ Sll(AT, in_hi, 16); in GenReverse()
339 __ Srl(out_lo, in_hi, 16); // Here we are finally done reading in GenReverse()
342 __ Or(out_lo, out_lo, AT); in GenReverse()
344 __ LoadConst32(AT, 0x00FF00FF); in GenReverse()
345 __ And(out_hi, TMP, AT); in GenReverse()
346 __ Sll(out_hi, out_hi, 8); in GenReverse()
347 __ Srl(TMP, TMP, 8); in GenReverse()
348 __ And(TMP, TMP, AT); in GenReverse()
349 __ Or(out_hi, out_hi, TMP); in GenReverse()
351 __ And(TMP, out_lo, AT); // AT already holds the correct mask value in GenReverse()
352 __ Sll(TMP, TMP, 8); in GenReverse()
353 __ Srl(out_lo, out_lo, 8); in GenReverse()
354 __ And(out_lo, out_lo, AT); in GenReverse()
355 __ Or(out_lo, out_lo, TMP); in GenReverse()
359 __ Bitswap(out_hi, out_hi); in GenReverse()
360 __ Bitswap(out_lo, out_lo); in GenReverse()
362 __ LoadConst32(AT, 0x0F0F0F0F); in GenReverse()
363 __ And(TMP, out_hi, AT); in GenReverse()
364 __ Sll(TMP, TMP, 4); in GenReverse()
365 __ Srl(out_hi, out_hi, 4); in GenReverse()
366 __ And(out_hi, out_hi, AT); in GenReverse()
367 __ Or(out_hi, TMP, out_hi); in GenReverse()
368 __ And(TMP, out_lo, AT); in GenReverse()
369 __ Sll(TMP, TMP, 4); in GenReverse()
370 __ Srl(out_lo, out_lo, 4); in GenReverse()
371 __ And(out_lo, out_lo, AT); in GenReverse()
372 __ Or(out_lo, TMP, out_lo); in GenReverse()
373 __ LoadConst32(AT, 0x33333333); in GenReverse()
374 __ And(TMP, out_hi, AT); in GenReverse()
375 __ Sll(TMP, TMP, 2); in GenReverse()
376 __ Srl(out_hi, out_hi, 2); in GenReverse()
377 __ And(out_hi, out_hi, AT); in GenReverse()
378 __ Or(out_hi, TMP, out_hi); in GenReverse()
379 __ And(TMP, out_lo, AT); in GenReverse()
380 __ Sll(TMP, TMP, 2); in GenReverse()
381 __ Srl(out_lo, out_lo, 2); in GenReverse()
382 __ And(out_lo, out_lo, AT); in GenReverse()
383 __ Or(out_lo, TMP, out_lo); in GenReverse()
384 __ LoadConst32(AT, 0x55555555); in GenReverse()
385 __ And(TMP, out_hi, AT); in GenReverse()
386 __ Sll(TMP, TMP, 1); in GenReverse()
387 __ Srl(out_hi, out_hi, 1); in GenReverse()
388 __ And(out_hi, out_hi, AT); in GenReverse()
389 __ Or(out_hi, TMP, out_hi); in GenReverse()
390 __ And(TMP, out_lo, AT); in GenReverse()
391 __ Sll(TMP, TMP, 1); in GenReverse()
392 __ Srl(out_lo, out_lo, 1); in GenReverse()
393 __ And(out_lo, out_lo, AT); in GenReverse()
394 __ Or(out_lo, TMP, out_lo); in GenReverse()
452 __ ClzR6(AT, in_hi); in GenNumberOfLeadingZeroes()
453 __ ClzR6(TMP, in_lo); in GenNumberOfLeadingZeroes()
454 __ Seleqz(TMP, TMP, in_hi); in GenNumberOfLeadingZeroes()
456 __ ClzR2(AT, in_hi); in GenNumberOfLeadingZeroes()
457 __ ClzR2(TMP, in_lo); in GenNumberOfLeadingZeroes()
458 __ Movn(TMP, ZERO, in_hi); in GenNumberOfLeadingZeroes()
460 __ Addu(out, AT, TMP); in GenNumberOfLeadingZeroes()
465 __ ClzR6(out, in); in GenNumberOfLeadingZeroes()
467 __ ClzR2(out, in); in GenNumberOfLeadingZeroes()
507 __ Seleqz(out, in_hi, in_lo); in GenNumberOfTrailingZeroes()
508 __ Selnez(TMP, in_lo, in_lo); in GenNumberOfTrailingZeroes()
509 __ Or(out, out, TMP); in GenNumberOfTrailingZeroes()
511 __ Movz(out, in_hi, in_lo); in GenNumberOfTrailingZeroes()
512 __ Movn(out, in_lo, in_lo); in GenNumberOfTrailingZeroes()
528 __ Rotr(out, in, 16); in GenNumberOfTrailingZeroes()
529 __ Wsbh(out, out); in GenNumberOfTrailingZeroes()
530 __ Bitswap(out, out); in GenNumberOfTrailingZeroes()
531 __ ClzR6(out, out); in GenNumberOfTrailingZeroes()
535 __ Addiu(TMP, in, -1); in GenNumberOfTrailingZeroes()
536 __ Xor(out, TMP, in); in GenNumberOfTrailingZeroes()
537 __ And(out, out, TMP); in GenNumberOfTrailingZeroes()
539 __ ClzR2(out, out); in GenNumberOfTrailingZeroes()
542 __ LoadConst32(TMP, 32); in GenNumberOfTrailingZeroes()
543 __ Subu(out, TMP, out); in GenNumberOfTrailingZeroes()
549 __ LoadConst32(TMP, 32); in GenNumberOfTrailingZeroes()
551 __ Seleqz(TMP, TMP, in_lo); in GenNumberOfTrailingZeroes()
553 __ Movn(TMP, ZERO, in_lo); in GenNumberOfTrailingZeroes()
555 __ Addu(out, out, TMP); in GenNumberOfTrailingZeroes()
644 __ Srl(TMP, in, 1); in GenBitCount()
645 __ LoadConst32(AT, 0x55555555); in GenBitCount()
646 __ And(TMP, TMP, AT); in GenBitCount()
647 __ Subu(TMP, in, TMP); in GenBitCount()
648 __ LoadConst32(AT, 0x33333333); in GenBitCount()
649 __ And(out, TMP, AT); in GenBitCount()
650 __ Srl(TMP, TMP, 2); in GenBitCount()
651 __ And(TMP, TMP, AT); in GenBitCount()
652 __ Addu(TMP, out, TMP); in GenBitCount()
653 __ Srl(out, TMP, 4); in GenBitCount()
654 __ Addu(out, out, TMP); in GenBitCount()
655 __ LoadConst32(AT, 0x0F0F0F0F); in GenBitCount()
656 __ And(out, out, AT); in GenBitCount()
657 __ LoadConst32(TMP, 0x01010101); in GenBitCount()
659 __ MulR6(out, out, TMP); in GenBitCount()
661 __ MulR2(out, out, TMP); in GenBitCount()
663 __ Srl(out, out, 24); in GenBitCount()
673 __ Srl(tmp_lo, in_lo, 1); in GenBitCount()
674 __ Srl(tmp_hi, in_hi, 1); in GenBitCount()
676 __ LoadConst32(AT, 0x55555555); in GenBitCount()
678 __ And(tmp_lo, tmp_lo, AT); in GenBitCount()
679 __ Subu(tmp_lo, in_lo, tmp_lo); in GenBitCount()
681 __ And(tmp_hi, tmp_hi, AT); in GenBitCount()
682 __ Subu(tmp_hi, in_hi, tmp_hi); in GenBitCount()
684 __ LoadConst32(AT, 0x33333333); in GenBitCount()
686 __ And(out_lo, tmp_lo, AT); in GenBitCount()
687 __ Srl(tmp_lo, tmp_lo, 2); in GenBitCount()
688 __ And(tmp_lo, tmp_lo, AT); in GenBitCount()
689 __ Addu(tmp_lo, out_lo, tmp_lo); in GenBitCount()
691 __ And(out_hi, tmp_hi, AT); in GenBitCount()
692 __ Srl(tmp_hi, tmp_hi, 2); in GenBitCount()
693 __ And(tmp_hi, tmp_hi, AT); in GenBitCount()
694 __ Addu(tmp_hi, out_hi, tmp_hi); in GenBitCount()
702 __ LoadConst32(AT, 0x0F0F0F0F); in GenBitCount()
704 __ Addu(TMP, tmp_hi, tmp_lo); in GenBitCount()
706 __ Srl(out, TMP, 4); in GenBitCount()
707 __ And(out, out, AT); in GenBitCount()
708 __ And(TMP, TMP, AT); in GenBitCount()
709 __ Addu(out, out, TMP); in GenBitCount()
711 __ LoadConst32(AT, 0x01010101); in GenBitCount()
714 __ MulR6(out, out, AT); in GenBitCount()
716 __ MulR2(out, out, AT); in GenBitCount()
719 __ Srl(out, out, 24); in GenBitCount()
767 __ AbsD(out, in); in MathAbsFP()
769 __ AbsS(out, in); in MathAbsFP()
774 __ MovD(out, in); in MathAbsFP()
776 __ MoveFromFpuHigh(TMP, in); in MathAbsFP()
779 __ Ins(TMP, ZERO, 31, 1); in MathAbsFP()
781 __ Sll(TMP, TMP, 1); in MathAbsFP()
782 __ Srl(TMP, TMP, 1); in MathAbsFP()
784 __ MoveToFpuHigh(TMP, out); in MathAbsFP()
786 __ Mfc1(TMP, in); in MathAbsFP()
789 __ Ins(TMP, ZERO, 31, 1); in MathAbsFP()
791 __ Sll(TMP, TMP, 1); in MathAbsFP()
792 __ Srl(TMP, TMP, 1); in MathAbsFP()
794 __ Mtc1(TMP, out); in MathAbsFP()
827 __ Sra(AT, in_hi, 31); in GenAbsInteger()
829 __ Xor(TMP, in_lo, AT); in GenAbsInteger()
830 __ Xor(out_hi, in_hi, AT); in GenAbsInteger()
832 __ Subu(out_lo, TMP, AT); in GenAbsInteger()
833 __ Sltu(TMP, out_lo, TMP); in GenAbsInteger()
834 __ Addu(out_hi, out_hi, TMP); in GenAbsInteger()
839 __ Sra(AT, in, 31); in GenAbsInteger()
840 __ Xor(out, in, AT); in GenAbsInteger()
841 __ Subu(out, out, AT); in GenAbsInteger()
885 __ CmpUnD(FTMP, a, b); in GenMinMaxFP()
886 __ Bc1eqz(FTMP, &noNaNs); in GenMinMaxFP()
889 __ CmpEqD(ftmp, a, a); in GenMinMaxFP()
891 __ SelD(ftmp, a, b); in GenMinMaxFP()
894 __ MovD(out, ftmp); in GenMinMaxFP()
897 __ B(&done); in GenMinMaxFP()
899 __ Bind(&noNaNs); in GenMinMaxFP()
902 __ MinD(out, a, b); in GenMinMaxFP()
904 __ MaxD(out, a, b); in GenMinMaxFP()
908 __ CmpUnS(FTMP, a, b); in GenMinMaxFP()
909 __ Bc1eqz(FTMP, &noNaNs); in GenMinMaxFP()
912 __ CmpEqS(ftmp, a, a); in GenMinMaxFP()
914 __ SelS(ftmp, a, b); in GenMinMaxFP()
917 __ MovS(out, ftmp); in GenMinMaxFP()
920 __ B(&done); in GenMinMaxFP()
922 __ Bind(&noNaNs); in GenMinMaxFP()
925 __ MinS(out, a, b); in GenMinMaxFP()
927 __ MaxS(out, a, b); in GenMinMaxFP()
931 __ Bind(&done); in GenMinMaxFP()
939 __ CunD(a, b); in GenMinMaxFP()
942 __ CunS(a, b); in GenMinMaxFP()
944 __ Bc1f(&ordered); in GenMinMaxFP()
948 __ CeqD(b, b); in GenMinMaxFP()
950 __ CeqS(b, b); in GenMinMaxFP()
952 __ B(&select); in GenMinMaxFP()
954 __ Bind(&ordered); in GenMinMaxFP()
960 __ CeqD(a, b); in GenMinMaxFP()
962 __ CeqS(a, b); in GenMinMaxFP()
964 __ Bc1f(&compare); in GenMinMaxFP()
968 __ MoveFromFpuHigh(TMP, a); in GenMinMaxFP()
969 __ MoveFromFpuHigh(AT, b); in GenMinMaxFP()
971 __ Mfc1(TMP, a); in GenMinMaxFP()
972 __ Mfc1(AT, b); in GenMinMaxFP()
977 __ Or(TMP, TMP, AT); in GenMinMaxFP()
980 __ And(TMP, TMP, AT); in GenMinMaxFP()
984 __ Mfc1(AT, a); in GenMinMaxFP()
985 __ Mtc1(AT, out); in GenMinMaxFP()
986 __ MoveToFpuHigh(TMP, out); in GenMinMaxFP()
988 __ Mtc1(TMP, out); in GenMinMaxFP()
990 __ B(&done); in GenMinMaxFP()
992 __ Bind(&compare); in GenMinMaxFP()
997 __ ColeD(a, b); in GenMinMaxFP()
1000 __ ColeD(b, a); // b <= a in GenMinMaxFP()
1005 __ ColeS(a, b); in GenMinMaxFP()
1008 __ ColeS(b, a); // b <= a in GenMinMaxFP()
1012 __ Bind(&select); in GenMinMaxFP()
1015 __ MovtD(out, a); in GenMinMaxFP()
1016 __ MovfD(out, b); in GenMinMaxFP()
1018 __ MovtS(out, a); in GenMinMaxFP()
1019 __ MovfS(out, b); in GenMinMaxFP()
1022 __ Bind(&done); in GenMinMaxFP()
1137 __ Move(out_lo, a_lo); in GenMinMax()
1138 __ Move(out_hi, a_hi); in GenMinMax()
1141 __ Slt(TMP, b_hi, a_hi); in GenMinMax()
1142 __ Bne(b_hi, a_hi, &compare_done); in GenMinMax()
1144 __ Sltu(TMP, b_lo, a_lo); in GenMinMax()
1146 __ Bind(&compare_done); in GenMinMax()
1149 __ Seleqz(AT, a_lo, TMP); in GenMinMax()
1150 __ Selnez(out_lo, b_lo, TMP); // Safe even if out_lo == a_lo/b_lo in GenMinMax()
1154 __ Selnez(AT, a_lo, TMP); in GenMinMax()
1155 __ Seleqz(out_lo, b_lo, TMP); // ditto in GenMinMax()
1157 __ Or(out_lo, out_lo, AT); in GenMinMax()
1159 __ Seleqz(AT, a_hi, TMP); in GenMinMax()
1160 __ Selnez(out_hi, b_hi, TMP); // ditto but for out_hi & a_hi/b_hi in GenMinMax()
1162 __ Selnez(AT, a_hi, TMP); in GenMinMax()
1163 __ Seleqz(out_hi, b_hi, TMP); // ditto but for out_hi & a_hi/b_hi in GenMinMax()
1165 __ Or(out_hi, out_hi, AT); in GenMinMax()
1175 __ Move(out, a); in GenMinMax()
1178 __ Slt(AT, b, a); in GenMinMax()
1180 __ Seleqz(TMP, a, AT); in GenMinMax()
1181 __ Selnez(AT, b, AT); in GenMinMax()
1183 __ Selnez(TMP, a, AT); in GenMinMax()
1184 __ Seleqz(AT, b, AT); in GenMinMax()
1186 __ Or(out, TMP, AT); in GenMinMax()
1202 __ Move(out_lo, a_lo); in GenMinMax()
1203 __ Move(out_hi, a_hi); in GenMinMax()
1206 __ Slt(TMP, a_hi, b_hi); in GenMinMax()
1207 __ Bne(a_hi, b_hi, &compare_done); in GenMinMax()
1209 __ Sltu(TMP, a_lo, b_lo); in GenMinMax()
1211 __ Bind(&compare_done); in GenMinMax()
1215 __ Movn(out_hi, a_hi, TMP); in GenMinMax()
1216 __ Movn(out_lo, a_lo, TMP); in GenMinMax()
1219 __ Movz(out_hi, b_hi, TMP); in GenMinMax()
1220 __ Movz(out_lo, b_lo, TMP); in GenMinMax()
1224 __ Movz(out_hi, a_hi, TMP); in GenMinMax()
1225 __ Movz(out_lo, a_lo, TMP); in GenMinMax()
1228 __ Movn(out_hi, b_hi, TMP); in GenMinMax()
1229 __ Movn(out_lo, b_lo, TMP); in GenMinMax()
1241 __ Move(out, a); in GenMinMax()
1244 __ Slt(AT, a, b); in GenMinMax()
1247 __ Movn(out, a, AT); in GenMinMax()
1250 __ Movz(out, b, AT); in GenMinMax()
1254 __ Movz(out, a, AT); in GenMinMax()
1257 __ Movn(out, b, AT); in GenMinMax()
1328 __ SqrtD(out, in); in VisitMathSqrt()
1341 __ Lb(out, adr, 0); in VisitMemoryPeekByte()
1355 __ Lh(out, adr, 0); in VisitMemoryPeekShortNative()
1361 __ Lb(AT, adr, 1); // This byte must be sign-extended. in VisitMemoryPeekShortNative()
1362 __ Lb(out, adr, 0); // This byte can be either sign-extended, or in VisitMemoryPeekShortNative()
1365 __ Ins(out, AT, 8, 24); in VisitMemoryPeekShortNative()
1367 __ Lbu(AT, adr, 0); // This byte must be zero-extended. If it's not in VisitMemoryPeekShortNative()
1370 __ Lb(out, adr, 1); // This byte must be sign-extended. in VisitMemoryPeekShortNative()
1371 __ Sll(out, out, 8); in VisitMemoryPeekShortNative()
1372 __ Or(out, out, AT); in VisitMemoryPeekShortNative()
1387 __ Lw(out, adr, 0); in VisitMemoryPeekIntNative()
1389 __ Lwr(out, adr, 0); in VisitMemoryPeekIntNative()
1390 __ Lwl(out, adr, 3); in VisitMemoryPeekIntNative()
1406 __ Lw(out_lo, adr, 0); in VisitMemoryPeekLongNative()
1407 __ Lw(out_hi, adr, 4); in VisitMemoryPeekLongNative()
1409 __ Lwr(out_lo, adr, 0); in VisitMemoryPeekLongNative()
1410 __ Lwl(out_lo, adr, 3); in VisitMemoryPeekLongNative()
1411 __ Lwr(out_hi, adr, 4); in VisitMemoryPeekLongNative()
1412 __ Lwl(out_hi, adr, 7); in VisitMemoryPeekLongNative()
1434 __ Sb(val, adr, 0); in VisitMemoryPokeByte()
1448 __ Sh(val, adr, 0); in VisitMemoryPokeShortNative()
1453 __ Sb(val, adr, 0); in VisitMemoryPokeShortNative()
1454 __ Srl(AT, val, 8); in VisitMemoryPokeShortNative()
1455 __ Sb(AT, adr, 1); in VisitMemoryPokeShortNative()
1470 __ Sw(val, adr, 0); in VisitMemoryPokeIntNative()
1472 __ Swr(val, adr, 0); in VisitMemoryPokeIntNative()
1473 __ Swl(val, adr, 3); in VisitMemoryPokeIntNative()
1489 __ Sw(val_lo, adr, 0); in VisitMemoryPokeLongNative()
1490 __ Sw(val_hi, adr, 4); in VisitMemoryPokeLongNative()
1492 __ Swr(val_lo, adr, 0); in VisitMemoryPokeLongNative()
1493 __ Swl(val_lo, adr, 3); in VisitMemoryPokeLongNative()
1494 __ Swr(val_hi, adr, 4); in VisitMemoryPokeLongNative()
1495 __ Swl(val_hi, adr, 7); in VisitMemoryPokeLongNative()
1511 __ LoadFromOffset(kLoadWord, in VisitThreadCurrentThread()
1564 __ Addu(TMP, base, offset_lo); in GenUnsafeGet()
1573 __ Lw(trg_lo, TMP, 0); in GenUnsafeGet()
1574 __ Lw(trg_hi, TMP, 4); in GenUnsafeGet()
1576 __ Lwr(trg_lo, TMP, 0); in GenUnsafeGet()
1577 __ Lwl(trg_lo, TMP, 3); in GenUnsafeGet()
1578 __ Lwr(trg_hi, TMP, 4); in GenUnsafeGet()
1579 __ Lwl(trg_hi, TMP, 7); in GenUnsafeGet()
1587 __ Lw(trg, TMP, 0); in GenUnsafeGet()
1589 __ Lwr(trg, TMP, 0); in GenUnsafeGet()
1590 __ Lwl(trg, TMP, 3); in GenUnsafeGet()
1593 __ Sync(0); in GenUnsafeGet()
1612 __ Sync(0); in GenUnsafeGet()
1616 __ Lw(trg, TMP, 0); in GenUnsafeGet()
1618 __ Lwr(trg, TMP, 0); in GenUnsafeGet()
1619 __ Lwl(trg, TMP, 3); in GenUnsafeGet()
1622 __ Sync(0); in GenUnsafeGet()
1633 __ Lw(trg, TMP, 0); in GenUnsafeGet()
1635 __ Lwr(trg, TMP, 0); in GenUnsafeGet()
1636 __ Lwl(trg, TMP, 3); in GenUnsafeGet()
1639 __ Sync(0); in GenUnsafeGet()
1641 __ MaybeUnpoisonHeapReference(trg); in GenUnsafeGet()
1726 __ Addu(TMP, base, offset_lo); in GenUnsafePut()
1728 __ Sync(0); in GenUnsafePut()
1734 __ PoisonHeapReference(AT, value); in GenUnsafePut()
1739 __ Sw(value, TMP, 0); in GenUnsafePut()
1741 __ Swr(value, TMP, 0); in GenUnsafePut()
1742 __ Swl(value, TMP, 3); in GenUnsafePut()
1749 __ Sw(value_lo, TMP, 0); in GenUnsafePut()
1750 __ Sw(value_hi, TMP, 4); in GenUnsafePut()
1752 __ Swr(value_lo, TMP, 0); in GenUnsafePut()
1753 __ Swl(value_lo, TMP, 3); in GenUnsafePut()
1754 __ Swr(value_hi, TMP, 4); in GenUnsafePut()
1755 __ Swl(value_hi, TMP, 7); in GenUnsafePut()
1760 __ Sync(0); in GenUnsafePut()
1949 __ Addu(TMP, base, offset_lo); in GenCas()
1952 __ PoisonHeapReference(expected); in GenCas()
1956 __ PoisonHeapReference(value); in GenCas()
1965 __ Sync(0); in GenCas()
1966 __ Bind(&loop_head); in GenCas()
1969 __ LlR6(out, TMP); in GenCas()
1971 __ LlR2(out, TMP); in GenCas()
1977 __ Subu(out, out, expected); // If we didn't get the 'expected' in GenCas()
1978 __ Sltiu(out, out, 1); // value, set 'out' to false, and in GenCas()
1979 __ Beqz(out, &exit_loop); // return. in GenCas()
1980 __ Move(out, value); // Use 'out' for the 'store conditional' instruction. in GenCas()
1991 __ ScR6(out, TMP); in GenCas()
1993 __ ScR2(out, TMP); in GenCas()
1996 __ Beqz(out, &loop_head); // If we couldn't do the read-modify-write in GenCas()
1998 __ Bind(&exit_loop); in GenCas()
1999 __ Sync(0); in GenCas()
2002 __ UnpoisonHeapReference(expected); in GenCas()
2006 __ UnpoisonHeapReference(value); in GenCas()
2061 __ Beqz(argument, slow_path->GetEntryLabel()); in VisitStringCompareTo()
2063 __ Bind(slow_path->GetExitLabel()); in VisitStringCompareTo()
2111 __ LoadConst32(out, 1); in VisitStringEquals()
2117 __ Beqz(arg, &return_false); in VisitStringEquals()
2121 __ Beq(str, arg, &return_true); in VisitStringEquals()
2128 __ Lw(temp1, str, class_offset); in VisitStringEquals()
2129 __ Lw(temp2, arg, class_offset); in VisitStringEquals()
2130 __ Bne(temp1, temp2, &return_false); in VisitStringEquals()
2134 __ Lw(temp1, str, count_offset); in VisitStringEquals()
2135 __ Lw(temp2, arg, count_offset); in VisitStringEquals()
2138 __ Bne(temp1, temp2, &return_false); in VisitStringEquals()
2142 __ Beqz(temp1, &return_true); in VisitStringEquals()
2145 __ Move(TMP, str); in VisitStringEquals()
2146 __ Move(temp3, arg); in VisitStringEquals()
2156 __ Ext(temp2, temp1, 0, 1); in VisitStringEquals()
2158 __ Sll(temp2, temp1, 31); in VisitStringEquals()
2159 __ Srl(temp2, temp2, 31); in VisitStringEquals()
2161 __ Srl(temp1, temp1, 1); // Extract length. in VisitStringEquals()
2162 __ Sllv(temp1, temp1, temp2); // Double the byte count if uncompressed. in VisitStringEquals()
2167 __ Bind(&loop); in VisitStringEquals()
2168 __ Lw(out, TMP, value_offset); in VisitStringEquals()
2169 __ Lw(temp2, temp3, value_offset); in VisitStringEquals()
2170 __ Bne(out, temp2, &return_false); in VisitStringEquals()
2171 __ Addiu(TMP, TMP, 4); in VisitStringEquals()
2172 __ Addiu(temp3, temp3, 4); in VisitStringEquals()
2174 __ Addiu(temp1, temp1, mirror::kUseStringCompression ? -4 : -2); in VisitStringEquals()
2175 __ Bgtz(temp1, &loop); in VisitStringEquals()
2179 __ Bind(&return_true); in VisitStringEquals()
2180 __ LoadConst32(out, 1); in VisitStringEquals()
2181 __ B(&end); in VisitStringEquals()
2184 __ Bind(&return_false); in VisitStringEquals()
2185 __ LoadConst32(out, 0); in VisitStringEquals()
2186 __ Bind(&end); in VisitStringEquals()
2211 __ B(slow_path->GetEntryLabel()); in GenerateStringIndexOf()
2212 __ Bind(slow_path->GetExitLabel()); in GenerateStringIndexOf()
2225 __ LoadConst32(tmp_reg, std::numeric_limits<uint16_t>::max()); in GenerateStringIndexOf()
2228 __ Bltu(tmp_reg, char_reg, slow_path->GetEntryLabel()); in GenerateStringIndexOf()
2234 __ Clear(tmp_reg); in GenerateStringIndexOf()
2239 __ Bind(slow_path->GetExitLabel()); in GenerateStringIndexOf()
2315 __ Beqz(byte_array, slow_path->GetEntryLabel()); in VisitStringNewStringFromBytes()
2317 __ Bind(slow_path->GetExitLabel()); in VisitStringNewStringFromBytes()
2361 __ Beqz(string_to_copy, slow_path->GetEntryLabel()); in VisitStringNewStringFromString()
2363 __ Bind(slow_path->GetExitLabel()); in VisitStringNewStringFromString()
2377 __ ClassD(FTMP, in); in GenIsInfinite()
2379 __ ClassS(FTMP, in); in GenIsInfinite()
2381 __ Mfc1(out, FTMP); in GenIsInfinite()
2382 __ Andi(out, out, kPositiveInfinity | kNegativeInfinity); in GenIsInfinite()
2383 __ Sltu(out, ZERO, out); in GenIsInfinite()
2387 __ MoveFromFpuHigh(TMP, in); in GenIsInfinite()
2388 __ LoadConst32(AT, High32Bits(kPositiveInfinityDouble)); in GenIsInfinite()
2390 __ Mfc1(TMP, in); in GenIsInfinite()
2391 __ LoadConst32(AT, kPositiveInfinityFloat); in GenIsInfinite()
2393 __ Xor(TMP, TMP, AT); in GenIsInfinite()
2395 __ Sll(TMP, TMP, 1); in GenIsInfinite()
2398 __ Mfc1(AT, in); in GenIsInfinite()
2399 __ Or(TMP, TMP, AT); in GenIsInfinite()
2402 __ Sltiu(out, TMP, 1); in GenIsInfinite()
2437 __ ClzR6(TMP, in_hi); in GenHighestOneBit()
2439 __ ClzR2(TMP, in_hi); in GenHighestOneBit()
2441 __ LoadConst32(AT, 0x80000000); in GenHighestOneBit()
2442 __ Srlv(out_hi, AT, TMP); in GenHighestOneBit()
2443 __ And(out_hi, out_hi, in_hi); in GenHighestOneBit()
2445 __ ClzR6(TMP, in_lo); in GenHighestOneBit()
2447 __ ClzR2(TMP, in_lo); in GenHighestOneBit()
2449 __ Srlv(out_lo, AT, TMP); in GenHighestOneBit()
2450 __ And(out_lo, out_lo, in_lo); in GenHighestOneBit()
2452 __ Seleqz(out_lo, out_lo, out_hi); in GenHighestOneBit()
2454 __ Movn(out_lo, ZERO, out_hi); in GenHighestOneBit()
2461 __ ClzR6(TMP, in); in GenHighestOneBit()
2463 __ ClzR2(TMP, in); in GenHighestOneBit()
2465 __ LoadConst32(AT, 0x80000000); in GenHighestOneBit()
2466 __ Srlv(AT, AT, TMP); // Srlv shifts in the range of [0;31] bits (lower 5 bits of arg). in GenHighestOneBit()
2467 __ And(out, AT, in); // So this is required for 0 (=shift by 32). in GenHighestOneBit()
2501 __ Subu(TMP, ZERO, in_lo); in GenLowestOneBit()
2502 __ And(out_lo, TMP, in_lo); in GenLowestOneBit()
2503 __ Subu(TMP, ZERO, in_hi); in GenLowestOneBit()
2504 __ And(out_hi, TMP, in_hi); in GenLowestOneBit()
2506 __ Seleqz(out_hi, out_hi, out_lo); in GenLowestOneBit()
2508 __ Movn(out_hi, ZERO, out_lo); in GenLowestOneBit()
2514 __ Subu(TMP, ZERO, in); in GenLowestOneBit()
2515 __ And(out, TMP, in); in GenLowestOneBit()
2592 __ CmpUnS(FTMP, in, in); in VisitMathRoundFloat()
2594 __ CunS(in, in); in VisitMathRoundFloat()
2598 __ Move(out, ZERO); in VisitMathRoundFloat()
2600 __ Bc1nez(FTMP, &done); in VisitMathRoundFloat()
2602 __ Bc1t(&done); in VisitMathRoundFloat()
2606 __ FloorWS(FTMP, in); in VisitMathRoundFloat()
2607 __ Mfc1(out, FTMP); in VisitMathRoundFloat()
2610 __ LoadConst32(TMP, -1); in VisitMathRoundFloat()
2614 __ LoadConst32(AT, std::numeric_limits<int32_t>::max()); in VisitMathRoundFloat()
2615 __ Bne(AT, out, &finite); in VisitMathRoundFloat()
2617 __ Mtc1(ZERO, FTMP); in VisitMathRoundFloat()
2619 __ CmpLtS(FTMP, in, FTMP); in VisitMathRoundFloat()
2620 __ Mfc1(TMP, FTMP); in VisitMathRoundFloat()
2622 __ ColtS(in, FTMP); in VisitMathRoundFloat()
2625 __ B(&add); in VisitMathRoundFloat()
2627 __ Bind(&finite); in VisitMathRoundFloat()
2630 __ Cvtsw(FTMP, FTMP); // Convert output of floor.w.s back to "float". in VisitMathRoundFloat()
2631 __ LoadConst32(AT, bit_cast<int32_t, float>(0.5f)); in VisitMathRoundFloat()
2632 __ SubS(FTMP, in, FTMP); in VisitMathRoundFloat()
2633 __ Mtc1(AT, half); in VisitMathRoundFloat()
2635 __ CmpLeS(FTMP, half, FTMP); in VisitMathRoundFloat()
2636 __ Mfc1(TMP, FTMP); in VisitMathRoundFloat()
2638 __ ColeS(half, FTMP); in VisitMathRoundFloat()
2641 __ Bind(&add); in VisitMathRoundFloat()
2644 __ Movf(TMP, ZERO); in VisitMathRoundFloat()
2648 __ Subu(out, out, TMP); in VisitMathRoundFloat()
2650 __ Bind(&done); in VisitMathRoundFloat()
2697 __ Beq(srcEnd, srcBegin, &done); // No characters to move. in VisitStringGetCharsNoCheck()
2700 __ Subu(numChrs, srcEnd, srcBegin); in VisitStringGetCharsNoCheck()
2703 __ Addiu(dstPtr, dstObj, data_offset); in VisitStringGetCharsNoCheck()
2704 __ ShiftAndAdd(dstPtr, dstBegin, dstPtr, char_shift); in VisitStringGetCharsNoCheck()
2710 __ LoadFromOffset(kLoadWord, TMP, srcObj, count_offset); in VisitStringGetCharsNoCheck()
2711 __ Sll(TMP, TMP, 31); in VisitStringGetCharsNoCheck()
2714 __ Bnez(TMP, &uncompressed_copy); in VisitStringGetCharsNoCheck()
2717 __ Addu(srcPtr, srcObj, srcBegin); in VisitStringGetCharsNoCheck()
2718 __ Bind(&compressed_loop); in VisitStringGetCharsNoCheck()
2719 __ LoadFromOffset(kLoadUnsignedByte, TMP, srcPtr, value_offset); in VisitStringGetCharsNoCheck()
2720 __ StoreToOffset(kStoreHalfword, TMP, dstPtr, 0); in VisitStringGetCharsNoCheck()
2721 __ Addiu(numChrs, numChrs, -1); in VisitStringGetCharsNoCheck()
2722 __ Addiu(srcPtr, srcPtr, 1); in VisitStringGetCharsNoCheck()
2723 __ Addiu(dstPtr, dstPtr, 2); in VisitStringGetCharsNoCheck()
2724 __ Bnez(numChrs, &compressed_loop); in VisitStringGetCharsNoCheck()
2726 __ B(&done); in VisitStringGetCharsNoCheck()
2727 __ Bind(&uncompressed_copy); in VisitStringGetCharsNoCheck()
2731 __ Addiu(srcPtr, srcObj, value_offset); in VisitStringGetCharsNoCheck()
2732 __ ShiftAndAdd(srcPtr, srcBegin, srcPtr, char_shift); in VisitStringGetCharsNoCheck()
2734 __ Bind(&loop); in VisitStringGetCharsNoCheck()
2735 __ Lh(AT, srcPtr, 0); in VisitStringGetCharsNoCheck()
2736 __ Addiu(numChrs, numChrs, -1); in VisitStringGetCharsNoCheck()
2737 __ Addiu(srcPtr, srcPtr, char_size); in VisitStringGetCharsNoCheck()
2738 __ Sh(AT, dstPtr, 0); in VisitStringGetCharsNoCheck()
2739 __ Addiu(dstPtr, dstPtr, char_size); in VisitStringGetCharsNoCheck()
2740 __ Bnez(numChrs, &loop); in VisitStringGetCharsNoCheck()
2742 __ Bind(&done); in VisitStringGetCharsNoCheck()
2992 __ Slti(TMP, length_input_minus_pos, length_constant); in EnoughItems()
2993 __ Bnez(TMP, slow_path->GetEntryLabel()); in EnoughItems()
2995 __ LoadConst32(TMP, length_constant); in EnoughItems()
2996 __ Blt(length_input_minus_pos, TMP, slow_path->GetEntryLabel()); in EnoughItems()
2999 __ Blt(length_input_minus_pos, length.AsRegister<Register>(), slow_path->GetEntryLabel()); in EnoughItems()
3018 __ LoadFromOffset(kLoadWord, AT, input, length_offset); in CheckPosition()
3023 __ LoadFromOffset(kLoadWord, AT, input, length_offset); in CheckPosition()
3025 __ Addiu32(AT, AT, -pos_const, TMP); in CheckPosition()
3026 __ Bltz(AT, slow_path->GetEntryLabel()); in CheckPosition()
3034 __ Bnez(pos_reg, slow_path->GetEntryLabel()); in CheckPosition()
3038 __ Bltz(pos_reg, slow_path->GetEntryLabel()); in CheckPosition()
3041 __ LoadFromOffset(kLoadWord, AT, input, length_offset); in CheckPosition()
3042 __ Subu(AT, AT, pos_reg); in CheckPosition()
3043 __ Bltz(AT, slow_path->GetEntryLabel()); in CheckPosition()
3070 __ Beq(src, dest, slow_path->GetEntryLabel()); in VisitSystemArrayCopyChar()
3073 __ Beqz(src, slow_path->GetEntryLabel()); in VisitSystemArrayCopyChar()
3076 __ Beqz(dest, slow_path->GetEntryLabel()); in VisitSystemArrayCopyChar()
3080 __ LoadConst32(count, length.GetConstant()->AsIntConstant()->GetValue()); in VisitSystemArrayCopyChar()
3084 __ Bltz(length.AsRegister<Register>(), slow_path->GetEntryLabel()); in VisitSystemArrayCopyChar()
3086 __ Move(count, length.AsRegister<Register>()); in VisitSystemArrayCopyChar()
3096 __ Beqz(count, slow_path->GetExitLabel()); in VisitSystemArrayCopyChar()
3111 __ Addiu32(src_base, src, data_offset + char_size * src_pos_const, TMP); in VisitSystemArrayCopyChar()
3113 __ Addiu32(src_base, src, data_offset, TMP); in VisitSystemArrayCopyChar()
3114 __ ShiftAndAdd(src_base, src_pos.AsRegister<Register>(), src_base, char_shift); in VisitSystemArrayCopyChar()
3119 __ Addiu32(dest_base, dest, data_offset + char_size * dest_pos_const, TMP); in VisitSystemArrayCopyChar()
3121 __ Addiu32(dest_base, dest, data_offset, TMP); in VisitSystemArrayCopyChar()
3122 __ ShiftAndAdd(dest_base, dest_pos.AsRegister<Register>(), dest_base, char_shift); in VisitSystemArrayCopyChar()
3125 __ Bind(&loop); in VisitSystemArrayCopyChar()
3126 __ Lh(TMP, src_base, 0); in VisitSystemArrayCopyChar()
3127 __ Addiu(src_base, src_base, char_size); in VisitSystemArrayCopyChar()
3128 __ Addiu(count, count, -1); in VisitSystemArrayCopyChar()
3129 __ Sh(TMP, dest_base, 0); in VisitSystemArrayCopyChar()
3130 __ Addiu(dest_base, dest_base, char_size); in VisitSystemArrayCopyChar()
3131 __ Bnez(count, &loop); in VisitSystemArrayCopyChar()
3133 __ Bind(slow_path->GetExitLabel()); in VisitSystemArrayCopyChar()
3169 #undef __