| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 MacroAssembler::MacroAssembler(Isolate* arg_isolate, | 46 MacroAssembler::MacroAssembler(Isolate* arg_isolate, |
| 47 byte * buffer, | 47 byte * buffer, |
| 48 unsigned buffer_size) | 48 unsigned buffer_size) |
| 49 : Assembler(arg_isolate, buffer, buffer_size), | 49 : Assembler(arg_isolate, buffer, buffer_size), |
| 50 generating_stub_(false), | 50 generating_stub_(false), |
| 51 #if DEBUG | 51 #if DEBUG |
| 52 allow_macro_instructions_(true), | 52 allow_macro_instructions_(true), |
| 53 #endif | 53 #endif |
| 54 has_frame_(false), | 54 has_frame_(false), |
| 55 use_real_aborts_(true), | 55 use_real_aborts_(true), |
| 56 sp_(jssp), tmp_list_(ip0, ip1), fptmp_list_(fp_scratch1, fp_scratch2) { | 56 sp_(jssp), |
| 57 tmp_list_(DefaultTmpList()), |
| 58 fptmp_list_(DefaultFPTmpList()) { |
| 57 if (isolate() != NULL) { | 59 if (isolate() != NULL) { |
| 58 code_object_ = Handle<Object>(isolate()->heap()->undefined_value(), | 60 code_object_ = Handle<Object>(isolate()->heap()->undefined_value(), |
| 59 isolate()); | 61 isolate()); |
| 60 } | 62 } |
| 61 } | 63 } |
| 62 | 64 |
| 63 | 65 |
| 66 CPURegList MacroAssembler::DefaultTmpList() { |
| 67 return CPURegList(ip0, ip1); |
| 68 } |
| 69 |
| 70 |
| 71 CPURegList MacroAssembler::DefaultFPTmpList() { |
| 72 return CPURegList(fp_scratch1, fp_scratch2); |
| 73 } |
| 74 |
| 75 |
| 64 void MacroAssembler::LogicalMacro(const Register& rd, | 76 void MacroAssembler::LogicalMacro(const Register& rd, |
| 65 const Register& rn, | 77 const Register& rn, |
| 66 const Operand& operand, | 78 const Operand& operand, |
| 67 LogicalOp op) { | 79 LogicalOp op) { |
| 68 UseScratchRegisterScope temps(this); | 80 UseScratchRegisterScope temps(this); |
| 69 | 81 |
| 70 if (operand.NeedsRelocation()) { | 82 if (operand.NeedsRelocation()) { |
| 71 Register temp = temps.AcquireX(); | 83 Register temp = temps.AcquireX(); |
| 72 LoadRelocated(temp, operand); | 84 LoadRelocated(temp, operand); |
| 73 Logical(rd, rn, temp, op); | 85 Logical(rd, rn, temp, op); |
| (...skipping 4648 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4722 // Abort is used in some contexts where csp is the stack pointer. In order to | 4734 // Abort is used in some contexts where csp is the stack pointer. In order to |
| 4723 // simplify the CallRuntime code, make sure that jssp is the stack pointer. | 4735 // simplify the CallRuntime code, make sure that jssp is the stack pointer. |
| 4724 // There is no risk of register corruption here because Abort doesn't return. | 4736 // There is no risk of register corruption here because Abort doesn't return. |
| 4725 Register old_stack_pointer = StackPointer(); | 4737 Register old_stack_pointer = StackPointer(); |
| 4726 SetStackPointer(jssp); | 4738 SetStackPointer(jssp); |
| 4727 Mov(jssp, old_stack_pointer); | 4739 Mov(jssp, old_stack_pointer); |
| 4728 | 4740 |
| 4729 // We need some scratch registers for the MacroAssembler, so make sure we have | 4741 // We need some scratch registers for the MacroAssembler, so make sure we have |
| 4730 // some. This is safe here because Abort never returns. | 4742 // some. This is safe here because Abort never returns. |
| 4731 RegList old_tmp_list = TmpList()->list(); | 4743 RegList old_tmp_list = TmpList()->list(); |
| 4732 TmpList()->Combine(ip0); | 4744 TmpList()->Combine(MacroAssembler::DefaultTmpList()); |
| 4733 TmpList()->Combine(ip1); | |
| 4734 | 4745 |
| 4735 if (use_real_aborts()) { | 4746 if (use_real_aborts()) { |
| 4736 // Avoid infinite recursion; Push contains some assertions that use Abort. | 4747 // Avoid infinite recursion; Push contains some assertions that use Abort. |
| 4737 NoUseRealAbortsScope no_real_aborts(this); | 4748 NoUseRealAbortsScope no_real_aborts(this); |
| 4738 | 4749 |
| 4739 Mov(x0, Smi::FromInt(reason)); | 4750 Mov(x0, Smi::FromInt(reason)); |
| 4740 Push(x0); | 4751 Push(x0); |
| 4741 | 4752 |
| 4742 if (!has_frame_) { | 4753 if (!has_frame_) { |
| 4743 // We don't actually want to generate a pile of code for this, so just | 4754 // We don't actually want to generate a pile of code for this, so just |
| (...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5230 } | 5241 } |
| 5231 } | 5242 } |
| 5232 | 5243 |
| 5233 | 5244 |
| 5234 #undef __ | 5245 #undef __ |
| 5235 | 5246 |
| 5236 | 5247 |
| 5237 } } // namespace v8::internal | 5248 } } // namespace v8::internal |
| 5238 | 5249 |
| 5239 #endif // V8_TARGET_ARCH_ARM64 | 5250 #endif // V8_TARGET_ARCH_ARM64 |
| OLD | NEW |