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

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

Issue 391073: Changes to Intel shift functions... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 1 month 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
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 309 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 // Check if the object is a string leaving the instance type in the 320 // Check if the object is a string leaving the instance type in the
321 // scratch register. 321 // scratch register.
322 GenerateStringCheck(masm, receiver, scratch, miss, &check_wrapper); 322 GenerateStringCheck(masm, receiver, scratch, miss, &check_wrapper);
323 323
324 // Load length directly from the string. 324 // Load length directly from the string.
325 __ bind(&load_length); 325 __ bind(&load_length);
326 __ and_(scratch, Immediate(kStringSizeMask)); 326 __ and_(scratch, Immediate(kStringSizeMask));
327 __ movl(rax, FieldOperand(receiver, String::kLengthOffset)); 327 __ movl(rax, FieldOperand(receiver, String::kLengthOffset));
328 // rcx is also the receiver. 328 // rcx is also the receiver.
329 __ lea(rcx, Operand(scratch, String::kLongLengthShift)); 329 __ lea(rcx, Operand(scratch, String::kLongLengthShift));
330 __ shr(rax); // rcx is implicit shift register. 330 __ shr_cl(rax);
331 __ Integer32ToSmi(rax, rax); 331 __ Integer32ToSmi(rax, rax);
332 __ ret(0); 332 __ ret(0);
333 333
334 // Check if the object is a JSValue wrapper. 334 // Check if the object is a JSValue wrapper.
335 __ bind(&check_wrapper); 335 __ bind(&check_wrapper);
336 __ cmpl(scratch, Immediate(JS_VALUE_TYPE)); 336 __ cmpl(scratch, Immediate(JS_VALUE_TYPE));
337 __ j(not_equal, miss); 337 __ j(not_equal, miss);
338 338
339 // Check if the wrapped value is a string and load the length 339 // Check if the wrapped value is a string and load the length
340 // directly if it is. 340 // directly if it is.
(...skipping 1515 matching lines...) Expand 10 before | Expand all | Expand 10 after
1856 __ Jump(generic_construct_stub, RelocInfo::CODE_TARGET); 1856 __ Jump(generic_construct_stub, RelocInfo::CODE_TARGET);
1857 1857
1858 // Return the generated code. 1858 // Return the generated code.
1859 return GetCode(); 1859 return GetCode();
1860 } 1860 }
1861 1861
1862 1862
1863 #undef __ 1863 #undef __
1864 1864
1865 } } // namespace v8::internal 1865 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698