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

Side by Side Diff: src/mips64/simulator-mips64.cc

Issue 2001073002: [build] Fix a clang warning (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase Created 4 years, 6 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/mips64/disasm-mips64.cc ('k') | src/objects-inl.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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <limits.h> 5 #include <limits.h>
6 #include <stdarg.h> 6 #include <stdarg.h>
7 #include <stdlib.h> 7 #include <stdlib.h>
8 #include <cmath> 8 #include <cmath>
9 9
10 #if V8_TARGET_ARCH_MIPS64 10 #if V8_TARGET_ARCH_MIPS64
(...skipping 2059 matching lines...) Expand 10 before | Expand all | Expand 10 after
2070 int64_t iresult = 0; // integer return value 2070 int64_t iresult = 0; // integer return value
2071 double dresult = 0; // double return value 2071 double dresult = 0; // double return value
2072 GetFpArgs(&dval0, &dval1, &ival); 2072 GetFpArgs(&dval0, &dval1, &ival);
2073 SimulatorRuntimeCall generic_target = 2073 SimulatorRuntimeCall generic_target =
2074 reinterpret_cast<SimulatorRuntimeCall>(external); 2074 reinterpret_cast<SimulatorRuntimeCall>(external);
2075 if (::v8::internal::FLAG_trace_sim) { 2075 if (::v8::internal::FLAG_trace_sim) {
2076 switch (redirection->type()) { 2076 switch (redirection->type()) {
2077 case ExternalReference::BUILTIN_FP_FP_CALL: 2077 case ExternalReference::BUILTIN_FP_FP_CALL:
2078 case ExternalReference::BUILTIN_COMPARE_CALL: 2078 case ExternalReference::BUILTIN_COMPARE_CALL:
2079 PrintF("Call to host function at %p with args %f, %f", 2079 PrintF("Call to host function at %p with args %f, %f",
2080 FUNCTION_ADDR(generic_target), dval0, dval1); 2080 static_cast<void*>(FUNCTION_ADDR(generic_target)), dval0,
2081 dval1);
2081 break; 2082 break;
2082 case ExternalReference::BUILTIN_FP_CALL: 2083 case ExternalReference::BUILTIN_FP_CALL:
2083 PrintF("Call to host function at %p with arg %f", 2084 PrintF("Call to host function at %p with arg %f",
2084 FUNCTION_ADDR(generic_target), dval0); 2085 static_cast<void*>(FUNCTION_ADDR(generic_target)), dval0);
2085 break; 2086 break;
2086 case ExternalReference::BUILTIN_FP_INT_CALL: 2087 case ExternalReference::BUILTIN_FP_INT_CALL:
2087 PrintF("Call to host function at %p with args %f, %d", 2088 PrintF("Call to host function at %p with args %f, %d",
2088 FUNCTION_ADDR(generic_target), dval0, ival); 2089 static_cast<void*>(FUNCTION_ADDR(generic_target)), dval0,
2090 ival);
2089 break; 2091 break;
2090 default: 2092 default:
2091 UNREACHABLE(); 2093 UNREACHABLE();
2092 break; 2094 break;
2093 } 2095 }
2094 } 2096 }
2095 switch (redirection->type()) { 2097 switch (redirection->type()) {
2096 case ExternalReference::BUILTIN_COMPARE_CALL: { 2098 case ExternalReference::BUILTIN_COMPARE_CALL: {
2097 SimulatorRuntimeCompareCall target = 2099 SimulatorRuntimeCompareCall target =
2098 reinterpret_cast<SimulatorRuntimeCompareCall>(external); 2100 reinterpret_cast<SimulatorRuntimeCompareCall>(external);
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
2181 target(arg0, arg1, Redirection::ReverseRedirection(arg2)); 2183 target(arg0, arg1, Redirection::ReverseRedirection(arg2));
2182 } else if (redirection->type() == ExternalReference::BUILTIN_CALL_TRIPLE) { 2184 } else if (redirection->type() == ExternalReference::BUILTIN_CALL_TRIPLE) {
2183 // builtin call returning ObjectTriple. 2185 // builtin call returning ObjectTriple.
2184 SimulatorRuntimeTripleCall target = 2186 SimulatorRuntimeTripleCall target =
2185 reinterpret_cast<SimulatorRuntimeTripleCall>(external); 2187 reinterpret_cast<SimulatorRuntimeTripleCall>(external);
2186 if (::v8::internal::FLAG_trace_sim) { 2188 if (::v8::internal::FLAG_trace_sim) {
2187 PrintF( 2189 PrintF(
2188 "Call to host triple returning runtime function %p " 2190 "Call to host triple returning runtime function %p "
2189 "args %016" PRIx64 ", %016" PRIx64 ", %016" PRIx64 ", %016" PRIx64 2191 "args %016" PRIx64 ", %016" PRIx64 ", %016" PRIx64 ", %016" PRIx64
2190 ", %016" PRIx64 "\n", 2192 ", %016" PRIx64 "\n",
2191 FUNCTION_ADDR(target), arg1, arg2, arg3, arg4, arg5); 2193 static_cast<void*>(FUNCTION_ADDR(target)), arg1, arg2, arg3, arg4,
2194 arg5);
2192 } 2195 }
2193 // arg0 is a hidden argument pointing to the return location, so don't 2196 // arg0 is a hidden argument pointing to the return location, so don't
2194 // pass it to the target function. 2197 // pass it to the target function.
2195 ObjectTriple result = target(arg1, arg2, arg3, arg4, arg5); 2198 ObjectTriple result = target(arg1, arg2, arg3, arg4, arg5);
2196 if (::v8::internal::FLAG_trace_sim) { 2199 if (::v8::internal::FLAG_trace_sim) {
2197 PrintF("Returned { %p, %p, %p }\n", result.x, result.y, result.z); 2200 PrintF("Returned { %p, %p, %p }\n", static_cast<void*>(result.x),
2201 static_cast<void*>(result.y), static_cast<void*>(result.z));
2198 } 2202 }
2199 // Return is passed back in address pointed to by hidden first argument. 2203 // Return is passed back in address pointed to by hidden first argument.
2200 ObjectTriple* sim_result = reinterpret_cast<ObjectTriple*>(arg0); 2204 ObjectTriple* sim_result = reinterpret_cast<ObjectTriple*>(arg0);
2201 *sim_result = result; 2205 *sim_result = result;
2202 set_register(v0, arg0); 2206 set_register(v0, arg0);
2203 } else { 2207 } else {
2204 DCHECK(redirection->type() == ExternalReference::BUILTIN_CALL || 2208 DCHECK(redirection->type() == ExternalReference::BUILTIN_CALL ||
2205 redirection->type() == ExternalReference::BUILTIN_CALL_PAIR); 2209 redirection->type() == ExternalReference::BUILTIN_CALL_PAIR);
2206 SimulatorRuntimeCall target = 2210 SimulatorRuntimeCall target =
2207 reinterpret_cast<SimulatorRuntimeCall>(external); 2211 reinterpret_cast<SimulatorRuntimeCall>(external);
2208 if (::v8::internal::FLAG_trace_sim) { 2212 if (::v8::internal::FLAG_trace_sim) {
2209 PrintF( 2213 PrintF(
2210 "Call to host function at %p " 2214 "Call to host function at %p "
2211 "args %08" PRIx64 " , %08" PRIx64 " , %08" PRIx64 " , %08" PRIx64 2215 "args %08" PRIx64 " , %08" PRIx64 " , %08" PRIx64 " , %08" PRIx64
2212 " , %08" PRIx64 " , %08" PRIx64 " \n", 2216 " , %08" PRIx64 " , %08" PRIx64 " \n",
2213 FUNCTION_ADDR(target), arg0, arg1, arg2, arg3, arg4, arg5); 2217 static_cast<void*>(FUNCTION_ADDR(target)), arg0, arg1, arg2, arg3,
2218 arg4, arg5);
2214 } 2219 }
2215 // int64_t result = target(arg0, arg1, arg2, arg3, arg4, arg5); 2220 // int64_t result = target(arg0, arg1, arg2, arg3, arg4, arg5);
2216 // set_register(v0, static_cast<int32_t>(result)); 2221 // set_register(v0, static_cast<int32_t>(result));
2217 // set_register(v1, static_cast<int32_t>(result >> 32)); 2222 // set_register(v1, static_cast<int32_t>(result >> 32));
2218 ObjectPair result = target(arg0, arg1, arg2, arg3, arg4, arg5); 2223 ObjectPair result = target(arg0, arg1, arg2, arg3, arg4, arg5);
2219 set_register(v0, (int64_t)(result.x)); 2224 set_register(v0, (int64_t)(result.x));
2220 set_register(v1, (int64_t)(result.y)); 2225 set_register(v1, (int64_t)(result.y));
2221 } 2226 }
2222 if (::v8::internal::FLAG_trace_sim) { 2227 if (::v8::internal::FLAG_trace_sim) {
2223 PrintF("Returned %08" PRIx64 " : %08" PRIx64 " \n", get_register(v1), 2228 PrintF("Returned %08" PRIx64 " : %08" PRIx64 " \n", get_register(v1),
(...skipping 2714 matching lines...) Expand 10 before | Expand all | Expand 10 after
4938 } 4943 }
4939 4944
4940 4945
4941 #undef UNSUPPORTED 4946 #undef UNSUPPORTED
4942 } // namespace internal 4947 } // namespace internal
4943 } // namespace v8 4948 } // namespace v8
4944 4949
4945 #endif // USE_SIMULATOR 4950 #endif // USE_SIMULATOR
4946 4951
4947 #endif // V8_TARGET_ARCH_MIPS64 4952 #endif // V8_TARGET_ARCH_MIPS64
OLDNEW
« no previous file with comments | « src/mips64/disasm-mips64.cc ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698