| 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 869 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 // Check CPU flags for number of registers, setting the Z condition flag. | 887 // Check CPU flags for number of registers, setting the Z condition flag. |
| 888 CheckFor32DRegs(ip); | 888 CheckFor32DRegs(ip); |
| 889 | 889 |
| 890 // Push registers d0-d15, and possibly d16-d31, on the stack. |
| 891 // If d16-d31 are not pushed, decrease the stack pointer instead. |
| 890 vstm(db_w, sp, d16, d31, ne); | 892 vstm(db_w, sp, d16, d31, ne); |
| 891 sub(sp, sp, Operand(16 * kDoubleSize), LeaveCC, eq); | 893 sub(sp, sp, Operand(16 * kDoubleSize), LeaveCC, eq); |
| 892 vstm(db_w, sp, d0, d15); | 894 vstm(db_w, sp, d0, d15); |
| 893 // Note that d0 will be accessible at | 895 // Note that d0 will be accessible at |
| 894 // fp - 2 * kPointerSize - DwVfpRegister::kNumRegisters * kDoubleSize, | 896 // fp - 2 * kPointerSize - DwVfpRegister::kNumRegisters * kDoubleSize, |
| 895 // since the sp slot and code slot were pushed after the fp. | 897 // since the sp slot and code slot were pushed after the fp. |
| 896 } | 898 } |
| 897 | 899 |
| 898 // Reserve place for the return address and stack space and align the frame | 900 // Reserve place for the return address and stack space and align the frame |
| 899 // preparing for calling the runtime function. | 901 // preparing for calling the runtime function. |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 946 Register argument_count) { | 948 Register argument_count) { |
| 947 // Optionally restore all double registers. | 949 // Optionally restore all double registers. |
| 948 if (save_doubles) { | 950 if (save_doubles) { |
| 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 |
| 958 // Pop registers d0-d15, and possibly d16-d31, from r3. |
| 959 // If d16-d31 are not popped, increase r3 instead. |
| 956 vldm(ia_w, r3, d0, d15); | 960 vldm(ia_w, r3, d0, d15); |
| 957 vldm(ia_w, r3, d16, d31, ne); | 961 vldm(ia_w, r3, d16, d31, ne); |
| 958 add(r3, r3, Operand(16 * kDoubleSize), LeaveCC, eq); | 962 add(r3, r3, Operand(16 * kDoubleSize), LeaveCC, eq); |
| 959 } | 963 } |
| 960 | 964 |
| 961 // Clear top frame. | 965 // Clear top frame. |
| 962 mov(r3, Operand::Zero()); | 966 mov(r3, Operand::Zero()); |
| 963 mov(ip, Operand(ExternalReference(Isolate::kCEntryFPAddress, isolate()))); | 967 mov(ip, Operand(ExternalReference(Isolate::kCEntryFPAddress, isolate()))); |
| 964 str(r3, MemOperand(ip)); | 968 str(r3, MemOperand(ip)); |
| 965 | 969 |
| (...skipping 3015 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3981 void CodePatcher::EmitCondition(Condition cond) { | 3985 void CodePatcher::EmitCondition(Condition cond) { |
| 3982 Instr instr = Assembler::instr_at(masm_.pc_); | 3986 Instr instr = Assembler::instr_at(masm_.pc_); |
| 3983 instr = (instr & ~kCondMask) | cond; | 3987 instr = (instr & ~kCondMask) | cond; |
| 3984 masm_.emit(instr); | 3988 masm_.emit(instr); |
| 3985 } | 3989 } |
| 3986 | 3990 |
| 3987 | 3991 |
| 3988 } } // namespace v8::internal | 3992 } } // namespace v8::internal |
| 3989 | 3993 |
| 3990 #endif // V8_TARGET_ARCH_ARM | 3994 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |