| OLD | NEW |
| 1 // Copyright (c) 1994-2006 Sun Microsystems Inc. | 1 // Copyright (c) 1994-2006 Sun Microsystems Inc. |
| 2 // All Rights Reserved. | 2 // All Rights Reserved. |
| 3 // | 3 // |
| 4 // Redistribution and use in source and binary forms, with or without | 4 // Redistribution and use in source and binary forms, with or without |
| 5 // modification, are permitted provided that the following conditions | 5 // modification, are permitted provided that the following conditions |
| 6 // are met: | 6 // are met: |
| 7 // | 7 // |
| 8 // - Redistributions of source code must retain the above copyright notice, | 8 // - Redistributions of source code must retain the above copyright notice, |
| 9 // this list of conditions and the following disclaimer. | 9 // this list of conditions and the following disclaimer. |
| 10 // | 10 // |
| (...skipping 623 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 634 if (!is_uint16(val)) { | 634 if (!is_uint16(val)) { |
| 635 PrintF("val = %" V8PRIdPTR ", 0x%" V8PRIxPTR | 635 PrintF("val = %" V8PRIdPTR ", 0x%" V8PRIxPTR |
| 636 ", is_unsigned_imm16(val)=%d, kImm16Mask=0x%x\n", | 636 ", is_unsigned_imm16(val)=%d, kImm16Mask=0x%x\n", |
| 637 val, val, is_uint16(val), kImm16Mask); | 637 val, val, is_uint16(val), kImm16Mask); |
| 638 } | 638 } |
| 639 CHECK(is_uint16(val)); | 639 CHECK(is_uint16(val)); |
| 640 } | 640 } |
| 641 emit(instr | rt.code() * B21 | ra.code() * B16 | (kImm16Mask & val)); | 641 emit(instr | rt.code() * B21 | ra.code() * B16 | (kImm16Mask & val)); |
| 642 } | 642 } |
| 643 | 643 |
| 644 | |
| 645 void Assembler::xo_form(Instr instr, Register rt, Register ra, Register rb, | 644 void Assembler::xo_form(Instr instr, Register rt, Register ra, Register rb, |
| 646 OEBit o, RCBit r) { | 645 OEBit o, RCBit r) { |
| 647 emit(instr | rt.code() * B21 | ra.code() * B16 | rb.code() * B11 | o | r); | 646 emit(instr | rt.code() * B21 | ra.code() * B16 | rb.code() * B11 | o | r); |
| 648 } | 647 } |
| 649 | 648 |
| 650 void Assembler::md_form(Instr instr, Register ra, Register rs, int shift, | 649 void Assembler::md_form(Instr instr, Register ra, Register rs, int shift, |
| 651 int maskbit, RCBit r) { | 650 int maskbit, RCBit r) { |
| 652 int sh0_4 = shift & 0x1f; | 651 int sh0_4 = shift & 0x1f; |
| 653 int sh5 = (shift >> 5) & 0x1; | 652 int sh5 = (shift >> 5) & 0x1; |
| 654 int m0_4 = maskbit & 0x1f; | 653 int m0_4 = maskbit & 0x1f; |
| (...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1054 int offset = src.offset(); | 1053 int offset = src.offset(); |
| 1055 DCHECK(!src.ra_.is(r0)); | 1054 DCHECK(!src.ra_.is(r0)); |
| 1056 CHECK(!(offset & 3) && is_int16(offset)); | 1055 CHECK(!(offset & 3) && is_int16(offset)); |
| 1057 offset = kImm16Mask & offset; | 1056 offset = kImm16Mask & offset; |
| 1058 emit(LD | dst.code() * B21 | src.ra().code() * B16 | offset | 2); | 1057 emit(LD | dst.code() * B21 | src.ra().code() * B16 | offset | 2); |
| 1059 #else | 1058 #else |
| 1060 lwz(dst, src); | 1059 lwz(dst, src); |
| 1061 #endif | 1060 #endif |
| 1062 } | 1061 } |
| 1063 | 1062 |
| 1064 | |
| 1065 void Assembler::stb(Register dst, const MemOperand& src) { | 1063 void Assembler::stb(Register dst, const MemOperand& src) { |
| 1066 DCHECK(!src.ra_.is(r0)); | 1064 DCHECK(!src.ra_.is(r0)); |
| 1067 d_form(STB, dst, src.ra(), src.offset(), true); | 1065 d_form(STB, dst, src.ra(), src.offset(), true); |
| 1068 } | 1066 } |
| 1069 | 1067 |
| 1070 | 1068 |
| 1071 void Assembler::sth(Register dst, const MemOperand& src) { | 1069 void Assembler::sth(Register dst, const MemOperand& src) { |
| 1072 DCHECK(!src.ra_.is(r0)); | 1070 DCHECK(!src.ra_.is(r0)); |
| 1073 d_form(STH, dst, src.ra(), src.offset(), true); | 1071 d_form(STH, dst, src.ra(), src.offset(), true); |
| 1074 } | 1072 } |
| (...skipping 1062 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2137 } | 2135 } |
| 2138 | 2136 |
| 2139 void PatchingAssembler::FlushICache(Isolate* isolate) { | 2137 void PatchingAssembler::FlushICache(Isolate* isolate) { |
| 2140 Assembler::FlushICache(isolate, buffer_, buffer_size_ - kGap); | 2138 Assembler::FlushICache(isolate, buffer_, buffer_size_ - kGap); |
| 2141 } | 2139 } |
| 2142 | 2140 |
| 2143 } // namespace internal | 2141 } // namespace internal |
| 2144 } // namespace v8 | 2142 } // namespace v8 |
| 2145 | 2143 |
| 2146 #endif // V8_TARGET_ARCH_PPC | 2144 #endif // V8_TARGET_ARCH_PPC |
| OLD | NEW |