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

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

Issue 204293004: A64: Remove Operand constructors where an implicit constructor can be used. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 9 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/a64/regexp-macro-assembler-a64.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 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 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 uintptr_t map_off_addr = reinterpret_cast<uintptr_t>(map_offset.address()); 118 uintptr_t map_off_addr = reinterpret_cast<uintptr_t>(map_offset.address());
119 119
120 Label miss; 120 Label miss;
121 121
122 ASSERT(!AreAliased(name, offset, scratch, scratch2, scratch3)); 122 ASSERT(!AreAliased(name, offset, scratch, scratch2, scratch3));
123 123
124 // Multiply by 3 because there are 3 fields per entry. 124 // Multiply by 3 because there are 3 fields per entry.
125 __ Add(scratch3, offset, Operand(offset, LSL, 1)); 125 __ Add(scratch3, offset, Operand(offset, LSL, 1));
126 126
127 // Calculate the base address of the entry. 127 // Calculate the base address of the entry.
128 __ Mov(scratch, Operand(key_offset)); 128 __ Mov(scratch, key_offset);
129 __ Add(scratch, scratch, Operand(scratch3, LSL, kPointerSizeLog2)); 129 __ Add(scratch, scratch, Operand(scratch3, LSL, kPointerSizeLog2));
130 130
131 // Check that the key in the entry matches the name. 131 // Check that the key in the entry matches the name.
132 __ Ldr(scratch2, MemOperand(scratch)); 132 __ Ldr(scratch2, MemOperand(scratch));
133 __ Cmp(name, scratch2); 133 __ Cmp(name, scratch2);
134 __ B(ne, &miss); 134 __ B(ne, &miss);
135 135
136 // Check the map matches. 136 // Check the map matches.
137 __ Ldr(scratch2, MemOperand(scratch, map_off_addr - key_off_addr)); 137 __ Ldr(scratch2, MemOperand(scratch, map_off_addr - key_off_addr));
138 __ Ldr(scratch3, FieldMemOperand(receiver, HeapObject::kMapOffset)); 138 __ Ldr(scratch3, FieldMemOperand(receiver, HeapObject::kMapOffset));
(...skipping 615 matching lines...) Expand 10 before | Expand all | Expand 10 after
754 } else { 754 } else {
755 __ LoadObject(call_data, call_data_obj); 755 __ LoadObject(call_data, call_data_obj);
756 } 756 }
757 757
758 // Put api_function_address in place. 758 // Put api_function_address in place.
759 Address function_address = v8::ToCData<Address>(api_call_info->callback()); 759 Address function_address = v8::ToCData<Address>(api_call_info->callback());
760 ApiFunction fun(function_address); 760 ApiFunction fun(function_address);
761 ExternalReference ref = ExternalReference(&fun, 761 ExternalReference ref = ExternalReference(&fun,
762 ExternalReference::DIRECT_API_CALL, 762 ExternalReference::DIRECT_API_CALL,
763 masm->isolate()); 763 masm->isolate());
764 __ Mov(api_function_address, Operand(ref)); 764 __ Mov(api_function_address, ref);
765 765
766 // Jump to stub. 766 // Jump to stub.
767 CallApiFunctionStub stub(is_store, call_data_undefined, argc); 767 CallApiFunctionStub stub(is_store, call_data_undefined, argc);
768 __ TailCallStub(&stub); 768 __ TailCallStub(&stub);
769 } 769 }
770 770
771 771
772 void StubCompiler::GenerateTailCall(MacroAssembler* masm, Handle<Code> code) { 772 void StubCompiler::GenerateTailCall(MacroAssembler* masm, Handle<Code> code) {
773 __ Jump(code, RelocInfo::CODE_TARGET); 773 __ Jump(code, RelocInfo::CODE_TARGET);
774 } 774 }
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
1015 __ Mov(scratch3(), Operand(callback)); 1015 __ Mov(scratch3(), Operand(callback));
1016 __ Ldr(scratch3(), FieldMemOperand(scratch3(), 1016 __ Ldr(scratch3(), FieldMemOperand(scratch3(),
1017 ExecutableAccessorInfo::kDataOffset)); 1017 ExecutableAccessorInfo::kDataOffset));
1018 } else { 1018 } else {
1019 __ Mov(scratch3(), Operand(Handle<Object>(callback->data(), isolate()))); 1019 __ Mov(scratch3(), Operand(Handle<Object>(callback->data(), isolate())));
1020 } 1020 }
1021 // TODO(jbramley): Find another scratch register and combine the pushes 1021 // TODO(jbramley): Find another scratch register and combine the pushes
1022 // together. Can we use scratch1() here? 1022 // together. Can we use scratch1() here?
1023 __ LoadRoot(scratch4(), Heap::kUndefinedValueRootIndex); 1023 __ LoadRoot(scratch4(), Heap::kUndefinedValueRootIndex);
1024 __ Push(scratch3(), scratch4()); 1024 __ Push(scratch3(), scratch4());
1025 __ Mov(scratch3(), Operand(ExternalReference::isolate_address(isolate()))); 1025 __ Mov(scratch3(), ExternalReference::isolate_address(isolate()));
1026 __ Push(scratch4(), scratch3(), reg, name()); 1026 __ Push(scratch4(), scratch3(), reg, name());
1027 1027
1028 Register args_addr = scratch2(); 1028 Register args_addr = scratch2();
1029 __ Add(args_addr, __ StackPointer(), kPointerSize); 1029 __ Add(args_addr, __ StackPointer(), kPointerSize);
1030 1030
1031 // Stack at this point: 1031 // Stack at this point:
1032 // sp[40] callback data 1032 // sp[40] callback data
1033 // sp[32] undefined 1033 // sp[32] undefined
1034 // sp[24] undefined 1034 // sp[24] undefined
1035 // sp[16] isolate 1035 // sp[16] isolate
1036 // args_addr -> sp[8] reg 1036 // args_addr -> sp[8] reg
1037 // sp[0] name 1037 // sp[0] name
1038 1038
1039 // Abi for CallApiGetter. 1039 // Abi for CallApiGetter.
1040 Register getter_address_reg = x2; 1040 Register getter_address_reg = x2;
1041 1041
1042 // Set up the call. 1042 // Set up the call.
1043 Address getter_address = v8::ToCData<Address>(callback->getter()); 1043 Address getter_address = v8::ToCData<Address>(callback->getter());
1044 ApiFunction fun(getter_address); 1044 ApiFunction fun(getter_address);
1045 ExternalReference::Type type = ExternalReference::DIRECT_GETTER_CALL; 1045 ExternalReference::Type type = ExternalReference::DIRECT_GETTER_CALL;
1046 ExternalReference ref = ExternalReference(&fun, type, isolate()); 1046 ExternalReference ref = ExternalReference(&fun, type, isolate());
1047 __ Mov(getter_address_reg, Operand(ref)); 1047 __ Mov(getter_address_reg, ref);
1048 1048
1049 CallApiGetterStub stub; 1049 CallApiGetterStub stub;
1050 __ TailCallStub(&stub); 1050 __ TailCallStub(&stub);
1051 } 1051 }
1052 1052
1053 1053
1054 void LoadStubCompiler::GenerateLoadInterceptor( 1054 void LoadStubCompiler::GenerateLoadInterceptor(
1055 Register holder_reg, 1055 Register holder_reg,
1056 Handle<Object> object, 1056 Handle<Object> object,
1057 Handle<JSObject> interceptor_holder, 1057 Handle<JSObject> interceptor_holder,
(...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after
1499 1499
1500 // Miss case, call the runtime. 1500 // Miss case, call the runtime.
1501 __ Bind(&miss); 1501 __ Bind(&miss);
1502 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); 1502 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss);
1503 } 1503 }
1504 1504
1505 1505
1506 } } // namespace v8::internal 1506 } } // namespace v8::internal
1507 1507
1508 #endif // V8_TARGET_ARCH_A64 1508 #endif // V8_TARGET_ARCH_A64
OLDNEW
« no previous file with comments | « src/a64/regexp-macro-assembler-a64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698