| 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 866 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 877 str(ip, MemOperand(fp, ExitFrameConstants::kCodeOffset)); | 877 str(ip, MemOperand(fp, ExitFrameConstants::kCodeOffset)); |
| 878 | 878 |
| 879 // Save the frame pointer and the context in top. | 879 // Save the frame pointer and the context in top. |
| 880 mov(ip, Operand(ExternalReference(Isolate::kCEntryFPAddress, isolate()))); | 880 mov(ip, Operand(ExternalReference(Isolate::kCEntryFPAddress, isolate()))); |
| 881 str(fp, MemOperand(ip)); | 881 str(fp, MemOperand(ip)); |
| 882 mov(ip, Operand(ExternalReference(Isolate::kContextAddress, isolate()))); | 882 mov(ip, Operand(ExternalReference(Isolate::kContextAddress, isolate()))); |
| 883 str(cp, MemOperand(ip)); | 883 str(cp, MemOperand(ip)); |
| 884 | 884 |
| 885 // Optionally save all double registers. | 885 // Optionally save all double registers. |
| 886 if (save_doubles) { | 886 if (save_doubles) { |
| 887 CpuFeatures::Scope scope(VFP2); |
| 887 // Check CPU flags for number of registers, setting the Z condition flag. | 888 // Check CPU flags for number of registers, setting the Z condition flag. |
| 888 CheckFor32DRegs(ip); | 889 CheckFor32DRegs(ip); |
| 889 | 890 |
| 890 vstm(db_w, sp, d16, d31, ne); | 891 vstm(db_w, sp, d16, d31, ne); |
| 891 sub(sp, sp, Operand(16 * kDoubleSize), LeaveCC, eq); | 892 sub(sp, sp, Operand(16 * kDoubleSize), LeaveCC, eq); |
| 892 vstm(db_w, sp, d0, d15); | 893 vstm(db_w, sp, d0, d15); |
| 893 // Note that d0 will be accessible at | 894 // Note that d0 will be accessible at |
| 894 // fp - 2 * kPointerSize - DwVfpRegister::kNumRegisters * kDoubleSize, | 895 // fp - 2 * kPointerSize - DwVfpRegister::kNumRegisters * kDoubleSize, |
| 895 // since the sp slot and code slot were pushed after the fp. | 896 // since the sp slot and code slot were pushed after the fp. |
| 896 } | 897 } |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 939 // flag. | 940 // flag. |
| 940 return FLAG_sim_stack_alignment; | 941 return FLAG_sim_stack_alignment; |
| 941 #endif // defined(V8_HOST_ARCH_ARM) | 942 #endif // defined(V8_HOST_ARCH_ARM) |
| 942 } | 943 } |
| 943 | 944 |
| 944 | 945 |
| 945 void MacroAssembler::LeaveExitFrame(bool save_doubles, | 946 void MacroAssembler::LeaveExitFrame(bool save_doubles, |
| 946 Register argument_count) { | 947 Register argument_count) { |
| 947 // Optionally restore all double registers. | 948 // Optionally restore all double registers. |
| 948 if (save_doubles) { | 949 if (save_doubles) { |
| 950 CpuFeatures::Scope scope(VFP2); |
| 949 // Calculate the stack location of the saved doubles and restore them. | 951 // Calculate the stack location of the saved doubles and restore them. |
| 950 const int offset = 2 * kPointerSize; | 952 const int offset = 2 * kPointerSize; |
| 951 sub(r3, fp, Operand(offset + DwVfpRegister::kNumRegisters * kDoubleSize)); | 953 sub(r3, fp, Operand(offset + DwVfpRegister::kNumRegisters * kDoubleSize)); |
| 952 | 954 |
| 953 // Check CPU flags for number of registers, setting the Z condition flag. | 955 // Check CPU flags for number of registers, setting the Z condition flag. |
| 954 CheckFor32DRegs(ip); | 956 CheckFor32DRegs(ip); |
| 955 | 957 |
| 956 vldm(ia_w, r3, d0, d15); | 958 vldm(ia_w, r3, d0, d15); |
| 957 vldm(ia_w, r3, d16, d31, ne); | 959 vldm(ia_w, r3, d16, d31, ne); |
| 958 add(r3, r3, Operand(16 * kDoubleSize), LeaveCC, eq); | 960 add(r3, r3, Operand(16 * kDoubleSize), LeaveCC, eq); |
| (...skipping 2933 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3892 b(ne, call_runtime); | 3894 b(ne, call_runtime); |
| 3893 | 3895 |
| 3894 ldr(r2, FieldMemOperand(r1, Map::kPrototypeOffset)); | 3896 ldr(r2, FieldMemOperand(r1, Map::kPrototypeOffset)); |
| 3895 cmp(r2, null_value); | 3897 cmp(r2, null_value); |
| 3896 b(ne, &next); | 3898 b(ne, &next); |
| 3897 } | 3899 } |
| 3898 | 3900 |
| 3899 | 3901 |
| 3900 void MacroAssembler::TestJSArrayForAllocationSiteInfo( | 3902 void MacroAssembler::TestJSArrayForAllocationSiteInfo( |
| 3901 Register receiver_reg, | 3903 Register receiver_reg, |
| 3902 Register scratch_reg, | 3904 Register scratch_reg) { |
| 3903 Label* allocation_info_present) { | |
| 3904 Label no_info_available; | 3905 Label no_info_available; |
| 3905 ExternalReference new_space_start = | 3906 ExternalReference new_space_start = |
| 3906 ExternalReference::new_space_start(isolate()); | 3907 ExternalReference::new_space_start(isolate()); |
| 3907 ExternalReference new_space_allocation_top = | 3908 ExternalReference new_space_allocation_top = |
| 3908 ExternalReference::new_space_allocation_top_address(isolate()); | 3909 ExternalReference::new_space_allocation_top_address(isolate()); |
| 3909 add(scratch_reg, receiver_reg, | 3910 add(scratch_reg, receiver_reg, |
| 3910 Operand(JSArray::kSize + AllocationSiteInfo::kSize - kHeapObjectTag)); | 3911 Operand(JSArray::kSize + AllocationSiteInfo::kSize - kHeapObjectTag)); |
| 3911 cmp(scratch_reg, Operand(new_space_start)); | 3912 cmp(scratch_reg, Operand(new_space_start)); |
| 3912 b(lt, &no_info_available); | 3913 b(lt, &no_info_available); |
| 3913 mov(ip, Operand(new_space_allocation_top)); | 3914 mov(ip, Operand(new_space_allocation_top)); |
| 3914 ldr(ip, MemOperand(ip)); | 3915 ldr(ip, MemOperand(ip)); |
| 3915 cmp(scratch_reg, ip); | 3916 cmp(scratch_reg, ip); |
| 3916 b(gt, &no_info_available); | 3917 b(gt, &no_info_available); |
| 3917 ldr(scratch_reg, MemOperand(scratch_reg, -AllocationSiteInfo::kSize)); | 3918 ldr(scratch_reg, MemOperand(scratch_reg, -AllocationSiteInfo::kSize)); |
| 3918 cmp(scratch_reg, | 3919 cmp(scratch_reg, |
| 3919 Operand(Handle<Map>(isolate()->heap()->allocation_site_info_map()))); | 3920 Operand(Handle<Map>(isolate()->heap()->allocation_site_info_map()))); |
| 3920 b(eq, allocation_info_present); | |
| 3921 bind(&no_info_available); | 3921 bind(&no_info_available); |
| 3922 } | 3922 } |
| 3923 | 3923 |
| 3924 | 3924 |
| 3925 #ifdef DEBUG | 3925 #ifdef DEBUG |
| 3926 bool AreAliased(Register reg1, | 3926 bool AreAliased(Register reg1, |
| 3927 Register reg2, | 3927 Register reg2, |
| 3928 Register reg3, | 3928 Register reg3, |
| 3929 Register reg4, | 3929 Register reg4, |
| 3930 Register reg5, | 3930 Register reg5, |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3981 void CodePatcher::EmitCondition(Condition cond) { | 3981 void CodePatcher::EmitCondition(Condition cond) { |
| 3982 Instr instr = Assembler::instr_at(masm_.pc_); | 3982 Instr instr = Assembler::instr_at(masm_.pc_); |
| 3983 instr = (instr & ~kCondMask) | cond; | 3983 instr = (instr & ~kCondMask) | cond; |
| 3984 masm_.emit(instr); | 3984 masm_.emit(instr); |
| 3985 } | 3985 } |
| 3986 | 3986 |
| 3987 | 3987 |
| 3988 } } // namespace v8::internal | 3988 } } // namespace v8::internal |
| 3989 | 3989 |
| 3990 #endif // V8_TARGET_ARCH_ARM | 3990 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |