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

Side by Side Diff: src/x64/stub-cache-x64.cc

Issue 18607002: Format stack layout comments for X64 (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 7 years, 5 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/x64/macro-assembler-x64.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 405 matching lines...) Expand 10 before | Expand all | Expand 10 after
416 __ Move(scratch, Smi::FromInt(0)); 416 __ Move(scratch, Smi::FromInt(0));
417 for (int i = 1; i <= kFastApiCallArguments; i++) { 417 for (int i = 1; i <= kFastApiCallArguments; i++) {
418 __ movq(Operand(rsp, i * kPointerSize), scratch); 418 __ movq(Operand(rsp, i * kPointerSize), scratch);
419 } 419 }
420 } 420 }
421 421
422 422
423 // Undoes the effects of ReserveSpaceForFastApiCall. 423 // Undoes the effects of ReserveSpaceForFastApiCall.
424 static void FreeSpaceForFastApiCall(MacroAssembler* masm, Register scratch) { 424 static void FreeSpaceForFastApiCall(MacroAssembler* masm, Register scratch) {
425 // ----------- S t a t e ------------- 425 // ----------- S t a t e -------------
426 // -- rsp[0] : return address. 426 // -- rsp[0] : return address.
427 // -- rsp[8] : last fast api call extra argument. 427 // -- rsp[8] : last fast api call extra argument.
428 // -- ... 428 // -- ...
429 // -- rsp[kFastApiCallArguments * 8] : first fast api call extra argument. 429 // -- rsp[kFastApiCallArguments * 8] : first fast api call extra
430 // argument.
430 // -- rsp[kFastApiCallArguments * 8 + 8] : last argument in the internal 431 // -- rsp[kFastApiCallArguments * 8 + 8] : last argument in the internal
431 // frame. 432 // frame.
432 // ----------------------------------- 433 // -----------------------------------
433 __ movq(scratch, Operand(rsp, 0)); 434 __ movq(scratch, Operand(rsp, 0));
434 __ movq(Operand(rsp, kFastApiCallArguments * kPointerSize), scratch); 435 __ movq(Operand(rsp, kFastApiCallArguments * kPointerSize), scratch);
435 __ addq(rsp, Immediate(kPointerSize * kFastApiCallArguments)); 436 __ addq(rsp, Immediate(kPointerSize * kFastApiCallArguments));
436 } 437 }
437 438
438 439
439 // Generates call to API function. 440 // Generates call to API function.
(...skipping 2635 matching lines...) Expand 10 before | Expand all | Expand 10 after
3075 // rax: key 3076 // rax: key
3076 // rbx: key as untagged int32 3077 // rbx: key as untagged int32
3077 // rcx: elements 3078 // rcx: elements
3078 __ LoadFromNumberDictionary(&slow, rcx, rax, rbx, r9, rdi, rax); 3079 __ LoadFromNumberDictionary(&slow, rcx, rax, rbx, r9, rdi, rax);
3079 __ ret(0); 3080 __ ret(0);
3080 3081
3081 __ bind(&slow); 3082 __ bind(&slow);
3082 // ----------- S t a t e ------------- 3083 // ----------- S t a t e -------------
3083 // -- rax : key 3084 // -- rax : key
3084 // -- rdx : receiver 3085 // -- rdx : receiver
3085 // -- rsp[0] : return address 3086 // -- rsp[0] : return address
3086 // ----------------------------------- 3087 // -----------------------------------
3087 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Slow); 3088 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Slow);
3088 3089
3089 __ bind(&miss_force_generic); 3090 __ bind(&miss_force_generic);
3090 // ----------- S t a t e ------------- 3091 // ----------- S t a t e -------------
3091 // -- rax : key 3092 // -- rax : key
3092 // -- rdx : receiver 3093 // -- rdx : receiver
3093 // -- rsp[0] : return address 3094 // -- rsp[0] : return address
3094 // ----------------------------------- 3095 // -----------------------------------
3095 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_MissForceGeneric); 3096 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_MissForceGeneric);
3096 } 3097 }
3097 3098
3098 3099
3099 static void GenerateSmiKeyCheck(MacroAssembler* masm, 3100 static void GenerateSmiKeyCheck(MacroAssembler* masm,
3100 Register key, 3101 Register key,
3101 Register scratch, 3102 Register scratch,
3102 XMMRegister xmm_scratch0, 3103 XMMRegister xmm_scratch0,
3103 XMMRegister xmm_scratch1, 3104 XMMRegister xmm_scratch1,
(...skipping 14 matching lines...) Expand all
3118 __ j(parity_even, fail); // NaN. 3119 __ j(parity_even, fail); // NaN.
3119 __ Integer32ToSmi(key, scratch); 3120 __ Integer32ToSmi(key, scratch);
3120 __ bind(&key_ok); 3121 __ bind(&key_ok);
3121 } 3122 }
3122 3123
3123 3124
3124 void KeyedStoreStubCompiler::GenerateStoreExternalArray( 3125 void KeyedStoreStubCompiler::GenerateStoreExternalArray(
3125 MacroAssembler* masm, 3126 MacroAssembler* masm,
3126 ElementsKind elements_kind) { 3127 ElementsKind elements_kind) {
3127 // ----------- S t a t e ------------- 3128 // ----------- S t a t e -------------
3128 // -- rax : value 3129 // -- rax : value
3129 // -- rcx : key 3130 // -- rcx : key
3130 // -- rdx : receiver 3131 // -- rdx : receiver
3131 // -- rsp[0] : return address 3132 // -- rsp[0] : return address
3132 // ----------------------------------- 3133 // -----------------------------------
3133 Label slow, miss_force_generic; 3134 Label slow, miss_force_generic;
3134 3135
3135 // This stub is meant to be tail-jumped to, the receiver must already 3136 // This stub is meant to be tail-jumped to, the receiver must already
3136 // have been verified by the caller to not be a smi. 3137 // have been verified by the caller to not be a smi.
3137 3138
3138 // Check that the key is a smi or a heap number convertible to a smi. 3139 // Check that the key is a smi or a heap number convertible to a smi.
3139 GenerateSmiKeyCheck(masm, rcx, rbx, xmm0, xmm1, &miss_force_generic); 3140 GenerateSmiKeyCheck(masm, rcx, rbx, xmm0, xmm1, &miss_force_generic);
3140 3141
3141 // Check that the index is in range. 3142 // Check that the index is in range.
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
3278 break; 3279 break;
3279 } 3280 }
3280 __ ret(0); 3281 __ ret(0);
3281 } 3282 }
3282 } 3283 }
3283 3284
3284 // Slow case: call runtime. 3285 // Slow case: call runtime.
3285 __ bind(&slow); 3286 __ bind(&slow);
3286 3287
3287 // ----------- S t a t e ------------- 3288 // ----------- S t a t e -------------
3288 // -- rax : value 3289 // -- rax : value
3289 // -- rcx : key 3290 // -- rcx : key
3290 // -- rdx : receiver 3291 // -- rdx : receiver
3291 // -- rsp[0] : return address 3292 // -- rsp[0] : return address
3292 // ----------------------------------- 3293 // -----------------------------------
3293 TailCallBuiltin(masm, Builtins::kKeyedStoreIC_Slow); 3294 TailCallBuiltin(masm, Builtins::kKeyedStoreIC_Slow);
3294 3295
3295 // Miss case: call runtime. 3296 // Miss case: call runtime.
3296 __ bind(&miss_force_generic); 3297 __ bind(&miss_force_generic);
3297 3298
3298 // ----------- S t a t e ------------- 3299 // ----------- S t a t e -------------
3299 // -- rax : value 3300 // -- rax : value
3300 // -- rcx : key 3301 // -- rcx : key
3301 // -- rdx : receiver 3302 // -- rdx : receiver
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
3572 TailCallBuiltin(masm, Builtins::kKeyedStoreIC_Slow); 3573 TailCallBuiltin(masm, Builtins::kKeyedStoreIC_Slow);
3573 } 3574 }
3574 } 3575 }
3575 3576
3576 3577
3577 #undef __ 3578 #undef __
3578 3579
3579 } } // namespace v8::internal 3580 } } // namespace v8::internal
3580 3581
3581 #endif // V8_TARGET_ARCH_X64 3582 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/macro-assembler-x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698