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

Side by Side Diff: src/x64/lithium-codegen-x64.cc

Issue 219043003: Use sarq on x64 (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 | « no previous file | 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 5590 matching lines...) Expand 10 before | Expand all | Expand 10 after
5601 }; 5601 };
5602 5602
5603 Register object = ToRegister(instr->object()); 5603 Register object = ToRegister(instr->object());
5604 Register index = ToRegister(instr->index()); 5604 Register index = ToRegister(instr->index());
5605 5605
5606 DeferredLoadMutableDouble* deferred; 5606 DeferredLoadMutableDouble* deferred;
5607 deferred = new(zone()) DeferredLoadMutableDouble(this, instr, object, index); 5607 deferred = new(zone()) DeferredLoadMutableDouble(this, instr, object, index);
5608 5608
5609 Label out_of_object, done; 5609 Label out_of_object, done;
5610 __ Move(kScratchRegister, Smi::FromInt(1)); 5610 __ Move(kScratchRegister, Smi::FromInt(1));
5611 __ testq(index, kScratchRegister); 5611 __ testp(index, kScratchRegister);
5612 __ j(not_zero, deferred->entry()); 5612 __ j(not_zero, deferred->entry());
5613 5613
5614 __ sar(index, Immediate(1)); 5614 __ sarp(index, Immediate(1));
5615 5615
5616 __ SmiToInteger32(index, index); 5616 __ SmiToInteger32(index, index);
5617 __ cmpl(index, Immediate(0)); 5617 __ cmpl(index, Immediate(0));
5618 __ j(less, &out_of_object, Label::kNear); 5618 __ j(less, &out_of_object, Label::kNear);
5619 __ movp(object, FieldOperand(object, 5619 __ movp(object, FieldOperand(object,
5620 index, 5620 index,
5621 times_pointer_size, 5621 times_pointer_size,
5622 JSObject::kHeaderSize)); 5622 JSObject::kHeaderSize));
5623 __ jmp(&done, Label::kNear); 5623 __ jmp(&done, Label::kNear);
5624 5624
5625 __ bind(&out_of_object); 5625 __ bind(&out_of_object);
5626 __ movp(object, FieldOperand(object, JSObject::kPropertiesOffset)); 5626 __ movp(object, FieldOperand(object, JSObject::kPropertiesOffset));
5627 __ negl(index); 5627 __ negl(index);
5628 // Index is now equal to out of object property index plus 1. 5628 // Index is now equal to out of object property index plus 1.
5629 __ movp(object, FieldOperand(object, 5629 __ movp(object, FieldOperand(object,
5630 index, 5630 index,
5631 times_pointer_size, 5631 times_pointer_size,
5632 FixedArray::kHeaderSize - kPointerSize)); 5632 FixedArray::kHeaderSize - kPointerSize));
5633 __ bind(deferred->exit()); 5633 __ bind(deferred->exit());
5634 __ bind(&done); 5634 __ bind(&done);
5635 } 5635 }
5636 5636
5637 5637
5638 #undef __ 5638 #undef __
5639 5639
5640 } } // namespace v8::internal 5640 } } // namespace v8::internal
5641 5641
5642 #endif // V8_TARGET_ARCH_X64 5642 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698