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 2204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2215 return SmiIndex(dst, times_1); | 2215 return SmiIndex(dst, times_1); |
2216 } | 2216 } |
2217 | 2217 |
2218 | 2218 |
2219 void MacroAssembler::AddSmiField(Register dst, const Operand& src) { | 2219 void MacroAssembler::AddSmiField(Register dst, const Operand& src) { |
2220 ASSERT_EQ(0, kSmiShift % kBitsPerByte); | 2220 ASSERT_EQ(0, kSmiShift % kBitsPerByte); |
2221 addl(dst, Operand(src, kSmiShift / kBitsPerByte)); | 2221 addl(dst, Operand(src, kSmiShift / kBitsPerByte)); |
2222 } | 2222 } |
2223 | 2223 |
2224 | 2224 |
| 2225 void MacroAssembler::PushInt64AsTwoSmis(Register src, Register scratch) { |
| 2226 movq(scratch, src); |
| 2227 // High bits. |
| 2228 shr(src, Immediate(64 - kSmiShift)); |
| 2229 shl(src, Immediate(kSmiShift)); |
| 2230 push(src); |
| 2231 // Low bits. |
| 2232 shl(scratch, Immediate(kSmiShift)); |
| 2233 push(scratch); |
| 2234 } |
| 2235 |
| 2236 |
| 2237 void MacroAssembler::PopInt64AsTwoSmis(Register dst, Register scratch) { |
| 2238 pop(scratch); |
| 2239 // Low bits. |
| 2240 shr(scratch, Immediate(kSmiShift)); |
| 2241 pop(dst); |
| 2242 shr(dst, Immediate(kSmiShift)); |
| 2243 // High bits. |
| 2244 shl(dst, Immediate(64 - kSmiShift)); |
| 2245 or_(dst, scratch); |
| 2246 } |
| 2247 |
| 2248 |
2225 void MacroAssembler::JumpIfNotString(Register object, | 2249 void MacroAssembler::JumpIfNotString(Register object, |
2226 Register object_map, | 2250 Register object_map, |
2227 Label* not_string, | 2251 Label* not_string, |
2228 Label::Distance near_jump) { | 2252 Label::Distance near_jump) { |
2229 Condition is_smi = CheckSmi(object); | 2253 Condition is_smi = CheckSmi(object); |
2230 j(is_smi, not_string, near_jump); | 2254 j(is_smi, not_string, near_jump); |
2231 CmpObjectType(object, FIRST_NONSTRING_TYPE, object_map); | 2255 CmpObjectType(object, FIRST_NONSTRING_TYPE, object_map); |
2232 j(above_equal, not_string, near_jump); | 2256 j(above_equal, not_string, near_jump); |
2233 } | 2257 } |
2234 | 2258 |
(...skipping 2459 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4694 j(greater, &no_memento_available); | 4718 j(greater, &no_memento_available); |
4695 CompareRoot(MemOperand(scratch_reg, -AllocationMemento::kSize), | 4719 CompareRoot(MemOperand(scratch_reg, -AllocationMemento::kSize), |
4696 Heap::kAllocationMementoMapRootIndex); | 4720 Heap::kAllocationMementoMapRootIndex); |
4697 bind(&no_memento_available); | 4721 bind(&no_memento_available); |
4698 } | 4722 } |
4699 | 4723 |
4700 | 4724 |
4701 } } // namespace v8::internal | 4725 } } // namespace v8::internal |
4702 | 4726 |
4703 #endif // V8_TARGET_ARCH_X64 | 4727 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |