Commit 79bce3d6 authored by bjaideep's avatar bjaideep Committed by Commit bot

PPC/S390: Fix to use correct instr to test bitmask

R=joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com
BUG=
LOG=N

Review-Url: https://codereview.chromium.org/2800813002
Cr-Commit-Position: refs/heads/master@{#44618}
parent 53475efc
......@@ -672,7 +672,8 @@ void Builtins::Generate_ResumeGeneratorTrampoline(MacroAssembler* masm) {
// Store input value into generator object.
Label async_await, done_store_input;
__ And(r6, r6, Operand(static_cast<int>(SuspendFlags::kAsyncGeneratorAwait)));
__ andi(r6, r6,
Operand(static_cast<int>(SuspendFlags::kAsyncGeneratorAwait)));
__ cmpi(r6, Operand(static_cast<int>(SuspendFlags::kAsyncGeneratorAwait)));
__ beq(&async_await);
......
......@@ -670,7 +670,8 @@ void Builtins::Generate_ResumeGeneratorTrampoline(MacroAssembler* masm) {
// Store input value into generator object.
Label async_await, done_store_input;
__ And(r5, r5, Operand(static_cast<int>(SuspendFlags::kAsyncGeneratorAwait)));
__ AndP(r5, r5,
Operand(static_cast<int>(SuspendFlags::kAsyncGeneratorAwait)));
__ CmpP(r5, Operand(static_cast<int>(SuspendFlags::kAsyncGeneratorAwait)));
__ beq(&async_await);
......
......@@ -2629,7 +2629,7 @@ void MacroAssembler::AssertGeneratorObject(Register object, Register flags) {
// `flags` should be an untagged integer. See `SuspendFlags` in src/globals.h
if (!emit_debug_code()) return;
TestIfSmi(object, r0);
Check(ne, kOperandIsASmiAndNotAGeneratorObject);
Check(ne, kOperandIsASmiAndNotAGeneratorObject, cr0);
// Load map
Register map = object;
......@@ -2637,9 +2637,8 @@ void MacroAssembler::AssertGeneratorObject(Register object, Register flags) {
LoadP(map, FieldMemOperand(object, HeapObject::kMapOffset));
Label async, do_check;
And(ip, flags, Operand(static_cast<int>(SuspendFlags::kGeneratorTypeMask)));
cmpi(ip, Operand(static_cast<int>(SuspendFlags::kGeneratorTypeMask)));
bne(&async);
TestBitMask(flags, static_cast<int>(SuspendFlags::kGeneratorTypeMask), r0);
bne(&async, cr0);
// Check if JSGeneratorObject
CompareInstanceType(map, object, JS_GENERATOR_OBJECT_TYPE);
......
......@@ -2413,8 +2413,7 @@ void MacroAssembler::AssertGeneratorObject(Register object, Register flags) {
LoadP(map, FieldMemOperand(object, HeapObject::kMapOffset));
Label async, do_check;
And(ip, flags, Operand(static_cast<int>(SuspendFlags::kGeneratorTypeMask)));
CmpP(ip, Operand(static_cast<int>(SuspendFlags::kGeneratorTypeMask)));
tmll(flags, Operand(static_cast<int>(SuspendFlags::kGeneratorTypeMask)));
bne(&async);
// Check if JSGeneratorObject
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment