| 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 3065 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3076 // In 0-255 range, round and truncate. | 3076 // In 0-255 range, round and truncate. |
| 3077 bind(&in_bounds); | 3077 bind(&in_bounds); |
| 3078 vmov(temp_double_reg, 0.5); | 3078 vmov(temp_double_reg, 0.5); |
| 3079 vadd(temp_double_reg, input_reg, temp_double_reg); | 3079 vadd(temp_double_reg, input_reg, temp_double_reg); |
| 3080 vcvt_u32_f64(s0, temp_double_reg); | 3080 vcvt_u32_f64(s0, temp_double_reg); |
| 3081 vmov(result_reg, s0); | 3081 vmov(result_reg, s0); |
| 3082 bind(&done); | 3082 bind(&done); |
| 3083 } | 3083 } |
| 3084 | 3084 |
| 3085 | 3085 |
| 3086 void MacroAssembler::LoadInstanceDescriptors(Register map, |
| 3087 Register descriptors) { |
| 3088 ldr(descriptors, |
| 3089 FieldMemOperand(map, Map::kInstanceDescriptorsOrBitField3Offset)); |
| 3090 Label not_smi; |
| 3091 JumpIfNotSmi(descriptors, ¬_smi); |
| 3092 mov(descriptors, Operand(FACTORY->empty_descriptor_array())); |
| 3093 bind(¬_smi); |
| 3094 } |
| 3095 |
| 3096 |
| 3086 CodePatcher::CodePatcher(byte* address, int instructions) | 3097 CodePatcher::CodePatcher(byte* address, int instructions) |
| 3087 : address_(address), | 3098 : address_(address), |
| 3088 instructions_(instructions), | 3099 instructions_(instructions), |
| 3089 size_(instructions * Assembler::kInstrSize), | 3100 size_(instructions * Assembler::kInstrSize), |
| 3090 masm_(Isolate::Current(), address, size_ + Assembler::kGap) { | 3101 masm_(Isolate::Current(), address, size_ + Assembler::kGap) { |
| 3091 // Create a new macro assembler pointing to the address of the code to patch. | 3102 // Create a new macro assembler pointing to the address of the code to patch. |
| 3092 // The size is adjusted with kGap on order for the assembler to generate size | 3103 // The size is adjusted with kGap on order for the assembler to generate size |
| 3093 // bytes of instructions without failing with buffer size constraints. | 3104 // bytes of instructions without failing with buffer size constraints. |
| 3094 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); | 3105 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); |
| 3095 } | 3106 } |
| (...skipping 22 matching lines...) Expand all Loading... |
| 3118 void CodePatcher::EmitCondition(Condition cond) { | 3129 void CodePatcher::EmitCondition(Condition cond) { |
| 3119 Instr instr = Assembler::instr_at(masm_.pc_); | 3130 Instr instr = Assembler::instr_at(masm_.pc_); |
| 3120 instr = (instr & ~kCondMask) | cond; | 3131 instr = (instr & ~kCondMask) | cond; |
| 3121 masm_.emit(instr); | 3132 masm_.emit(instr); |
| 3122 } | 3133 } |
| 3123 | 3134 |
| 3124 | 3135 |
| 3125 } } // namespace v8::internal | 3136 } } // namespace v8::internal |
| 3126 | 3137 |
| 3127 #endif // V8_TARGET_ARCH_ARM | 3138 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |