OLD | NEW |
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 2293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2304 | 2304 |
2305 DoubleRegister input_reg = ToDoubleRegister(instr->object()); | 2305 DoubleRegister input_reg = ToDoubleRegister(instr->object()); |
2306 EmitFalseBranchF(instr, eq, input_reg, input_reg); | 2306 EmitFalseBranchF(instr, eq, input_reg, input_reg); |
2307 | 2307 |
2308 Register scratch = scratch0(); | 2308 Register scratch = scratch0(); |
2309 __ FmoveHigh(scratch, input_reg); | 2309 __ FmoveHigh(scratch, input_reg); |
2310 EmitBranch(instr, eq, scratch, Operand(kHoleNanUpper32)); | 2310 EmitBranch(instr, eq, scratch, Operand(kHoleNanUpper32)); |
2311 } | 2311 } |
2312 | 2312 |
2313 | 2313 |
| 2314 void LCodeGen::DoCompareMinusZeroAndBranch(LCompareMinusZeroAndBranch* instr) { |
| 2315 Representation rep = instr->hydrogen()->value()->representation(); |
| 2316 ASSERT(!rep.IsInteger32()); |
| 2317 Label if_false; |
| 2318 Register scratch = ToRegister(instr->temp()); |
| 2319 |
| 2320 if (rep.IsDouble()) { |
| 2321 DoubleRegister value = ToDoubleRegister(instr->value()); |
| 2322 __ BranchF(&if_false, NULL, ne, value, kDoubleRegZero); |
| 2323 __ FmoveHigh(scratch, value); |
| 2324 __ li(at, 0x80000000); |
| 2325 } else { |
| 2326 Register value = ToRegister(instr->value()); |
| 2327 __ CheckMap( |
| 2328 value, scratch, Heap::kHeapNumberMapRootIndex, &if_false, DO_SMI_CHECK); |
| 2329 __ lw(scratch, FieldMemOperand(value, HeapNumber::kExponentOffset)); |
| 2330 __ Branch(&if_false, ne, scratch, Operand(0x80000000)); |
| 2331 __ lw(scratch, FieldMemOperand(value, HeapNumber::kMantissaOffset)); |
| 2332 __ mov(at, zero_reg); |
| 2333 } |
| 2334 EmitBranch(instr, eq, scratch, Operand(at)); |
| 2335 |
| 2336 __ bind(&if_false); |
| 2337 EmitFalseBranchF(instr, al, kDoubleRegZero, kDoubleRegZero); |
| 2338 } |
| 2339 |
| 2340 |
2314 Condition LCodeGen::EmitIsObject(Register input, | 2341 Condition LCodeGen::EmitIsObject(Register input, |
2315 Register temp1, | 2342 Register temp1, |
2316 Register temp2, | 2343 Register temp2, |
2317 Label* is_not_object, | 2344 Label* is_not_object, |
2318 Label* is_object) { | 2345 Label* is_object) { |
2319 __ JumpIfSmi(input, is_not_object); | 2346 __ JumpIfSmi(input, is_not_object); |
2320 | 2347 |
2321 __ LoadRoot(temp2, Heap::kNullValueRootIndex); | 2348 __ LoadRoot(temp2, Heap::kNullValueRootIndex); |
2322 __ Branch(is_object, eq, input, Operand(temp2)); | 2349 __ Branch(is_object, eq, input, Operand(temp2)); |
2323 | 2350 |
(...skipping 3530 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5854 __ Subu(scratch, result, scratch); | 5881 __ Subu(scratch, result, scratch); |
5855 __ lw(result, FieldMemOperand(scratch, | 5882 __ lw(result, FieldMemOperand(scratch, |
5856 FixedArray::kHeaderSize - kPointerSize)); | 5883 FixedArray::kHeaderSize - kPointerSize)); |
5857 __ bind(&done); | 5884 __ bind(&done); |
5858 } | 5885 } |
5859 | 5886 |
5860 | 5887 |
5861 #undef __ | 5888 #undef __ |
5862 | 5889 |
5863 } } // namespace v8::internal | 5890 } } // namespace v8::internal |
OLD | NEW |