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

Side by Side Diff: src/mips/full-codegen-mips.cc

Issue 61203006: MIPS: Introduce %_IsMinusZero. (Closed) Base URL: https://github.com/v8/v8.git@gbl
Patch Set: Created 7 years, 1 month 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 | « no previous file | src/mips/lithium-codegen-mips.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 3115 matching lines...) Expand 10 before | Expand all | Expand 10 after
3126 __ JumpIfSmi(v0, if_false); 3126 __ JumpIfSmi(v0, if_false);
3127 __ GetObjectType(v0, a1, a2); 3127 __ GetObjectType(v0, a1, a2);
3128 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); 3128 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false);
3129 __ Branch(if_true, eq, a2, Operand(JS_FUNCTION_TYPE)); 3129 __ Branch(if_true, eq, a2, Operand(JS_FUNCTION_TYPE));
3130 __ Branch(if_false); 3130 __ Branch(if_false);
3131 3131
3132 context()->Plug(if_true, if_false); 3132 context()->Plug(if_true, if_false);
3133 } 3133 }
3134 3134
3135 3135
3136 void FullCodeGenerator::EmitIsMinusZero(CallRuntime* expr) {
3137 ZoneList<Expression*>* args = expr->arguments();
3138 ASSERT(args->length() == 1);
3139
3140 VisitForAccumulatorValue(args->at(0));
3141
3142 Label materialize_true, materialize_false;
3143 Label* if_true = NULL;
3144 Label* if_false = NULL;
3145 Label* fall_through = NULL;
3146 context()->PrepareTest(&materialize_true, &materialize_false,
3147 &if_true, &if_false, &fall_through);
3148
3149 __ CheckMap(v0, a1, Heap::kHeapNumberMapRootIndex, if_false, DO_SMI_CHECK);
3150 __ lw(a2, FieldMemOperand(v0, HeapNumber::kExponentOffset));
3151 __ lw(a1, FieldMemOperand(v0, HeapNumber::kMantissaOffset));
3152 __ li(t0, 0x80000000);
3153 Label not_nan;
3154 __ Branch(&not_nan, ne, a2, Operand(t0));
3155 __ mov(t0, zero_reg);
3156 __ mov(a2, a1);
3157 __ bind(&not_nan);
3158
3159 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false);
3160 Split(eq, a2, Operand(t0), if_true, if_false, fall_through);
3161
3162 context()->Plug(if_true, if_false);
3163 }
3164
3165
3136 void FullCodeGenerator::EmitIsArray(CallRuntime* expr) { 3166 void FullCodeGenerator::EmitIsArray(CallRuntime* expr) {
3137 ZoneList<Expression*>* args = expr->arguments(); 3167 ZoneList<Expression*>* args = expr->arguments();
3138 ASSERT(args->length() == 1); 3168 ASSERT(args->length() == 1);
3139 3169
3140 VisitForAccumulatorValue(args->at(0)); 3170 VisitForAccumulatorValue(args->at(0));
3141 3171
3142 Label materialize_true, materialize_false; 3172 Label materialize_true, materialize_false;
3143 Label* if_true = NULL; 3173 Label* if_true = NULL;
3144 Label* if_false = NULL; 3174 Label* if_false = NULL;
3145 Label* fall_through = NULL; 3175 Label* fall_through = NULL;
(...skipping 1850 matching lines...) Expand 10 before | Expand all | Expand 10 after
4996 Assembler::target_address_at(pc_immediate_load_address)) == 5026 Assembler::target_address_at(pc_immediate_load_address)) ==
4997 reinterpret_cast<uint32_t>( 5027 reinterpret_cast<uint32_t>(
4998 isolate->builtins()->OsrAfterStackCheck()->entry())); 5028 isolate->builtins()->OsrAfterStackCheck()->entry()));
4999 return OSR_AFTER_STACK_CHECK; 5029 return OSR_AFTER_STACK_CHECK;
5000 } 5030 }
5001 5031
5002 5032
5003 } } // namespace v8::internal 5033 } } // namespace v8::internal
5004 5034
5005 #endif // V8_TARGET_ARCH_MIPS 5035 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « no previous file | src/mips/lithium-codegen-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698