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 1515 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1526 | 1526 |
1527 push(eax); | 1527 push(eax); |
1528 push(Immediate(p0)); | 1528 push(Immediate(p0)); |
1529 push(Immediate(reinterpret_cast<intptr_t>(Smi::FromInt(p1 - p0)))); | 1529 push(Immediate(reinterpret_cast<intptr_t>(Smi::FromInt(p1 - p0)))); |
1530 CallRuntime(Runtime::kAbort, 2); | 1530 CallRuntime(Runtime::kAbort, 2); |
1531 // will not return here | 1531 // will not return here |
1532 int3(); | 1532 int3(); |
1533 } | 1533 } |
1534 | 1534 |
1535 | 1535 |
| 1536 void MacroAssembler::JumpIfInstanceTypeIsNotSequentialAscii( |
| 1537 Register instance_type, |
| 1538 Register scratch, |
| 1539 Label *failure) { |
| 1540 if (!scratch.is(instance_type)) { |
| 1541 mov(scratch, instance_type); |
| 1542 } |
| 1543 and_(scratch, |
| 1544 kIsNotStringMask | kStringRepresentationMask | kStringEncodingMask); |
| 1545 cmp(scratch, kStringTag | kSeqStringTag | kAsciiStringTag); |
| 1546 j(not_equal, failure); |
| 1547 } |
| 1548 |
| 1549 |
1536 void MacroAssembler::JumpIfNotBothSequentialAsciiStrings(Register object1, | 1550 void MacroAssembler::JumpIfNotBothSequentialAsciiStrings(Register object1, |
1537 Register object2, | 1551 Register object2, |
1538 Register scratch1, | 1552 Register scratch1, |
1539 Register scratch2, | 1553 Register scratch2, |
1540 Label* failure) { | 1554 Label* failure) { |
1541 // Check that both objects are not smis. | 1555 // Check that both objects are not smis. |
1542 ASSERT_EQ(0, kSmiTag); | 1556 ASSERT_EQ(0, kSmiTag); |
1543 mov(scratch1, Operand(object1)); | 1557 mov(scratch1, Operand(object1)); |
1544 and_(scratch1, Operand(object2)); | 1558 and_(scratch1, Operand(object2)); |
1545 test(scratch1, Immediate(kSmiTagMask)); | 1559 test(scratch1, Immediate(kSmiTagMask)); |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1578 // Indicate that code has changed. | 1592 // Indicate that code has changed. |
1579 CPU::FlushICache(address_, size_); | 1593 CPU::FlushICache(address_, size_); |
1580 | 1594 |
1581 // Check that the code was patched as expected. | 1595 // Check that the code was patched as expected. |
1582 ASSERT(masm_.pc_ == address_ + size_); | 1596 ASSERT(masm_.pc_ == address_ + size_); |
1583 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); | 1597 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); |
1584 } | 1598 } |
1585 | 1599 |
1586 | 1600 |
1587 } } // namespace v8::internal | 1601 } } // namespace v8::internal |
OLD | NEW |