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

Side by Side Diff: crosstest/insertelement.h

Issue 1560933002: Subzero: Enable Non-SFI vector cross tests. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Code review changes Created 4 years, 11 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 | « Makefile.standalone ('k') | crosstest/test_arith_main.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 //===- subzero/crosstest/insertelement.h - Helper for PNaCl workaround. ---===//
2 //
3 // The Subzero Code Generator
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // Helper function to work around a potential stack overflow issue.
11 //
12 //===----------------------------------------------------------------------===//
13
14 #ifndef INSERTELEMENT_H
15 #define INSERTELEMENT_H
16
17 // Helper function to perform the insertelement bitcode instruction. The PNaCl
18 // ABI simplifications transform insertelement/extractelement instructions with
19 // a non-constant index into something involving alloca. This can cause a stack
20 // overflow if the alloca is inside a loop.
21 template <typename VectorType, typename ElementType>
22 void __attribute__((noinline))
23 setElement(VectorType &Value, size_t Index, ElementType Element) {
24 Value[Index] = Element;
25 }
26
27 #endif // INSERTELEMENT_H
OLDNEW
« no previous file with comments | « Makefile.standalone ('k') | crosstest/test_arith_main.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698