Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(169)

Side by Side Diff: src/arm64/code-stubs-arm64.cc

Issue 233373002: ARM64: Preserve x8 and x9 when necessary. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/arm64/code-stubs-arm64.h ('k') | src/arm64/macro-assembler-arm64.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1077 matching lines...) Expand 10 before | Expand all | Expand 10 after
1088 // Call the native; it returns -1 (less), 0 (equal), or 1 (greater) 1088 // Call the native; it returns -1 (less), 0 (equal), or 1 (greater)
1089 // tagged as a small integer. 1089 // tagged as a small integer.
1090 __ InvokeBuiltin(native, JUMP_FUNCTION); 1090 __ InvokeBuiltin(native, JUMP_FUNCTION);
1091 1091
1092 __ Bind(&miss); 1092 __ Bind(&miss);
1093 GenerateMiss(masm); 1093 GenerateMiss(masm);
1094 } 1094 }
1095 1095
1096 1096
1097 void StoreBufferOverflowStub::Generate(MacroAssembler* masm) { 1097 void StoreBufferOverflowStub::Generate(MacroAssembler* masm) {
1098 // Preserve caller-saved registers x0-x7 and x10-x15. We don't care if x8, x9,
1099 // ip0 and ip1 are corrupted by the call into C.
1100 CPURegList saved_regs = kCallerSaved; 1098 CPURegList saved_regs = kCallerSaved;
1101 saved_regs.Remove(ip0); 1099 CPURegList saved_fp_regs = kCallerSavedFP;
1102 saved_regs.Remove(ip1);
1103 saved_regs.Remove(x8);
1104 saved_regs.Remove(x9);
1105 1100
1106 // We don't allow a GC during a store buffer overflow so there is no need to 1101 // We don't allow a GC during a store buffer overflow so there is no need to
1107 // store the registers in any particular way, but we do have to store and 1102 // store the registers in any particular way, but we do have to store and
1108 // restore them. 1103 // restore them.
1104
1105 // We don't care if MacroAssembler scratch registers are corrupted.
1106 saved_regs.Remove(*(masm->TmpList()));
1107 saved_fp_regs.Remove(*(masm->FPTmpList()));
1108
1109 __ PushCPURegList(saved_regs); 1109 __ PushCPURegList(saved_regs);
1110 if (save_doubles_ == kSaveFPRegs) { 1110 if (save_doubles_ == kSaveFPRegs) {
1111 __ PushCPURegList(kCallerSavedFP); 1111 __ PushCPURegList(saved_fp_regs);
1112 } 1112 }
1113 1113
1114 AllowExternalCallThatCantCauseGC scope(masm); 1114 AllowExternalCallThatCantCauseGC scope(masm);
1115 __ Mov(x0, ExternalReference::isolate_address(masm->isolate())); 1115 __ Mov(x0, ExternalReference::isolate_address(masm->isolate()));
1116 __ CallCFunction( 1116 __ CallCFunction(
1117 ExternalReference::store_buffer_overflow_function(masm->isolate()), 1117 ExternalReference::store_buffer_overflow_function(masm->isolate()),
1118 1, 0); 1118 1, 0);
1119 1119
1120 if (save_doubles_ == kSaveFPRegs) { 1120 if (save_doubles_ == kSaveFPRegs) {
1121 __ PopCPURegList(kCallerSavedFP); 1121 __ PopCPURegList(saved_fp_regs);
1122 } 1122 }
1123 __ PopCPURegList(saved_regs); 1123 __ PopCPURegList(saved_regs);
1124 __ Ret(); 1124 __ Ret();
1125 } 1125 }
1126 1126
1127 1127
1128 void StoreBufferOverflowStub::GenerateFixedRegStubsAheadOfTime( 1128 void StoreBufferOverflowStub::GenerateFixedRegStubsAheadOfTime(
1129 Isolate* isolate) { 1129 Isolate* isolate) {
1130 StoreBufferOverflowStub stub1(kDontSaveFPRegs); 1130 StoreBufferOverflowStub stub1(kDontSaveFPRegs);
1131 stub1.GetCode(isolate); 1131 stub1.GetCode(isolate);
(...skipping 4601 matching lines...) Expand 10 before | Expand all | Expand 10 after
5733 MemOperand(fp, 6 * kPointerSize), 5733 MemOperand(fp, 6 * kPointerSize),
5734 NULL); 5734 NULL);
5735 } 5735 }
5736 5736
5737 5737
5738 #undef __ 5738 #undef __
5739 5739
5740 } } // namespace v8::internal 5740 } } // namespace v8::internal
5741 5741
5742 #endif // V8_TARGET_ARCH_ARM64 5742 #endif // V8_TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « src/arm64/code-stubs-arm64.h ('k') | src/arm64/macro-assembler-arm64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698