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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 generating_stub_(false), | 46 generating_stub_(false), |
47 allow_stub_calls_(true), | 47 allow_stub_calls_(true), |
48 has_frame_(false) { | 48 has_frame_(false) { |
49 if (isolate() != NULL) { | 49 if (isolate() != NULL) { |
50 code_object_ = Handle<Object>(isolate()->heap()->undefined_value(), | 50 code_object_ = Handle<Object>(isolate()->heap()->undefined_value(), |
51 isolate()); | 51 isolate()); |
52 } | 52 } |
53 } | 53 } |
54 | 54 |
55 | 55 |
| 56 void MacroAssembler::Load(Register dst, |
| 57 const MemOperand& src, |
| 58 Representation r) { |
| 59 ASSERT(!r.IsDouble()); |
| 60 if (r.IsInteger8()) { |
| 61 lb(dst, src); |
| 62 } else if (r.IsUInteger8()) { |
| 63 lbu(dst, src); |
| 64 } else if (r.IsInteger16()) { |
| 65 lh(dst, src); |
| 66 } else if (r.IsUInteger16()) { |
| 67 lhu(dst, src); |
| 68 } else { |
| 69 lw(dst, src); |
| 70 } |
| 71 } |
| 72 |
| 73 |
| 74 void MacroAssembler::Store(Register src, |
| 75 const MemOperand& dst, |
| 76 Representation r) { |
| 77 ASSERT(!r.IsDouble()); |
| 78 if (r.IsInteger8() || r.IsUInteger8()) { |
| 79 sb(src, dst); |
| 80 } else if (r.IsInteger16() || r.IsUInteger16()) { |
| 81 sh(src, dst); |
| 82 } else { |
| 83 sw(src, dst); |
| 84 } |
| 85 } |
| 86 |
| 87 |
56 void MacroAssembler::LoadRoot(Register destination, | 88 void MacroAssembler::LoadRoot(Register destination, |
57 Heap::RootListIndex index) { | 89 Heap::RootListIndex index) { |
58 lw(destination, MemOperand(s6, index << kPointerSizeLog2)); | 90 lw(destination, MemOperand(s6, index << kPointerSizeLog2)); |
59 } | 91 } |
60 | 92 |
61 | 93 |
62 void MacroAssembler::LoadRoot(Register destination, | 94 void MacroAssembler::LoadRoot(Register destination, |
63 Heap::RootListIndex index, | 95 Heap::RootListIndex index, |
64 Condition cond, | 96 Condition cond, |
65 Register src1, const Operand& src2) { | 97 Register src1, const Operand& src2) { |
(...skipping 5672 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5738 opcode == BGTZL); | 5770 opcode == BGTZL); |
5739 opcode = (cond == eq) ? BEQ : BNE; | 5771 opcode = (cond == eq) ? BEQ : BNE; |
5740 instr = (instr & ~kOpcodeMask) | opcode; | 5772 instr = (instr & ~kOpcodeMask) | opcode; |
5741 masm_.emit(instr); | 5773 masm_.emit(instr); |
5742 } | 5774 } |
5743 | 5775 |
5744 | 5776 |
5745 } } // namespace v8::internal | 5777 } } // namespace v8::internal |
5746 | 5778 |
5747 #endif // V8_TARGET_ARCH_MIPS | 5779 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |