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

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

Issue 196893003: Introduce addp, idivp, imulp and subp for x64 port (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
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 478 matching lines...) Expand 10 before | Expand all | Expand 10 after
489 __ j(zero, &check_sequential, Label::kNear); 489 __ j(zero, &check_sequential, Label::kNear);
490 490
491 // Dispatch on the indirect string shape: slice or cons. 491 // Dispatch on the indirect string shape: slice or cons.
492 Label cons_string; 492 Label cons_string;
493 __ testb(result, Immediate(kSlicedNotConsMask)); 493 __ testb(result, Immediate(kSlicedNotConsMask));
494 __ j(zero, &cons_string, Label::kNear); 494 __ j(zero, &cons_string, Label::kNear);
495 495
496 // Handle slices. 496 // Handle slices.
497 Label indirect_string_loaded; 497 Label indirect_string_loaded;
498 __ SmiToInteger32(result, FieldOperand(string, SlicedString::kOffsetOffset)); 498 __ SmiToInteger32(result, FieldOperand(string, SlicedString::kOffsetOffset));
499 __ addq(index, result); 499 __ addp(index, result);
500 __ movp(string, FieldOperand(string, SlicedString::kParentOffset)); 500 __ movp(string, FieldOperand(string, SlicedString::kParentOffset));
501 __ jmp(&indirect_string_loaded, Label::kNear); 501 __ jmp(&indirect_string_loaded, Label::kNear);
502 502
503 // Handle cons strings. 503 // Handle cons strings.
504 // Check whether the right hand side is the empty string (i.e. if 504 // Check whether the right hand side is the empty string (i.e. if
505 // this is really a flat string in a cons string). If that is not 505 // this is really a flat string in a cons string). If that is not
506 // the case we would rather go to the runtime system now to flatten 506 // the case we would rather go to the runtime system now to flatten
507 // the string. 507 // the string.
508 __ bind(&cons_string); 508 __ bind(&cons_string);
509 __ CompareRoot(FieldOperand(string, ConsString::kSecondOffset), 509 __ CompareRoot(FieldOperand(string, ConsString::kSecondOffset),
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
710 // argument_count_reg_ * times_pointer_size + (receiver - 1) * kPointerSize. 710 // argument_count_reg_ * times_pointer_size + (receiver - 1) * kPointerSize.
711 return Operand(base_reg_, argument_count_reg_, times_pointer_size, 711 return Operand(base_reg_, argument_count_reg_, times_pointer_size,
712 displacement_to_last_argument + (receiver - 1 - index) * kPointerSize); 712 displacement_to_last_argument + (receiver - 1 - index) * kPointerSize);
713 } 713 }
714 } 714 }
715 715
716 716
717 } } // namespace v8::internal 717 } } // namespace v8::internal
718 718
719 #endif // V8_TARGET_ARCH_X64 719 #endif // V8_TARGET_ARCH_X64
OLDNEW
« src/x64/assembler-x64.h ('K') | « src/x64/code-stubs-x64.cc ('k') | src/x64/debug-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698