OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved.7 | 1 // Copyright 2012 the V8 project authors. All rights reserved.7 |
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 2203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2214 | 2214 |
2215 DoubleRegister input_reg = ToDoubleRegister(instr->object()); | 2215 DoubleRegister input_reg = ToDoubleRegister(instr->object()); |
2216 EmitFalseBranchF(instr, eq, input_reg, input_reg); | 2216 EmitFalseBranchF(instr, eq, input_reg, input_reg); |
2217 | 2217 |
2218 Register scratch = scratch0(); | 2218 Register scratch = scratch0(); |
2219 __ FmoveHigh(scratch, input_reg); | 2219 __ FmoveHigh(scratch, input_reg); |
2220 EmitBranch(instr, eq, scratch, Operand(kHoleNanUpper32)); | 2220 EmitBranch(instr, eq, scratch, Operand(kHoleNanUpper32)); |
2221 } | 2221 } |
2222 | 2222 |
2223 | 2223 |
2224 void LCodeGen::DoCompareMinusZeroAndBranch(LCompareMinusZeroAndBranch* instr) { | |
2225 Representation rep = instr->hydrogen()->value()->representation(); | |
2226 DCHECK(!rep.IsInteger32()); | |
2227 Register scratch = ToRegister(instr->temp()); | |
2228 | |
2229 if (rep.IsDouble()) { | |
2230 DoubleRegister value = ToDoubleRegister(instr->value()); | |
2231 EmitFalseBranchF(instr, ne, value, kDoubleRegZero); | |
2232 __ FmoveHigh(scratch, value); | |
2233 __ li(at, 0x80000000); | |
2234 } else { | |
2235 Register value = ToRegister(instr->value()); | |
2236 __ CheckMap(value, | |
2237 scratch, | |
2238 Heap::kHeapNumberMapRootIndex, | |
2239 instr->FalseLabel(chunk()), | |
2240 DO_SMI_CHECK); | |
2241 __ lw(scratch, FieldMemOperand(value, HeapNumber::kExponentOffset)); | |
2242 EmitFalseBranch(instr, ne, scratch, Operand(0x80000000)); | |
2243 __ lw(scratch, FieldMemOperand(value, HeapNumber::kMantissaOffset)); | |
2244 __ mov(at, zero_reg); | |
2245 } | |
2246 EmitBranch(instr, eq, scratch, Operand(at)); | |
2247 } | |
2248 | |
2249 | |
2250 Condition LCodeGen::EmitIsString(Register input, | 2224 Condition LCodeGen::EmitIsString(Register input, |
2251 Register temp1, | 2225 Register temp1, |
2252 Label* is_not_string, | 2226 Label* is_not_string, |
2253 SmiCheck check_needed = INLINE_SMI_CHECK) { | 2227 SmiCheck check_needed = INLINE_SMI_CHECK) { |
2254 if (check_needed == INLINE_SMI_CHECK) { | 2228 if (check_needed == INLINE_SMI_CHECK) { |
2255 __ JumpIfSmi(input, is_not_string); | 2229 __ JumpIfSmi(input, is_not_string); |
2256 } | 2230 } |
2257 __ GetObjectType(input, temp1, temp1); | 2231 __ GetObjectType(input, temp1, temp1); |
2258 | 2232 |
2259 return lt; | 2233 return lt; |
(...skipping 3338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5598 __ Push(at, ToRegister(instr->function())); | 5572 __ Push(at, ToRegister(instr->function())); |
5599 CallRuntime(Runtime::kPushBlockContext, instr); | 5573 CallRuntime(Runtime::kPushBlockContext, instr); |
5600 RecordSafepoint(Safepoint::kNoLazyDeopt); | 5574 RecordSafepoint(Safepoint::kNoLazyDeopt); |
5601 } | 5575 } |
5602 | 5576 |
5603 | 5577 |
5604 #undef __ | 5578 #undef __ |
5605 | 5579 |
5606 } // namespace internal | 5580 } // namespace internal |
5607 } // namespace v8 | 5581 } // namespace v8 |
OLD | NEW |