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

Unified Diff: src/x87/code-stubs-x87.cc

Issue 1823943002: X87: Extends testb and cmpb/cmpw instruction support in the ia32 assembler. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/x87/builtins-x87.cc ('k') | src/x87/codegen-x87.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/x87/code-stubs-x87.cc
diff --git a/src/x87/code-stubs-x87.cc b/src/x87/code-stubs-x87.cc
index a7673a09e1f810deaa152fc48523c12528630e1b..47e08b1fbd6339a60d32161b19be9ea18cced2a4 100644
--- a/src/x87/code-stubs-x87.cc
+++ b/src/x87/code-stubs-x87.cc
@@ -540,11 +540,11 @@ void RegExpExecStub::Generate(MacroAssembler* masm) {
__ mov(ebx, FieldOperand(ebx, Map::kInstanceTypeOffset));
// (5a) Is subject sequential two byte? If yes, go to (9).
- __ test_b(ebx, kStringRepresentationMask | kStringEncodingMask);
+ __ test_b(ebx, Immediate(kStringRepresentationMask | kStringEncodingMask));
STATIC_ASSERT((kSeqStringTag | kTwoByteStringTag) == 0);
__ j(zero, &seq_two_byte_string); // Go to (9).
// (5b) Is subject external? If yes, go to (8).
- __ test_b(ebx, kStringRepresentationMask);
+ __ test_b(ebx, Immediate(kStringRepresentationMask));
// The underlying external string is never a short external string.
STATIC_ASSERT(ExternalString::kMaxShortLength < ConsString::kMinLength);
STATIC_ASSERT(ExternalString::kMaxShortLength < SlicedString::kMinLength);
@@ -787,7 +787,7 @@ void RegExpExecStub::Generate(MacroAssembler* masm) {
if (FLAG_debug_code) {
// Assert that we do not have a cons or slice (indirect strings) here.
// Sequential strings have already been ruled out.
- __ test_b(ebx, kIsIndirectStringMask);
+ __ test_b(ebx, Immediate(kIsIndirectStringMask));
__ Assert(zero, kExternalStringExpectedButNotFound);
}
__ mov(eax, FieldOperand(eax, ExternalString::kResourceDataOffset));
@@ -796,7 +796,7 @@ void RegExpExecStub::Generate(MacroAssembler* masm) {
__ sub(eax, Immediate(SeqTwoByteString::kHeaderSize - kHeapObjectTag));
STATIC_ASSERT(kTwoByteStringTag == 0);
// (8a) Is the external string one byte? If yes, go to (6).
- __ test_b(ebx, kStringEncodingMask);
+ __ test_b(ebx, Immediate(kStringEncodingMask));
__ j(not_zero, &seq_one_byte_string); // Goto (6).
// eax: sequential subject string (or look-alike, external string)
@@ -921,13 +921,13 @@ void CompareICStub::GenerateGeneric(MacroAssembler* masm) {
__ mov(ecx, FieldOperand(eax, HeapObject::kMapOffset));
__ movzx_b(ecx, FieldOperand(ecx, Map::kInstanceTypeOffset));
// Call runtime on identical JSObjects. Otherwise return equal.
- __ cmpb(ecx, static_cast<uint8_t>(FIRST_JS_RECEIVER_TYPE));
+ __ cmpb(ecx, Immediate(FIRST_JS_RECEIVER_TYPE));
__ j(above_equal, &runtime_call, Label::kFar);
// Call runtime on identical symbols since we need to throw a TypeError.
- __ cmpb(ecx, static_cast<uint8_t>(SYMBOL_TYPE));
+ __ cmpb(ecx, Immediate(SYMBOL_TYPE));
__ j(equal, &runtime_call, Label::kFar);
// Call runtime on identical SIMD values since we must throw a TypeError.
- __ cmpb(ecx, static_cast<uint8_t>(SIMD128_VALUE_TYPE));
+ __ cmpb(ecx, Immediate(SIMD128_VALUE_TYPE));
__ j(equal, &runtime_call, Label::kFar);
}
__ Move(eax, Immediate(Smi::FromInt(EQUAL)));
@@ -1099,10 +1099,10 @@ void CompareICStub::GenerateGeneric(MacroAssembler* masm) {
__ mov(ebx, FieldOperand(edx, HeapObject::kMapOffset));
__ test_b(FieldOperand(ebx, Map::kBitFieldOffset),
- 1 << Map::kIsUndetectable);
+ Immediate(1 << Map::kIsUndetectable));
__ j(not_zero, &undetectable, Label::kNear);
__ test_b(FieldOperand(ecx, Map::kBitFieldOffset),
- 1 << Map::kIsUndetectable);
+ Immediate(1 << Map::kIsUndetectable));
__ j(not_zero, &return_unequal, Label::kNear);
__ CmpInstanceType(ebx, FIRST_JS_RECEIVER_TYPE);
@@ -1116,7 +1116,7 @@ void CompareICStub::GenerateGeneric(MacroAssembler* masm) {
__ bind(&undetectable);
__ test_b(FieldOperand(ecx, Map::kBitFieldOffset),
- 1 << Map::kIsUndetectable);
+ Immediate(1 << Map::kIsUndetectable));
__ j(zero, &return_unequal, Label::kNear);
// If both sides are JSReceivers, then the result is false according to
@@ -1836,12 +1836,12 @@ void InstanceOfStub::Generate(MacroAssembler* masm) {
// Go to the runtime if the function is not a constructor.
__ test_b(FieldOperand(function_map, Map::kBitFieldOffset),
- static_cast<uint8_t>(1 << Map::kIsConstructor));
+ Immediate(1 << Map::kIsConstructor));
__ j(zero, &slow_case);
// Ensure that {function} has an instance prototype.
__ test_b(FieldOperand(function_map, Map::kBitFieldOffset),
- static_cast<uint8_t>(1 << Map::kHasNonInstancePrototype));
+ Immediate(1 << Map::kHasNonInstancePrototype));
__ j(not_zero, &slow_case);
// Get the "prototype" (or initial map) of the {function}.
@@ -1875,7 +1875,7 @@ void InstanceOfStub::Generate(MacroAssembler* masm) {
// Check if the object needs to be access checked.
__ test_b(FieldOperand(object_map, Map::kBitFieldOffset),
- 1 << Map::kIsAccessCheckNeeded);
+ Immediate(1 << Map::kIsAccessCheckNeeded));
__ j(not_zero, &fast_runtime_fallback, Label::kNear);
// Check if the current object is a Proxy.
__ CmpInstanceType(object_map, JS_PROXY_TYPE);
@@ -2220,13 +2220,13 @@ void SubStringStub::Generate(MacroAssembler* masm) {
Label two_byte_sequential, runtime_drop_two, sequential_string;
STATIC_ASSERT(kExternalStringTag != 0);
STATIC_ASSERT(kSeqStringTag == 0);
- __ test_b(ebx, kExternalStringTag);
+ __ test_b(ebx, Immediate(kExternalStringTag));
__ j(zero, &sequential_string);
// Handle external string.
// Rule out short external strings.
STATIC_ASSERT(kShortExternalStringTag != 0);
- __ test_b(ebx, kShortExternalStringMask);
+ __ test_b(ebx, Immediate(kShortExternalStringMask));
__ j(not_zero, &runtime);
__ mov(edi, FieldOperand(edi, ExternalString::kResourceDataOffset));
// Move the pointer so that offset-wise, it looks like a sequential string.
@@ -2239,7 +2239,7 @@ void SubStringStub::Generate(MacroAssembler* masm) {
__ push(edi);
__ SmiUntag(ecx);
STATIC_ASSERT((kOneByteStringTag & kStringEncodingMask) != 0);
- __ test_b(ebx, kStringEncodingMask);
+ __ test_b(ebx, Immediate(kStringEncodingMask));
__ j(zero, &two_byte_sequential);
// Sequential one byte string. Allocate the result.
@@ -4101,7 +4101,7 @@ static void CreateArrayDispatchOneArgument(MacroAssembler* masm,
STATIC_ASSERT(FAST_HOLEY_DOUBLE_ELEMENTS == 5);
// is the low bit set? If so, we are holey and that is good.
- __ test_b(edx, 1);
+ __ test_b(edx, Immediate(1));
__ j(not_zero, &normal_sequence);
}
@@ -5229,7 +5229,7 @@ static void CallApiFunctionAndReturn(MacroAssembler* masm,
Label profiler_disabled;
Label end_profiler_check;
__ mov(eax, Immediate(ExternalReference::is_profiling_address(isolate)));
- __ cmpb(Operand(eax, 0), 0);
+ __ cmpb(Operand(eax, 0), Immediate(0));
__ j(zero, &profiler_disabled);
// Additional parameter is the address of the actual getter function.
« no previous file with comments | « src/x87/builtins-x87.cc ('k') | src/x87/codegen-x87.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698