OLD | NEW |
1 // Copyright 2006-2009 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2009 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 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
318 CmpInstanceType(map, type); | 318 CmpInstanceType(map, type); |
319 } | 319 } |
320 | 320 |
321 | 321 |
322 void MacroAssembler::CmpInstanceType(Register map, InstanceType type) { | 322 void MacroAssembler::CmpInstanceType(Register map, InstanceType type) { |
323 cmpb(FieldOperand(map, Map::kInstanceTypeOffset), | 323 cmpb(FieldOperand(map, Map::kInstanceTypeOffset), |
324 static_cast<int8_t>(type)); | 324 static_cast<int8_t>(type)); |
325 } | 325 } |
326 | 326 |
327 | 327 |
| 328 Condition MacroAssembler::IsObjectStringType(Register heap_object, |
| 329 Register map, |
| 330 Register instance_type) { |
| 331 mov(map, FieldOperand(heap_object, HeapObject::kMapOffset)); |
| 332 movzx_b(instance_type, FieldOperand(map, Map::kInstanceTypeOffset)); |
| 333 ASSERT(kNotStringTag != 0); |
| 334 test(instance_type, Immediate(kIsNotStringMask)); |
| 335 return zero; |
| 336 } |
| 337 |
| 338 |
328 void MacroAssembler::FCmp() { | 339 void MacroAssembler::FCmp() { |
329 if (CpuFeatures::IsSupported(CMOV)) { | 340 if (CpuFeatures::IsSupported(CMOV)) { |
330 fucomip(); | 341 fucomip(); |
331 ffree(0); | 342 ffree(0); |
332 fincstp(); | 343 fincstp(); |
333 } else { | 344 } else { |
334 fucompp(); | 345 fucompp(); |
335 push(eax); | 346 push(eax); |
336 fnstsw_ax(); | 347 fnstsw_ax(); |
337 sahf(); | 348 sahf(); |
(...skipping 1159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1497 // Indicate that code has changed. | 1508 // Indicate that code has changed. |
1498 CPU::FlushICache(address_, size_); | 1509 CPU::FlushICache(address_, size_); |
1499 | 1510 |
1500 // Check that the code was patched as expected. | 1511 // Check that the code was patched as expected. |
1501 ASSERT(masm_.pc_ == address_ + size_); | 1512 ASSERT(masm_.pc_ == address_ + size_); |
1502 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); | 1513 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); |
1503 } | 1514 } |
1504 | 1515 |
1505 | 1516 |
1506 } } // namespace v8::internal | 1517 } } // namespace v8::internal |
OLD | NEW |