Home | History | Annotate | Download | only in ppc

Lines Matching full:scratch

299 void MacroAssembler::InNewSpace(Register object, Register scratch,
301 // N.B. scratch may be same register as object
304 and_(scratch, object, r0);
306 cmp(scratch, r0);
381 map, // Used as scratch.
421 // Will clobber 4 registers: object, address, scratch, ip. The
451 value, // Used as scratch.
455 value, // Used as scratch.
488 Register address, Register scratch,
494 JumpIfNotInNewSpace(object, scratch, &ok);
502 LoadP(scratch, MemOperand(ip));
504 StoreP(address, MemOperand(scratch));
505 addi(scratch, scratch, Operand(kPointerSize));
507 StoreP(scratch, MemOperand(ip));
511 and_(r0, scratch, r0, SetRC);
1237 void MacroAssembler::IsObjectJSStringType(Register object, Register scratch,
1241 LoadP(scratch, FieldMemOperand(object, HeapObject::kMapOffset));
1242 lbz(scratch, FieldMemOperand(scratch, Map::kInstanceTypeOffset));
1243 andi(r0, scratch, Operand(kIsNotStringMask));
1248 void MacroAssembler::IsObjectNameType(Register object, Register scratch,
1250 LoadP(scratch, FieldMemOperand(object, HeapObject::kMapOffset));
1251 lbz(scratch, FieldMemOperand(scratch, Map::kInstanceTypeOffset));
1252 cmpi(scratch, Operand(LAST_NAME_TYPE));
1294 Register scratch, Label* miss) {
1297 DCHECK(!holder_reg.is(scratch));
1299 DCHECK(!scratch.is(ip));
1302 LoadP(scratch, MemOperand(fp, StandardFrameConstants::kContextOffset));
1305 cmpi(scratch, Operand::Zero());
1310 LoadP(scratch, ContextMemOperand(scratch, Context::NATIVE_CONTEXT_INDEX));
1318 LoadP(holder_reg, FieldMemOperand(scratch, HeapObject::kMapOffset));
1327 cmp(scratch, ip);
1356 LoadP(scratch, FieldMemOperand(scratch, token_offset));
1358 cmp(scratch, ip);
1368 void MacroAssembler::GetNumberHash(Register t0, Register scratch) {
1369 // First of all we assign the hash seed to scratch.
1370 LoadRoot(scratch, Heap::kHashSeedRootIndex);
1371 SmiUntag(scratch);
1374 xor_(t0, t0, scratch);
1380 notx(scratch, t0);
1382 add(t0, scratch, t0);
1384 srwi(scratch, t0, Operand(12));
1385 xor_(t0, t0, scratch);
1387 slwi(scratch, t0, Operand(2));
1388 add(t0, t0, scratch);
1390 srwi(scratch, t0, Operand(4));
1391 xor_(t0, t0, scratch);
1394 slwi(scratch, t0, Operand(3));
1395 add(t0, t0, scratch);
1396 slwi(scratch, r0, Operand(11));
1397 add(t0, t0, scratch);
1399 srwi(scratch, t0, Operand(16));
1400 xor_(t0, t0, scratch);
1423 // Scratch registers:
1584 Register result_end, Register scratch,
1590 li(scratch, Operand(0x7191));
1599 DCHECK(!AreAliased(object_size, result, scratch, ip));
1600 DCHECK(!AreAliased(result_end, result, scratch, ip));
1613 Register top_address = scratch;
1803 void MacroAssembler::CheckFastElements(Register map, Register scratch,
1809 lbz(scratch, FieldMemOperand(map, Map::kBitField2Offset));
1811 cmpli(scratch, Operand(Map::kMaximumBitField2FastHoleyElementValue));
1816 void MacroAssembler::CheckFastObjectElements(Register map, Register scratch,
1822 lbz(scratch, FieldMemOperand(map, Map::kBitField2Offset));
1823 cmpli(scratch, Operand(Map::kMaximumBitField2FastHoleySmiElementValue));
1825 cmpli(scratch, Operand(Map::kMaximumBitField2FastHoleyElementValue));
1830 void MacroAssembler::CheckFastSmiElements(Register map, Register scratch,
1834 lbz(scratch, FieldMemOperand(map, Map::kBitField2Offset));
1835 cmpli(scratch, Operand(Map::kMaximumBitField2FastHoleySmiElementValue));
1873 Register scratch) {
1875 DCHECK(!dst.is(scratch));
1876 DCHECK(!overflow_dst.is(scratch));
1885 mr(scratch, left); // Preserve left.
1887 xor_(overflow_dst, dst, scratch, xorRC); // Original left.
1888 if (!left_is_right) xor_(scratch, dst, right);
1890 mr(scratch, right); // Preserve right.
1893 if (!left_is_right) xor_(scratch, dst, scratch); // Original right.
1897 if (!left_is_right) xor_(scratch, dst, right);
1899 if (!left_is_right) and_(overflow_dst, scratch, overflow_dst, SetRC);
1906 Register scratch) {
1909 DCHECK(!dst.is(scratch));
1910 DCHECK(!overflow_dst.is(scratch));
1919 Add(dst, left, right, scratch);
1932 Register scratch) {
1934 DCHECK(!dst.is(scratch));
1935 DCHECK(!overflow_dst.is(scratch));
1941 mr(scratch, left); // Preserve left.
1943 xor_(overflow_dst, dst, scratch);
1944 xor_(scratch, scratch, right);
1945 scratch, SetRC);
1947 mr(scratch, right); // Preserve right.
1950 xor_(scratch, left, scratch);
1951 and_(overflow_dst, overflow_dst, scratch, SetRC);
1955 xor_(scratch, left, right);
1956 and_(overflow_dst, scratch, overflow_dst, SetRC);
1961 void MacroAssembler::CompareMap(Register obj, Register scratch, Handle<Map> map,
1963 LoadP(scratch, FieldMemOperand(obj, HeapObject::kMapOffset));
1964 CompareMap(scratch, map, early_success);
1975 void MacroAssembler::CheckMap(Register obj, Register scratch, Handle<Map> map,
1982 CompareMap(obj, scratch, map, &success);
1988 void MacroAssembler::CheckMap(Register obj, Register scratch,
1994 LoadP(scratch, FieldMemOperand(obj, HeapObject::kMapOffset));
1996 cmp(scratch, r0);
2017 Register scratch, CRegister cr) {
2018 mov(scratch, Operand(cell));
2019 LoadP(scratch, FieldMemOperand(scratch, WeakCell::kValueOffset));
2020 cmp(value, scratch, cr);
2052 Register scratch, Label* miss) {
2066 CompareObjectType(result, scratch, scratch, MAP_TYPE);
2120 Register scratch,
2127 scratch,
2134 TestIfInt32(scratch, result, r0);
2146 Register input_high, Register scratch,
2163 scratch,
2171 TestIfInt32(scratch, result, r0);
2190 Register scratch = ip;
2195 scratch,
2203 TestIfInt32(scratch, result, r0);
2470 Register map_in_out, Register scratch, Label* no_map_match) {
2475 LoadP(scratch, NativeContextMemOperand());
2476 LoadP(ip, ContextMemOperand(scratch, Context::ArrayMapIndex(expected_kind)));
2482 ContextMemOperand(scratch, Context::ArrayMapIndex(transitioned_kind)));
2494 Register scratch) {
2500 CheckMap(map, scratch, Heap::kMetaMapRootIndex, &fail, DO_SMI_CHECK);
2510 Register reg, Register scratch, Label* not_power_of_two_or_zero) {
2511 subi(scratch, reg, Operand(1));
2512 cmpi(scratch, Operand::Zero());
2514 and_(r0, scratch, reg, SetRC);
2520 Register scratch,
2523 subi(scratch, reg, Operand(1));
2524 cmpi(scratch, Operand::Zero());
2526 and_(r0, scratch, reg, SetRC);
2661 Register scratch) {
2667 LoadP(scratch, FieldMemOperand(object, HeapObject::kMapOffset));
2668 CompareRoot(scratch, Heap::kAllocationSiteMapRootIndex);
2685 Register scratch,
2687 LoadP(scratch, FieldMemOperand(object, HeapObject::kMapOffset));
2689 cmp(scratch, heap_number_map);
2793 Register scratch) {
2796 DCHECK(!scratch.is(r0));
2802 andi(scratch, src, Operand(kPointerSize - 1));
2804 subfic(scratch, scratch, Operand(kPointerSize * 2));
2805 cmp(length, scratch);
2809 subi(scratch, scratch, Operand(kPointerSize));
2810 mtctr(scratch);
2812 lbz(scratch, MemOperand(src));
2815 stb(scratch, MemOperand(dst));
2827 ShiftRightImm(scratch, length, Operand(kPointerSizeLog2));
2828 cmpi(scratch, Operand::Zero());
2831 mtctr(scratch);
2833 LoadP(scratch, MemOperand(src));
2838 StoreP(scratch, MemOperand(dst));
2842 stb(scratch, MemOperand(dst, 0));
2843 ShiftRightImm(scratch, scratch, Operand(8));
2844 stb(scratch, MemOperand(dst, 1));
2845 ShiftRightImm(scratch, scratch, Operand(8));
2846 stb(scratch, MemOperand(dst, 2));
2847 ShiftRightImm(scratch, scratch, Operand(8));
2848 stb(scratch, MemOperand(dst, 3));
2850 ShiftRightImm(scratch, scratch, Operand(8));
2851 stb(scratch, MemOperand(dst, 4));
2852 ShiftRightImm(scratch, scratch, Operand(8));
2853 stb(scratch, MemOperand(dst, 5));
2854 ShiftRightImm(scratch, scratch, Operand(8));
2855 stb(scratch, MemOperand(dst, 6));
2856 ShiftRightImm(scratch, scratch, Operand(8));
2857 stb(scratch, MemOperand(dst, 7));
2861 stb(scratch, MemOperand(dst, 7));
2862 ShiftRightImm(scratch, scratch, Operand(8));
2863 stb(scratch, MemOperand(dst, 6));
2864 ShiftRightImm(scratch, scratch, Operand(8));
2865 stb(scratch, MemOperand(dst, 5));
2866 ShiftRightImm(scratch, scratch, Operand(8));
2867 stb(scratch, MemOperand(dst, 4));
2868 ShiftRightImm(scratch, scratch, Operand(8));
2870 stb(scratch, MemOperand(dst, 3));
2871 ShiftRightImm(scratch, scratch, Operand(8));
2872 stb(scratch, MemOperand(dst, 2));
2873 ShiftRightImm(scratch, scratch, Operand(8));
2874 stb(scratch, MemOperand(dst, 1));
2875 ShiftRightImm(scratch, scratch, Operand(8));
2876 stb(scratch, MemOperand(dst, 0));
2889 lbz(scratch, MemOperand(src));
2891 stb(scratch, MemOperand(dst));
2939 Register scratch,
2945 andi(scratch, type, Operand(kFlatOneByteStringMask));
2946 cmpi(scratch, Operand(kFlatOneByteStringTag));
3011 Register scratch) {
3020 mr(scratch, sp);
3024 StoreP(scratch, MemOperand(sp, stack_passed_arguments * kPointerSize));
3037 Register scratch) {
3038 PrepareCallCFunction(num_reg_arguments, 0, scratch);
3120 Register scratch) {
3136 // scratch is last cacheline which intersects range.
3140 addi(scratch, address, Operand(size - 1));
3141 ClearRightImm(scratch, scratch, Operand(kCacheLineSizeLog2));
3142 cmpl(scratch, address);
3145 dcbf(r0, scratch);
3147 icbi(r0, scratch);
3185 Register scratch, // scratch may be same register as object
3188 ClearRightImm(scratch, object, Operand(kPageSizeBits));
3189 LoadP(scratch, MemOperand(scratch, MemoryChunk::kFlagsOffset));
3191 And(r0, scratch, Operand(mask), SetRC);
3449 Register scratch) {
3451 !(scratch.is(r0) && ConstantPoolAccessIsInOverflow())) {
3454 addis(scratch, kConstantPoolRegister, Operand::Zero());
3455 lfd(result, MemOperand(scratch, 0));
3476 mov(scratch, Operand(litVal.ival));
3477 mtfprd(result, scratch);
3484 mov(scratch, Operand(litVal.ival));
3485 std(scratch, MemOperand(sp));
3487 LoadIntLiteral(scratch, litVal.ival[0]);
3488 stw(scratch, MemOperand(sp, 0));
3489 LoadIntLiteral(scratch, litVal.ival[1]);
3490 stw(scratch, MemOperand(sp, 4));
3499 Register scratch) {
3508 DCHECK(!src.is(scratch));
3511 extsw(scratch, src);
3512 std(scratch, MemOperand(sp, 0));
3514 srawi(scratch, src, 31);
3515 stw(scratch, MemOperand(sp, Register::kExponentOffset));
3525 Register scratch) {
3534 DCHECK(!src.is(scratch));
3537 clrldi(scratch, src, Operand(32));
3538 std(scratch, MemOperand(sp, 0));
3540 li(scratch, Operand::Zero());
3541 stw(scratch, MemOperand(sp, Register::kExponentOffset));
3579 Register scratch) {
3581 sldi(scratch, src_hi, Operand(32));
3582 rldimi(scratch, src_lo, 0, 32);
3583 mtfprd(dst, scratch);
3598 Register scratch) {
3601 mffprd(scratch, dst);
3602 rldimi(scratch, src, 0, 32);
3603 mtfprd(dst, scratch);
3618 Register scratch) {
3621 mffprd(scratch, dst);
3622 rldimi(scratch, src, 32, 0);
3623 mtfprd(dst, scratch);
3715 Register scratch) {
3719 mov(scratch, Operand(value));
3720 add(dst, src, scratch);
3725 void MacroAssembler::Cmpi(Register src1, const Operand& src2, Register scratch,
3731 mov(scratch, src2);
3732 cmp(src1, scratch, cr);
3737 void MacroAssembler::Cmpli(Register src1, const Operand& src2, Register scratch,
3743 mov(scratch, src2);
3744 cmpl(src1, scratch, cr);
3749 void MacroAssembler::Cmpwi(Register src1, const Operand& src2, Register scratch,
3755 mov(scratch, src2);
3756 cmpw(src1, scratch, cr);
3762 Register scratch, CRegister cr) {
3767 mov(scratch, src2);
3768 cmplw(src1, scratch, cr);
3823 void MacroAssembler::CmpSmiLiteral(Register src1, Smi* smi, Register scratch,
3826 LoadSmiLiteral(scratch, smi);
3827 cmp(src1, scratch, cr);
3829 Cmpi(src1, Operand(smi), scratch, cr);
3834 void MacroAssembler::CmplSmiLiteral(Register src1, Smi* smi, Register scratch,
3837 LoadSmiLiteral(scratch, smi);
3838 cmpl(src1, scratch, cr);
3840 Cmpli(src1, Operand(smi), scratch, cr);
3846 Register scratch) {
3848 LoadSmiLiteral(scratch, smi);
3849 add(dst, src, scratch);
3851 Add(dst, src, reinterpret_cast<intptr_t>(smi), scratch);
3857 Register scratch) {
3859 LoadSmiLiteral(scratch, smi);
3860 sub(dst, src, scratch);
3862 Add(dst, src, -(reinterpret_cast<intptr_t>(smi)), scratch);
3868 Register scratch, RCBit rc) {
3870 LoadSmiLiteral(scratch, smi);
3871 and_(dst, src, scratch, rc);
3880 Register scratch) {
3885 DCHECK(!scratch.is(no_reg));
3886 mov(scratch, Operand(offset));
3888 ldx(dst, MemOperand(mem.ra(), scratch));
3890 lwzx(dst, MemOperand(mem.ra(), scratch));
3897 // Todo: enhance to use scratch if dst is unsuitable
3913 Register scratch) {
3918 DCHECK(!scratch.is(no_reg));
3919 mov(scratch, Operand(offset));
3921 stdx(src, MemOperand(mem.ra(), scratch));
3923 stwx(src, MemOperand(mem.ra(), scratch));
3930 // a suitable scratch is required here
3931 DCHECK(!scratch.is(no_reg));
3932 if (scratch.is(r0)) {
3933 LoadIntLiteral(scratch, offset);
3934 stdx(src, MemOperand(mem.ra(), scratch));
3936 addi(scratch, mem.ra(), Operand((offset & 3) - 4));
3937 std(src, MemOperand(scratch, (offset & ~3) + 4));
3949 Register scratch) {
3953 DCHECK(!scratch.is(no_reg));
3954 mov(scratch, Operand(offset));
3955 lwax(dst, MemOperand(mem.ra(), scratch));
3961 // Todo: enhance to use scratch if dst is unsuitable
3978 Register scratch) {
3983 LoadIntLiteral(scratch, offset);
3984 lwzx(dst, MemOperand(base, scratch));
3994 Register scratch) {
3999 LoadIntLiteral(scratch, offset);
4000 stwx(src, MemOperand(base, scratch));
4008 Register scratch) {
4012 DCHECK(!scratch.is(no_reg));
4013 mov(scratch, Operand(offset));
4014 lhax(dst, MemOperand(mem.ra(), scratch));
4024 Register scratch) {
4029 LoadIntLiteral(scratch, offset);
4030 lhzx(dst, MemOperand(base, scratch));
4040 Register scratch) {
4045 LoadIntLiteral(scratch, offset);
4046 sthx(src, MemOperand(base, scratch));
4056 Register scratch) {
4061 LoadIntLiteral(scratch, offset);
4062 lbzx(dst, MemOperand(base, scratch));
4072 Register scratch) {
4077 LoadIntLiteral(scratch, offset);
4078 stbx(src, MemOperand(base, scratch));
4086 Representation r, Register scratch) {
4089 LoadByte(dst, mem, scratch);
4092 LoadByte(dst, mem, scratch);
4094 LoadHalfWordArith(dst, mem, scratch);
4096 LoadHalfWord(dst, mem, scratch);
4099 LoadWordArith(dst, mem, scratch);
4102 LoadP(dst, mem, scratch);
4108 Representation r, Register scratch) {
4111 scratch);
4113 StoreHalfWord(src, mem, scratch);
4116 StoreWord(src, mem, scratch);
4124 StoreP(src, mem, scratch);
4130 Register scratch) {
4135 mov(scratch, Operand(offset));
4136 lfdx(dst, MemOperand(base, scratch));
4144 Register scratch) {
4149 mov(scratch, Operand(offset));
4150 stfdx(src, MemOperand(base, scratch));
4210 // scratch contained elements pointer.