| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 1961 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1972 } | 1972 } |
| 1973 | 1973 |
| 1974 | 1974 |
| 1975 void LCodeGen::DoCmpT(LCmpT* instr) { | 1975 void LCodeGen::DoCmpT(LCmpT* instr) { |
| 1976 Token::Value op = instr->op(); | 1976 Token::Value op = instr->op(); |
| 1977 | 1977 |
| 1978 Handle<Code> ic = CompareIC::GetUninitialized(op); | 1978 Handle<Code> ic = CompareIC::GetUninitialized(op); |
| 1979 CallCode(ic, RelocInfo::CODE_TARGET, instr); | 1979 CallCode(ic, RelocInfo::CODE_TARGET, instr); |
| 1980 | 1980 |
| 1981 Condition condition = TokenToCondition(op, false); | 1981 Condition condition = TokenToCondition(op, false); |
| 1982 if (op == Token::GT || op == Token::LTE) { | |
| 1983 condition = ReverseCondition(condition); | |
| 1984 } | |
| 1985 Label true_value, done; | 1982 Label true_value, done; |
| 1986 __ testq(rax, rax); | 1983 __ testq(rax, rax); |
| 1987 __ j(condition, &true_value, Label::kNear); | 1984 __ j(condition, &true_value, Label::kNear); |
| 1988 __ LoadRoot(ToRegister(instr->result()), Heap::kFalseValueRootIndex); | 1985 __ LoadRoot(ToRegister(instr->result()), Heap::kFalseValueRootIndex); |
| 1989 __ jmp(&done, Label::kNear); | 1986 __ jmp(&done, Label::kNear); |
| 1990 __ bind(&true_value); | 1987 __ bind(&true_value); |
| 1991 __ LoadRoot(ToRegister(instr->result()), Heap::kTrueValueRootIndex); | 1988 __ LoadRoot(ToRegister(instr->result()), Heap::kTrueValueRootIndex); |
| 1992 __ bind(&done); | 1989 __ bind(&done); |
| 1993 } | 1990 } |
| 1994 | 1991 |
| (...skipping 2236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4231 RegisterEnvironmentForDeoptimization(environment); | 4228 RegisterEnvironmentForDeoptimization(environment); |
| 4232 ASSERT(osr_pc_offset_ == -1); | 4229 ASSERT(osr_pc_offset_ == -1); |
| 4233 osr_pc_offset_ = masm()->pc_offset(); | 4230 osr_pc_offset_ = masm()->pc_offset(); |
| 4234 } | 4231 } |
| 4235 | 4232 |
| 4236 #undef __ | 4233 #undef __ |
| 4237 | 4234 |
| 4238 } } // namespace v8::internal | 4235 } } // namespace v8::internal |
| 4239 | 4236 |
| 4240 #endif // V8_TARGET_ARCH_X64 | 4237 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |