| 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 1569 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1580 ASSERT(reg_code >= 0 && reg_code < kNumSafepointRegisters); | 1580 ASSERT(reg_code >= 0 && reg_code < kNumSafepointRegisters); |
| 1581 return kNumSafepointRegisters - reg_code - 1; | 1581 return kNumSafepointRegisters - reg_code - 1; |
| 1582 } | 1582 } |
| 1583 | 1583 |
| 1584 | 1584 |
| 1585 void MacroAssembler::Ret() { | 1585 void MacroAssembler::Ret() { |
| 1586 ret(0); | 1586 ret(0); |
| 1587 } | 1587 } |
| 1588 | 1588 |
| 1589 | 1589 |
| 1590 void MacroAssembler::Ret(int bytes_dropped, Register scratch) { |
| 1591 if (is_uint16(bytes_dropped)) { |
| 1592 ret(bytes_dropped); |
| 1593 } else { |
| 1594 pop(scratch); |
| 1595 add(Operand(esp), Immediate(bytes_dropped)); |
| 1596 push(scratch); |
| 1597 ret(0); |
| 1598 } |
| 1599 } |
| 1600 |
| 1601 |
| 1602 |
| 1603 |
| 1590 void MacroAssembler::Drop(int stack_elements) { | 1604 void MacroAssembler::Drop(int stack_elements) { |
| 1591 if (stack_elements > 0) { | 1605 if (stack_elements > 0) { |
| 1592 add(Operand(esp), Immediate(stack_elements * kPointerSize)); | 1606 add(Operand(esp), Immediate(stack_elements * kPointerSize)); |
| 1593 } | 1607 } |
| 1594 } | 1608 } |
| 1595 | 1609 |
| 1596 | 1610 |
| 1597 void MacroAssembler::Move(Register dst, Register src) { | 1611 void MacroAssembler::Move(Register dst, Register src) { |
| 1598 if (!dst.is(src)) { | 1612 if (!dst.is(src)) { |
| 1599 mov(dst, src); | 1613 mov(dst, src); |
| (...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1905 | 1919 |
| 1906 // Check that the code was patched as expected. | 1920 // Check that the code was patched as expected. |
| 1907 ASSERT(masm_.pc_ == address_ + size_); | 1921 ASSERT(masm_.pc_ == address_ + size_); |
| 1908 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); | 1922 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); |
| 1909 } | 1923 } |
| 1910 | 1924 |
| 1911 | 1925 |
| 1912 } } // namespace v8::internal | 1926 } } // namespace v8::internal |
| 1913 | 1927 |
| 1914 #endif // V8_TARGET_ARCH_IA32 | 1928 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |