| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 1929 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1940 int false_block = instr->FalseDestination(chunk_); | 1940 int false_block = instr->FalseDestination(chunk_); |
| 1941 __ j(cc, chunk_->GetAssemblyLabel(false_block)); | 1941 __ j(cc, chunk_->GetAssemblyLabel(false_block)); |
| 1942 } | 1942 } |
| 1943 | 1943 |
| 1944 | 1944 |
| 1945 void LCodeGen::DoDebugBreak(LDebugBreak* instr) { | 1945 void LCodeGen::DoDebugBreak(LDebugBreak* instr) { |
| 1946 __ int3(); | 1946 __ int3(); |
| 1947 } | 1947 } |
| 1948 | 1948 |
| 1949 | 1949 |
| 1950 void LCodeGen::DoIsNumberAndBranch(LIsNumberAndBranch* instr) { | |
| 1951 Representation r = instr->hydrogen()->value()->representation(); | |
| 1952 if (r.IsSmiOrInteger32() || r.IsDouble()) { | |
| 1953 EmitBranch(instr, no_condition); | |
| 1954 } else { | |
| 1955 ASSERT(r.IsTagged()); | |
| 1956 Register reg = ToRegister(instr->value()); | |
| 1957 HType type = instr->hydrogen()->value()->type(); | |
| 1958 if (type.IsTaggedNumber()) { | |
| 1959 EmitBranch(instr, no_condition); | |
| 1960 } | |
| 1961 __ JumpIfSmi(reg, instr->TrueLabel(chunk_)); | |
| 1962 __ CompareRoot(FieldOperand(reg, HeapObject::kMapOffset), | |
| 1963 Heap::kHeapNumberMapRootIndex); | |
| 1964 EmitBranch(instr, equal); | |
| 1965 } | |
| 1966 } | |
| 1967 | |
| 1968 | |
| 1969 void LCodeGen::DoBranch(LBranch* instr) { | 1950 void LCodeGen::DoBranch(LBranch* instr) { |
| 1970 Representation r = instr->hydrogen()->value()->representation(); | 1951 Representation r = instr->hydrogen()->value()->representation(); |
| 1971 if (r.IsInteger32()) { | 1952 if (r.IsInteger32()) { |
| 1972 ASSERT(!info()->IsStub()); | 1953 ASSERT(!info()->IsStub()); |
| 1973 Register reg = ToRegister(instr->value()); | 1954 Register reg = ToRegister(instr->value()); |
| 1974 __ testl(reg, reg); | 1955 __ testl(reg, reg); |
| 1975 EmitBranch(instr, not_zero); | 1956 EmitBranch(instr, not_zero); |
| 1976 } else if (r.IsSmi()) { | 1957 } else if (r.IsSmi()) { |
| 1977 ASSERT(!info()->IsStub()); | 1958 ASSERT(!info()->IsStub()); |
| 1978 Register reg = ToRegister(instr->value()); | 1959 Register reg = ToRegister(instr->value()); |
| (...skipping 3541 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5520 FixedArray::kHeaderSize - kPointerSize)); | 5501 FixedArray::kHeaderSize - kPointerSize)); |
| 5521 __ bind(&done); | 5502 __ bind(&done); |
| 5522 } | 5503 } |
| 5523 | 5504 |
| 5524 | 5505 |
| 5525 #undef __ | 5506 #undef __ |
| 5526 | 5507 |
| 5527 } } // namespace v8::internal | 5508 } } // namespace v8::internal |
| 5528 | 5509 |
| 5529 #endif // V8_TARGET_ARCH_X64 | 5510 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |