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

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

Issue 2800813002: PPC/S390: Fix to use correct instr to test bitmask (Closed)
Patch Set: cr0 fix for ppc Created 3 years, 8 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/builtins/s390/builtins-s390.cc ('k') | src/s390/macro-assembler-s390.cc » ('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 2611 matching lines...) Expand 10 before | Expand all | Expand 10 after
2622 CompareObjectType(object, object, object, JS_BOUND_FUNCTION_TYPE); 2622 CompareObjectType(object, object, object, JS_BOUND_FUNCTION_TYPE);
2623 pop(object); 2623 pop(object);
2624 Check(eq, kOperandIsNotABoundFunction); 2624 Check(eq, kOperandIsNotABoundFunction);
2625 } 2625 }
2626 } 2626 }
2627 2627
2628 void MacroAssembler::AssertGeneratorObject(Register object, Register flags) { 2628 void MacroAssembler::AssertGeneratorObject(Register object, Register flags) {
2629 // `flags` should be an untagged integer. See `SuspendFlags` in src/globals.h 2629 // `flags` should be an untagged integer. See `SuspendFlags` in src/globals.h
2630 if (!emit_debug_code()) return; 2630 if (!emit_debug_code()) return;
2631 TestIfSmi(object, r0); 2631 TestIfSmi(object, r0);
2632 Check(ne, kOperandIsASmiAndNotAGeneratorObject); 2632 Check(ne, kOperandIsASmiAndNotAGeneratorObject, cr0);
2633 2633
2634 // Load map 2634 // Load map
2635 Register map = object; 2635 Register map = object;
2636 push(object); 2636 push(object);
2637 LoadP(map, FieldMemOperand(object, HeapObject::kMapOffset)); 2637 LoadP(map, FieldMemOperand(object, HeapObject::kMapOffset));
2638 2638
2639 Label async, do_check; 2639 Label async, do_check;
2640 And(ip, flags, Operand(static_cast<int>(SuspendFlags::kGeneratorTypeMask))); 2640 TestBitMask(flags, static_cast<int>(SuspendFlags::kGeneratorTypeMask), r0);
2641 cmpi(ip, Operand(static_cast<int>(SuspendFlags::kGeneratorTypeMask))); 2641 bne(&async, cr0);
2642 bne(&async);
2643 2642
2644 // Check if JSGeneratorObject 2643 // Check if JSGeneratorObject
2645 CompareInstanceType(map, object, JS_GENERATOR_OBJECT_TYPE); 2644 CompareInstanceType(map, object, JS_GENERATOR_OBJECT_TYPE);
2646 b(&do_check); 2645 b(&do_check);
2647 2646
2648 bind(&async); 2647 bind(&async);
2649 // Check if JSAsyncGeneratorObject 2648 // Check if JSAsyncGeneratorObject
2650 CompareInstanceType(map, object, JS_ASYNC_GENERATOR_OBJECT_TYPE); 2649 CompareInstanceType(map, object, JS_ASYNC_GENERATOR_OBJECT_TYPE);
2651 2650
2652 bind(&do_check); 2651 bind(&do_check);
(...skipping 1604 matching lines...) Expand 10 before | Expand all | Expand 10 after
4257 } 4256 }
4258 if (mag.shift > 0) srawi(result, result, mag.shift); 4257 if (mag.shift > 0) srawi(result, result, mag.shift);
4259 ExtractBit(r0, dividend, 31); 4258 ExtractBit(r0, dividend, 31);
4260 add(result, result, r0); 4259 add(result, result, r0);
4261 } 4260 }
4262 4261
4263 } // namespace internal 4262 } // namespace internal
4264 } // namespace v8 4263 } // namespace v8
4265 4264
4266 #endif // V8_TARGET_ARCH_PPC 4265 #endif // V8_TARGET_ARCH_PPC
OLDNEW
« no previous file with comments | « src/builtins/s390/builtins-s390.cc ('k') | src/s390/macro-assembler-s390.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698