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

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

Issue 553843002: Replace our home-grown BitCast with bit_cast from Chrome/Google3. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « src/arm/macro-assembler-arm.cc ('k') | src/arm64/macro-assembler-arm64.cc » ('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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 <stdarg.h> 5 #include <stdarg.h>
6 #include <stdlib.h> 6 #include <stdlib.h>
7 #include <cmath> 7 #include <cmath>
8 8
9 #include "src/v8.h" 9 #include "src/v8.h"
10 10
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 i < 8 && 304 i < 8 &&
305 (i % 2) == 0) { 305 (i % 2) == 0) {
306 dvalue = GetRegisterPairDoubleValue(i); 306 dvalue = GetRegisterPairDoubleValue(i);
307 PrintF(" (%f)\n", dvalue); 307 PrintF(" (%f)\n", dvalue);
308 } else { 308 } else {
309 PrintF("\n"); 309 PrintF("\n");
310 } 310 }
311 } 311 }
312 for (int i = 0; i < DwVfpRegister::NumRegisters(); i++) { 312 for (int i = 0; i < DwVfpRegister::NumRegisters(); i++) {
313 dvalue = GetVFPDoubleRegisterValue(i); 313 dvalue = GetVFPDoubleRegisterValue(i);
314 uint64_t as_words = BitCast<uint64_t>(dvalue); 314 uint64_t as_words = bit_cast<uint64_t>(dvalue);
315 PrintF("%3s: %f 0x%08x %08x\n", 315 PrintF("%3s: %f 0x%08x %08x\n",
316 VFPRegisters::Name(i, true), 316 VFPRegisters::Name(i, true),
317 dvalue, 317 dvalue,
318 static_cast<uint32_t>(as_words >> 32), 318 static_cast<uint32_t>(as_words >> 32),
319 static_cast<uint32_t>(as_words & 0xffffffff)); 319 static_cast<uint32_t>(as_words & 0xffffffff));
320 } 320 }
321 } else { 321 } else {
322 if (GetValue(arg1, &value)) { 322 if (GetValue(arg1, &value)) {
323 PrintF("%s: 0x%08x %d \n", arg1, value, value); 323 PrintF("%s: 0x%08x %d \n", arg1, value, value);
324 } else if (GetVFPSingleValue(arg1, &svalue)) { 324 } else if (GetVFPSingleValue(arg1, &svalue)) {
325 uint32_t as_word = BitCast<uint32_t>(svalue); 325 uint32_t as_word = bit_cast<uint32_t>(svalue);
326 PrintF("%s: %f 0x%08x\n", arg1, svalue, as_word); 326 PrintF("%s: %f 0x%08x\n", arg1, svalue, as_word);
327 } else if (GetVFPDoubleValue(arg1, &dvalue)) { 327 } else if (GetVFPDoubleValue(arg1, &dvalue)) {
328 uint64_t as_words = BitCast<uint64_t>(dvalue); 328 uint64_t as_words = bit_cast<uint64_t>(dvalue);
329 PrintF("%s: %f 0x%08x %08x\n", 329 PrintF("%s: %f 0x%08x %08x\n",
330 arg1, 330 arg1,
331 dvalue, 331 dvalue,
332 static_cast<uint32_t>(as_words >> 32), 332 static_cast<uint32_t>(as_words >> 32),
333 static_cast<uint32_t>(as_words & 0xffffffff)); 333 static_cast<uint32_t>(as_words & 0xffffffff));
334 } else { 334 } else {
335 PrintF("%s unrecognized\n", arg1); 335 PrintF("%s unrecognized\n", arg1);
336 } 336 }
337 } 337 }
338 } else { 338 } else {
(...skipping 3493 matching lines...) Expand 10 before | Expand all | Expand 10 after
3832 uintptr_t address = *stack_slot; 3832 uintptr_t address = *stack_slot;
3833 set_register(sp, current_sp + sizeof(uintptr_t)); 3833 set_register(sp, current_sp + sizeof(uintptr_t));
3834 return address; 3834 return address;
3835 } 3835 }
3836 3836
3837 } } // namespace v8::internal 3837 } } // namespace v8::internal
3838 3838
3839 #endif // USE_SIMULATOR 3839 #endif // USE_SIMULATOR
3840 3840
3841 #endif // V8_TARGET_ARCH_ARM 3841 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/macro-assembler-arm.cc ('k') | src/arm64/macro-assembler-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698