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

Side by Side Diff: src/IceTargetLoweringX8632Traits.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/IceTargetLowering.cpp ('k') | src/IceTargetLoweringX8664Traits.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/IceTargetLoweringX8632Traits.h - x86-32 traits -*- C++ -*-=// 1 //===- subzero/src/IceTargetLoweringX8632Traits.h - x86-32 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 423 matching lines...) Expand 10 before | Expand all | Expand 10 after
434 /// Stack alignment. This is defined in IceTargetLoweringX8632.cpp because it 434 /// Stack alignment. This is defined in IceTargetLoweringX8632.cpp because it
435 /// is used as an argument to std::max(), and the default std::less<T> has an 435 /// is used as an argument to std::max(), and the default std::less<T> has an
436 /// operator(T const&, T const&) which requires this member to have an 436 /// operator(T const&, T const&) which requires this member to have an
437 /// address. 437 /// address.
438 static const uint32_t X86_STACK_ALIGNMENT_BYTES; 438 static const uint32_t X86_STACK_ALIGNMENT_BYTES;
439 /// Size of the return address on the stack 439 /// Size of the return address on the stack
440 static const uint32_t X86_RET_IP_SIZE_BYTES = 4; 440 static const uint32_t X86_RET_IP_SIZE_BYTES = 4;
441 /// The number of different NOP instructions 441 /// The number of different NOP instructions
442 static const uint32_t X86_NUM_NOP_VARIANTS = 5; 442 static const uint32_t X86_NUM_NOP_VARIANTS = 5;
443 443
444 /// \name Limits for unrolling memory intrinsics.
445 /// @{
446 static constexpr uint32_t MEMCPY_UNROLL_LIMIT = 8;
447 static constexpr uint32_t MEMMOVE_UNROLL_LIMIT = 8;
448 static constexpr uint32_t MEMSET_UNROLL_LIMIT = 16;
449 /// @}
450
444 /// Value is in bytes. Return Value adjusted to the next highest multiple 451 /// Value is in bytes. Return Value adjusted to the next highest multiple
445 /// of the stack alignment. 452 /// of the stack alignment.
446 static uint32_t applyStackAlignment(uint32_t Value) { 453 static uint32_t applyStackAlignment(uint32_t Value) {
447 return Utils::applyAlignment(Value, X86_STACK_ALIGNMENT_BYTES); 454 return Utils::applyAlignment(Value, X86_STACK_ALIGNMENT_BYTES);
448 } 455 }
449 456
450 /// Return the type which the elements of the vector have in the X86 457 /// Return the type which the elements of the vector have in the X86
451 /// representation of the vector. 458 /// representation of the vector.
452 static Type getInVectorElementType(Type Ty) { 459 static Type getInVectorElementType(Type Ty) {
453 assert(isVectorType(Ty)); 460 assert(isVectorType(Ty));
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
705 712
706 } // end of namespace X86Internal 713 } // end of namespace X86Internal
707 714
708 namespace X8632 { 715 namespace X8632 {
709 using Traits = ::Ice::X86Internal::MachineTraits<TargetX8632>; 716 using Traits = ::Ice::X86Internal::MachineTraits<TargetX8632>;
710 } // end of namespace X8632 717 } // end of namespace X8632
711 718
712 } // end of namespace Ice 719 } // end of namespace Ice
713 720
714 #endif // SUBZERO_SRC_ICETARGETLOWERINGX8632TRAITS_H 721 #endif // SUBZERO_SRC_ICETARGETLOWERINGX8632TRAITS_H
OLDNEW
« no previous file with comments | « src/IceTargetLowering.cpp ('k') | src/IceTargetLoweringX8664Traits.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698