Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(90)

Side by Side Diff: src/ppc/macro-assembler-ppc.cc

Issue 1517993003: [heap] Black is encoded with 11, grey with 10. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/mips64/macro-assembler-mips64.cc ('k') | src/x64/macro-assembler-x64.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <assert.h> // For assert 5 #include <assert.h> // For assert
6 #include <limits.h> // For LONG_MIN, LONG_MAX. 6 #include <limits.h> // For LONG_MIN, LONG_MAX.
7 7
8 #if V8_TARGET_ARCH_PPC 8 #if V8_TARGET_ARCH_PPC
9 9
10 #include "src/base/bits.h" 10 #include "src/base/bits.h"
(...skipping 3156 matching lines...) Expand 10 before | Expand all | Expand 10 after
3167 bne(condition_met, cr0); 3167 bne(condition_met, cr0);
3168 } 3168 }
3169 if (cc == eq) { 3169 if (cc == eq) {
3170 beq(condition_met, cr0); 3170 beq(condition_met, cr0);
3171 } 3171 }
3172 } 3172 }
3173 3173
3174 3174
3175 void MacroAssembler::JumpIfBlack(Register object, Register scratch0, 3175 void MacroAssembler::JumpIfBlack(Register object, Register scratch0,
3176 Register scratch1, Label* on_black) { 3176 Register scratch1, Label* on_black) {
3177 HasColor(object, scratch0, scratch1, on_black, 1, 0); // kBlackBitPattern. 3177 HasColor(object, scratch0, scratch1, on_black, 1, 1); // kBlackBitPattern.
3178 DCHECK(strcmp(Marking::kBlackBitPattern, "10") == 0); 3178 DCHECK(strcmp(Marking::kBlackBitPattern, "11") == 0);
3179 } 3179 }
3180 3180
3181 3181
3182 void MacroAssembler::HasColor(Register object, Register bitmap_scratch, 3182 void MacroAssembler::HasColor(Register object, Register bitmap_scratch,
3183 Register mask_scratch, Label* has_color, 3183 Register mask_scratch, Label* has_color,
3184 int first_bit, int second_bit) { 3184 int first_bit, int second_bit) {
3185 DCHECK(!AreAliased(object, bitmap_scratch, mask_scratch, no_reg)); 3185 DCHECK(!AreAliased(object, bitmap_scratch, mask_scratch, no_reg));
3186 3186
3187 GetMarkBits(object, bitmap_scratch, mask_scratch); 3187 GetMarkBits(object, bitmap_scratch, mask_scratch);
3188 3188
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
3225 3225
3226 3226
3227 void MacroAssembler::JumpIfWhite(Register value, Register bitmap_scratch, 3227 void MacroAssembler::JumpIfWhite(Register value, Register bitmap_scratch,
3228 Register mask_scratch, Register load_scratch, 3228 Register mask_scratch, Register load_scratch,
3229 Label* value_is_white) { 3229 Label* value_is_white) {
3230 DCHECK(!AreAliased(value, bitmap_scratch, mask_scratch, ip)); 3230 DCHECK(!AreAliased(value, bitmap_scratch, mask_scratch, ip));
3231 GetMarkBits(value, bitmap_scratch, mask_scratch); 3231 GetMarkBits(value, bitmap_scratch, mask_scratch);
3232 3232
3233 // If the value is black or grey we don't need to do anything. 3233 // If the value is black or grey we don't need to do anything.
3234 DCHECK(strcmp(Marking::kWhiteBitPattern, "00") == 0); 3234 DCHECK(strcmp(Marking::kWhiteBitPattern, "00") == 0);
3235 DCHECK(strcmp(Marking::kBlackBitPattern, "10") == 0); 3235 DCHECK(strcmp(Marking::kBlackBitPattern, "11") == 0);
3236 DCHECK(strcmp(Marking::kGreyBitPattern, "11") == 0); 3236 DCHECK(strcmp(Marking::kGreyBitPattern, "10") == 0);
3237 DCHECK(strcmp(Marking::kImpossibleBitPattern, "01") == 0); 3237 DCHECK(strcmp(Marking::kImpossibleBitPattern, "01") == 0);
3238 3238
3239 // Since both black and grey have a 1 in the first position and white does 3239 // Since both black and grey have a 1 in the first position and white does
3240 // not have a 1 there we only need to check one bit. 3240 // not have a 1 there we only need to check one bit.
3241 lwz(load_scratch, MemOperand(bitmap_scratch, MemoryChunk::kHeaderSize)); 3241 lwz(load_scratch, MemOperand(bitmap_scratch, MemoryChunk::kHeaderSize));
3242 and_(r0, mask_scratch, load_scratch, SetRC); 3242 and_(r0, mask_scratch, load_scratch, SetRC);
3243 beq(value_is_white, cr0); 3243 beq(value_is_white, cr0);
3244 } 3244 }
3245 3245
3246 3246
(...skipping 1051 matching lines...) Expand 10 before | Expand all | Expand 10 after
4298 } 4298 }
4299 if (mag.shift > 0) srawi(result, result, mag.shift); 4299 if (mag.shift > 0) srawi(result, result, mag.shift);
4300 ExtractBit(r0, dividend, 31); 4300 ExtractBit(r0, dividend, 31);
4301 add(result, result, r0); 4301 add(result, result, r0);
4302 } 4302 }
4303 4303
4304 } // namespace internal 4304 } // namespace internal
4305 } // namespace v8 4305 } // namespace v8
4306 4306
4307 #endif // V8_TARGET_ARCH_PPC 4307 #endif // V8_TARGET_ARCH_PPC
OLDNEW
« no previous file with comments | « src/mips64/macro-assembler-mips64.cc ('k') | src/x64/macro-assembler-x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698