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

Side by Side Diff: src/assembler.cc

Issue 1638283004: [wasm] Backoff implementation for F64Trunc using std::trunc. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@init-root-register
Patch Set: Use math.h trunc instead of std::trunc. Created 4 years, 10 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/assembler.h ('k') | src/compiler/wasm-compiler.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 // Copyright (c) 1994-2006 Sun Microsystems Inc. 1 // Copyright (c) 1994-2006 Sun Microsystems Inc.
2 // All Rights Reserved. 2 // All Rights Reserved.
3 // 3 //
4 // Redistribution and use in source and binary forms, with or without 4 // Redistribution and use in source and binary forms, with or without
5 // modification, are permitted provided that the following conditions are 5 // modification, are permitted provided that the following conditions are
6 // met: 6 // met:
7 // 7 //
8 // - Redistributions of source code must retain the above copyright notice, 8 // - Redistributions of source code must retain the above copyright notice,
9 // this list of conditions and the following disclaimer. 9 // this list of conditions and the following disclaimer.
10 // 10 //
(...skipping 16 matching lines...) Expand all
27 // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 27 // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
28 // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 28 // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29 // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 30
31 // The original source code covered by the above license above has been 31 // The original source code covered by the above license above has been
32 // modified significantly by Google Inc. 32 // modified significantly by Google Inc.
33 // Copyright 2012 the V8 project authors. All rights reserved. 33 // Copyright 2012 the V8 project authors. All rights reserved.
34 34
35 #include "src/assembler.h" 35 #include "src/assembler.h"
36 36
37 #include <math.h>
37 #include <cmath> 38 #include <cmath>
38 #include "src/api.h" 39 #include "src/api.h"
39 #include "src/base/cpu.h" 40 #include "src/base/cpu.h"
40 #include "src/base/functional.h" 41 #include "src/base/functional.h"
41 #include "src/base/lazy-instance.h" 42 #include "src/base/lazy-instance.h"
42 #include "src/base/platform/platform.h" 43 #include "src/base/platform/platform.h"
43 #include "src/base/utils/random-number-generator.h" 44 #include "src/base/utils/random-number-generator.h"
44 #include "src/builtins.h" 45 #include "src/builtins.h"
45 #include "src/codegen.h" 46 #include "src/codegen.h"
46 #include "src/counters.h" 47 #include "src/counters.h"
(...skipping 1077 matching lines...) Expand 10 before | Expand all | Expand 10 after
1124 Redirect(isolate, FUNCTION_ADDR(Deoptimizer::New))); 1125 Redirect(isolate, FUNCTION_ADDR(Deoptimizer::New)));
1125 } 1126 }
1126 1127
1127 1128
1128 ExternalReference ExternalReference::compute_output_frames_function( 1129 ExternalReference ExternalReference::compute_output_frames_function(
1129 Isolate* isolate) { 1130 Isolate* isolate) {
1130 return ExternalReference( 1131 return ExternalReference(
1131 Redirect(isolate, FUNCTION_ADDR(Deoptimizer::ComputeOutputFrames))); 1132 Redirect(isolate, FUNCTION_ADDR(Deoptimizer::ComputeOutputFrames)));
1132 } 1133 }
1133 1134
1135 static void trunc64_wrapper(double* param) { *param = trunc(*param); }
ahaas 2016/02/01 12:04:02 std::trunc caused problems on android.
1136
1137 ExternalReference ExternalReference::trunc64_wrapper_function(
1138 Isolate* isolate) {
1139 return ExternalReference(Redirect(isolate, FUNCTION_ADDR(trunc64_wrapper)));
1140 }
1134 1141
1135 ExternalReference ExternalReference::log_enter_external_function( 1142 ExternalReference ExternalReference::log_enter_external_function(
1136 Isolate* isolate) { 1143 Isolate* isolate) {
1137 return ExternalReference( 1144 return ExternalReference(
1138 Redirect(isolate, FUNCTION_ADDR(Logger::EnterExternal))); 1145 Redirect(isolate, FUNCTION_ADDR(Logger::EnterExternal)));
1139 } 1146 }
1140 1147
1141 1148
1142 ExternalReference ExternalReference::log_leave_external_function( 1149 ExternalReference ExternalReference::log_leave_external_function(
1143 Isolate* isolate) { 1150 Isolate* isolate) {
(...skipping 721 matching lines...) Expand 10 before | Expand all | Expand 10 after
1865 1872
1866 1873
1867 void Assembler::DataAlign(int m) { 1874 void Assembler::DataAlign(int m) {
1868 DCHECK(m >= 2 && base::bits::IsPowerOfTwo32(m)); 1875 DCHECK(m >= 2 && base::bits::IsPowerOfTwo32(m));
1869 while ((pc_offset() & (m - 1)) != 0) { 1876 while ((pc_offset() & (m - 1)) != 0) {
1870 db(0); 1877 db(0);
1871 } 1878 }
1872 } 1879 }
1873 } // namespace internal 1880 } // namespace internal
1874 } // namespace v8 1881 } // namespace v8
OLDNEW
« no previous file with comments | « src/assembler.h ('k') | src/compiler/wasm-compiler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698