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

Side by Side Diff: src/IceTargetLoweringX8664Traits.h

Issue 1278173009: Inline memove for small constant sizes and refactor memcpy and memset. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Created 5 years, 4 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
« no previous file with comments | « src/IceTargetLoweringX8632Traits.h ('k') | src/IceTargetLoweringX86Base.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 //===- subzero/src/IceTargetLoweringX8664Traits.h - x86-64 traits -*- C++ -*-=// 1 //===- subzero/src/IceTargetLoweringX8664Traits.h - x86-64 traits -*- C++ -*-=//
2 // 2 //
3 // The Subzero Code Generator 3 // The Subzero Code Generator
4 // 4 //
5 // This file is distributed under the University of Illinois Open Source 5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details. 6 // License. See LICENSE.TXT for details.
7 // 7 //
8 //===----------------------------------------------------------------------===// 8 //===----------------------------------------------------------------------===//
9 /// 9 ///
10 /// \file 10 /// \file
(...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after
449 /// Stack alignment. This is defined in IceTargetLoweringX8664.cpp because it 449 /// Stack alignment. This is defined in IceTargetLoweringX8664.cpp because it
450 /// is used as an argument to std::max(), and the default std::less<T> has an 450 /// is used as an argument to std::max(), and the default std::less<T> has an
451 /// operator(T const&, T const&) which requires this member to have an 451 /// operator(T const&, T const&) which requires this member to have an
452 /// address. 452 /// address.
453 static const uint32_t X86_STACK_ALIGNMENT_BYTES; 453 static const uint32_t X86_STACK_ALIGNMENT_BYTES;
454 /// Size of the return address on the stack 454 /// Size of the return address on the stack
455 static const uint32_t X86_RET_IP_SIZE_BYTES = 8; 455 static const uint32_t X86_RET_IP_SIZE_BYTES = 8;
456 /// The number of different NOP instructions 456 /// The number of different NOP instructions
457 static const uint32_t X86_NUM_NOP_VARIANTS = 5; 457 static const uint32_t X86_NUM_NOP_VARIANTS = 5;
458 458
459 /// \name Limits for unrolling memory intrinsics.
460 /// @{
461 static constexpr uint32_t MEMCPY_UNROLL_LIMIT = 8;
462 static constexpr uint32_t MEMMOVE_UNROLL_LIMIT = 8;
463 static constexpr uint32_t MEMSET_UNROLL_LIMIT = 16;
464 /// @}
465
459 /// Value is in bytes. Return Value adjusted to the next highest multiple 466 /// Value is in bytes. Return Value adjusted to the next highest multiple
460 /// of the stack alignment. 467 /// of the stack alignment.
461 static uint32_t applyStackAlignment(uint32_t Value) { 468 static uint32_t applyStackAlignment(uint32_t Value) {
462 return Utils::applyAlignment(Value, X86_STACK_ALIGNMENT_BYTES); 469 return Utils::applyAlignment(Value, X86_STACK_ALIGNMENT_BYTES);
463 } 470 }
464 471
465 /// Return the type which the elements of the vector have in the X86 472 /// Return the type which the elements of the vector have in the X86
466 /// representation of the vector. 473 /// representation of the vector.
467 static Type getInVectorElementType(Type Ty) { 474 static Type getInVectorElementType(Type Ty) {
468 assert(isVectorType(Ty)); 475 assert(isVectorType(Ty));
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
711 718
712 } // end of namespace X86Internal 719 } // end of namespace X86Internal
713 720
714 namespace X8664 { 721 namespace X8664 {
715 using Traits = ::Ice::X86Internal::MachineTraits<TargetX8664>; 722 using Traits = ::Ice::X86Internal::MachineTraits<TargetX8664>;
716 } // end of namespace X8664 723 } // end of namespace X8664
717 724
718 } // end of namespace Ice 725 } // end of namespace Ice
719 726
720 #endif // SUBZERO_SRC_ICETARGETLOWERINGX8664TRAITS_H 727 #endif // SUBZERO_SRC_ICETARGETLOWERINGX8664TRAITS_H
OLDNEW
« no previous file with comments | « src/IceTargetLoweringX8632Traits.h ('k') | src/IceTargetLoweringX86Base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698