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 2624 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2635 lbu(scratch, MemOperand(src)); | 2635 lbu(scratch, MemOperand(src)); |
2636 Addu(src, src, 1); | 2636 Addu(src, src, 1); |
2637 sb(scratch, MemOperand(dst)); | 2637 sb(scratch, MemOperand(dst)); |
2638 Addu(dst, dst, 1); | 2638 Addu(dst, dst, 1); |
2639 Subu(length, length, Operand(1)); | 2639 Subu(length, length, Operand(1)); |
2640 Branch(&byte_loop_1, ne, length, Operand(zero_reg)); | 2640 Branch(&byte_loop_1, ne, length, Operand(zero_reg)); |
2641 bind(&done); | 2641 bind(&done); |
2642 } | 2642 } |
2643 | 2643 |
2644 | 2644 |
| 2645 void MacroAssembler::CheckFastElements(Register map, |
| 2646 Register scratch, |
| 2647 Label* fail) { |
| 2648 STATIC_ASSERT(JSObject::FAST_ELEMENTS == 0); |
| 2649 lbu(scratch, FieldMemOperand(map, Map::kBitField2Offset)); |
| 2650 And(scratch, scratch, Operand(Map::kMaximumBitField2FastElementValue)); |
| 2651 Branch(fail, hi, scratch, Operand(zero_reg)); |
| 2652 } |
| 2653 |
| 2654 |
2645 void MacroAssembler::CheckMap(Register obj, | 2655 void MacroAssembler::CheckMap(Register obj, |
2646 Register scratch, | 2656 Register scratch, |
2647 Handle<Map> map, | 2657 Handle<Map> map, |
2648 Label* fail, | 2658 Label* fail, |
2649 SmiCheckType smi_check_type) { | 2659 SmiCheckType smi_check_type) { |
2650 if (smi_check_type == DO_SMI_CHECK) { | 2660 if (smi_check_type == DO_SMI_CHECK) { |
2651 JumpIfSmi(obj, fail); | 2661 JumpIfSmi(obj, fail); |
2652 } | 2662 } |
2653 lw(scratch, FieldMemOperand(obj, HeapObject::kMapOffset)); | 2663 lw(scratch, FieldMemOperand(obj, HeapObject::kMapOffset)); |
2654 li(at, Operand(map)); | 2664 li(at, Operand(map)); |
(...skipping 1432 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4087 opcode == BGTZL); | 4097 opcode == BGTZL); |
4088 opcode = (cond == eq) ? BEQ : BNE; | 4098 opcode = (cond == eq) ? BEQ : BNE; |
4089 instr = (instr & ~kOpcodeMask) | opcode; | 4099 instr = (instr & ~kOpcodeMask) | opcode; |
4090 masm_.emit(instr); | 4100 masm_.emit(instr); |
4091 } | 4101 } |
4092 | 4102 |
4093 | 4103 |
4094 } } // namespace v8::internal | 4104 } } // namespace v8::internal |
4095 | 4105 |
4096 #endif // V8_TARGET_ARCH_MIPS | 4106 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |