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

Side by Side Diff: src/x64/ic-x64.cc

Issue 155132: X64: Use CmpObjectType macro everywhere, fix problem with sign of instance ty... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 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/codegen-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 2009 the V8 project authors. All rights reserved. 1 // Copyright 2009 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 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 205
206 // Move result to rdi and exit the internal frame. 206 // Move result to rdi and exit the internal frame.
207 __ movq(rdi, rax); 207 __ movq(rdi, rax);
208 __ LeaveInternalFrame(); 208 __ LeaveInternalFrame();
209 209
210 // Check if the receiver is a global object of some sort. 210 // Check if the receiver is a global object of some sort.
211 Label invoke, global; 211 Label invoke, global;
212 __ movq(rdx, Operand(rsp, (argc + 1) * kPointerSize)); // receiver 212 __ movq(rdx, Operand(rsp, (argc + 1) * kPointerSize)); // receiver
213 __ testl(rdx, Immediate(kSmiTagMask)); 213 __ testl(rdx, Immediate(kSmiTagMask));
214 __ j(zero, &invoke); 214 __ j(zero, &invoke);
215 __ movq(rcx, FieldOperand(rdx, HeapObject::kMapOffset)); 215 __ CmpObjectType(rdx, JS_GLOBAL_OBJECT_TYPE, rcx);
216 __ movzxbq(rcx, FieldOperand(rcx, Map::kInstanceTypeOffset));
217 __ cmpq(rcx, Immediate(static_cast<int8_t>(JS_GLOBAL_OBJECT_TYPE)));
218 __ j(equal, &global); 216 __ j(equal, &global);
219 __ cmpq(rcx, Immediate(static_cast<int8_t>(JS_BUILTINS_OBJECT_TYPE))); 217 __ CmpInstanceType(rcx, JS_BUILTINS_OBJECT_TYPE);
220 __ j(not_equal, &invoke); 218 __ j(not_equal, &invoke);
Lasse Reichstein 2009/07/07 09:39:36 Doesn't this do two loads of the instance type byt
William Hesse 2009/07/08 07:53:43 Yes, but only as two identical Operands. I don't
221 219
222 // Patch the receiver on the stack. 220 // Patch the receiver on the stack.
223 __ bind(&global); 221 __ bind(&global);
224 __ movq(rdx, FieldOperand(rdx, GlobalObject::kGlobalReceiverOffset)); 222 __ movq(rdx, FieldOperand(rdx, GlobalObject::kGlobalReceiverOffset));
225 __ movq(Operand(rsp, (argc + 1) * kPointerSize), rdx); 223 __ movq(Operand(rsp, (argc + 1) * kPointerSize), rdx);
226 224
227 // Invoke the function. 225 // Invoke the function.
228 ParameterCount actual(argc); 226 ParameterCount actual(argc);
229 __ bind(&invoke); 227 __ bind(&invoke);
230 __ InvokeFunction(rdi, actual, JUMP_FUNCTION); 228 __ InvokeFunction(rdi, actual, JUMP_FUNCTION);
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
328 void StoreIC::GenerateMegamorphic(MacroAssembler* masm) { 326 void StoreIC::GenerateMegamorphic(MacroAssembler* masm) {
329 masm->int3(); // UNIMPLEMENTED. 327 masm->int3(); // UNIMPLEMENTED.
330 masm->movq(kScratchRegister, Immediate(0xCBAB)); // Debugging aid. 328 masm->movq(kScratchRegister, Immediate(0xCBAB)); // Debugging aid.
331 } 329 }
332 330
333 331
334 #undef __ 332 #undef __
335 333
336 334
337 } } // namespace v8::internal 335 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/x64/codegen-x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698