OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 #include "vm/globals.h" | 5 #include "vm/globals.h" |
6 #if defined(TARGET_ARCH_X64) | 6 #if defined(TARGET_ARCH_X64) |
7 | 7 |
8 #include "vm/assembler.h" | 8 #include "vm/assembler.h" |
9 #include "vm/assembler_macros.h" | 9 #include "vm/assembler_macros.h" |
10 #include "vm/compiler.h" | 10 #include "vm/compiler.h" |
(...skipping 1929 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1940 __ addq(Address(R12, count_offset), Immediate(Smi::RawValue(1))); | 1940 __ addq(Address(R12, count_offset), Immediate(Smi::RawValue(1))); |
1941 __ j(NO_OVERFLOW, &compute_result); | 1941 __ j(NO_OVERFLOW, &compute_result); |
1942 __ movq(Address(R12, count_offset), | 1942 __ movq(Address(R12, count_offset), |
1943 Immediate(Smi::RawValue(Smi::kMaxValue))); | 1943 Immediate(Smi::RawValue(Smi::kMaxValue))); |
1944 | 1944 |
1945 __ Bind(&compute_result); | 1945 __ Bind(&compute_result); |
1946 Label true_label; | 1946 Label true_label; |
1947 __ movq(RAX, Address(RSP, 1 * kWordSize)); | 1947 __ movq(RAX, Address(RSP, 1 * kWordSize)); |
1948 __ cmpq(RAX, Address(RSP, 2 * kWordSize)); | 1948 __ cmpq(RAX, Address(RSP, 2 * kWordSize)); |
1949 __ j(EQUAL, &true_label, Assembler::kNearJump); | 1949 __ j(EQUAL, &true_label, Assembler::kNearJump); |
1950 __ LoadObject(RAX, Bool::ZoneHandle(Bool::False())); | 1950 __ LoadObject(RAX, Bool::False()); |
1951 __ ret(); | 1951 __ ret(); |
1952 __ Bind(&true_label); | 1952 __ Bind(&true_label); |
1953 __ LoadObject(RAX, Bool::ZoneHandle(Bool::True())); | 1953 __ LoadObject(RAX, Bool::True()); |
1954 __ ret(); | 1954 __ ret(); |
1955 | 1955 |
1956 __ Bind(&get_class_id_as_smi); | 1956 __ Bind(&get_class_id_as_smi); |
1957 Label not_smi; | 1957 Label not_smi; |
1958 // Test if Smi -> load Smi class for comparison. | 1958 // Test if Smi -> load Smi class for comparison. |
1959 __ testq(RAX, Immediate(kSmiTagMask)); | 1959 __ testq(RAX, Immediate(kSmiTagMask)); |
1960 __ j(NOT_ZERO, ¬_smi, Assembler::kNearJump); | 1960 __ j(NOT_ZERO, ¬_smi, Assembler::kNearJump); |
1961 __ movq(RAX, Immediate(Smi::RawValue(kSmiCid))); | 1961 __ movq(RAX, Immediate(Smi::RawValue(kSmiCid))); |
1962 __ ret(); | 1962 __ ret(); |
1963 | 1963 |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2069 __ cmpq(left, right); | 2069 __ cmpq(left, right); |
2070 __ Bind(&done); | 2070 __ Bind(&done); |
2071 __ popq(right); | 2071 __ popq(right); |
2072 __ popq(left); | 2072 __ popq(left); |
2073 __ ret(); | 2073 __ ret(); |
2074 } | 2074 } |
2075 | 2075 |
2076 } // namespace dart | 2076 } // namespace dart |
2077 | 2077 |
2078 #endif // defined TARGET_ARCH_X64 | 2078 #endif // defined TARGET_ARCH_X64 |
OLD | NEW |