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

Side by Side Diff: test/cctest/test-utils-a64.cc

Issue 169523005: make a64 compile on mavericks (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « test/cctest/test-utils-a64.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 } 55 }
56 56
57 return expected == result; 57 return expected == result;
58 } 58 }
59 59
60 60
61 bool EqualFP32(float expected, const RegisterDump*, float result) { 61 bool EqualFP32(float expected, const RegisterDump*, float result) {
62 if (float_to_rawbits(expected) == float_to_rawbits(result)) { 62 if (float_to_rawbits(expected) == float_to_rawbits(result)) {
63 return true; 63 return true;
64 } else { 64 } else {
65 if (isnan(expected) || (expected == 0.0)) { 65 if (std::isnan(expected) || (expected == 0.0)) {
66 printf("Expected 0x%08" PRIx32 "\t Found 0x%08" PRIx32 "\n", 66 printf("Expected 0x%08" PRIx32 "\t Found 0x%08" PRIx32 "\n",
67 float_to_rawbits(expected), float_to_rawbits(result)); 67 float_to_rawbits(expected), float_to_rawbits(result));
68 } else { 68 } else {
69 printf("Expected %.9f (0x%08" PRIx32 ")\t " 69 printf("Expected %.9f (0x%08" PRIx32 ")\t "
70 "Found %.9f (0x%08" PRIx32 ")\n", 70 "Found %.9f (0x%08" PRIx32 ")\n",
71 expected, float_to_rawbits(expected), 71 expected, float_to_rawbits(expected),
72 result, float_to_rawbits(result)); 72 result, float_to_rawbits(result));
73 } 73 }
74 return false; 74 return false;
75 } 75 }
76 } 76 }
77 77
78 78
79 bool EqualFP64(double expected, const RegisterDump*, double result) { 79 bool EqualFP64(double expected, const RegisterDump*, double result) {
80 if (double_to_rawbits(expected) == double_to_rawbits(result)) { 80 if (double_to_rawbits(expected) == double_to_rawbits(result)) {
81 return true; 81 return true;
82 } 82 }
83 83
84 if (isnan(expected) || (expected == 0.0)) { 84 if (std::isnan(expected) || (expected == 0.0)) {
85 printf("Expected 0x%016" PRIx64 "\t Found 0x%016" PRIx64 "\n", 85 printf("Expected 0x%016" PRIx64 "\t Found 0x%016" PRIx64 "\n",
86 double_to_rawbits(expected), double_to_rawbits(result)); 86 double_to_rawbits(expected), double_to_rawbits(result));
87 } else { 87 } else {
88 printf("Expected %.17f (0x%016" PRIx64 ")\t " 88 printf("Expected %.17f (0x%016" PRIx64 ")\t "
89 "Found %.17f (0x%016" PRIx64 ")\n", 89 "Found %.17f (0x%016" PRIx64 ")\n",
90 expected, double_to_rawbits(expected), 90 expected, double_to_rawbits(expected),
91 result, double_to_rawbits(result)); 91 result, double_to_rawbits(result));
92 } 92 }
93 return false; 93 return false;
94 } 94 }
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after
417 // Finally, restore dump2_base and dump2. 417 // Finally, restore dump2_base and dump2.
418 __ Ldr(dump2_base, MemOperand(dump2, dump2_base.code() * kXRegSizeInBytes)); 418 __ Ldr(dump2_base, MemOperand(dump2, dump2_base.code() * kXRegSizeInBytes));
419 __ Ldr(dump2, MemOperand(dump2, dump2.code() * kXRegSizeInBytes)); 419 __ Ldr(dump2, MemOperand(dump2, dump2.code() * kXRegSizeInBytes));
420 420
421 // Restore the MacroAssembler's scratch registers. 421 // Restore the MacroAssembler's scratch registers.
422 __ SetScratchRegisters(old_tmp0, old_tmp1); 422 __ SetScratchRegisters(old_tmp0, old_tmp1);
423 __ SetFPScratchRegister(old_fptmp0); 423 __ SetFPScratchRegister(old_fptmp0);
424 424
425 completed_ = true; 425 completed_ = true;
426 } 426 }
OLDNEW
« no previous file with comments | « test/cctest/test-utils-a64.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698