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

Side by Side Diff: test/cctest/test-macro-assembler-x64.cc

Issue 261024: X64: Fix incompatability with previous revision. (Closed)
Patch Set: Created 11 years, 2 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 | « test/cctest/test-api.cc ('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 2009 the V8 project authors. All rights reserved. 1 // Copyright 2009 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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 bool is_valid = Smi::IsValid(number); 102 bool is_valid = Smi::IsValid(number);
103 bool is_in_range = number >= Smi::kMinValue && number <= Smi::kMaxValue; 103 bool is_in_range = number >= Smi::kMinValue && number <= Smi::kMaxValue;
104 CHECK_EQ(is_in_range, is_valid); 104 CHECK_EQ(is_in_range, is_valid);
105 if (is_valid) { 105 if (is_valid) {
106 Smi* smi_from_intptr = Smi::FromIntptr(number); 106 Smi* smi_from_intptr = Smi::FromIntptr(number);
107 if (static_cast<int>(number) == number) { // Is a 32-bit int. 107 if (static_cast<int>(number) == number) { // Is a 32-bit int.
108 Smi* smi_from_int = Smi::FromInt(static_cast<int32_t>(number)); 108 Smi* smi_from_int = Smi::FromInt(static_cast<int32_t>(number));
109 CHECK_EQ(smi_from_int, smi_from_intptr); 109 CHECK_EQ(smi_from_int, smi_from_intptr);
110 } 110 }
111 int smi_value = smi_from_intptr->value(); 111 int smi_value = smi_from_intptr->value();
112 CHECK_EQ(number, smi_value); 112 CHECK_EQ(number, static_cast<intptr_t>(smi_value));
113 } 113 }
114 } 114 }
115 } 115 }
116 116
117 117
118 static void TestMoveSmi(MacroAssembler* masm, Label* exit, int id, Smi* value) { 118 static void TestMoveSmi(MacroAssembler* masm, Label* exit, int id, Smi* value) {
119 __ movl(rax, Immediate(id)); 119 __ movl(rax, Immediate(id));
120 __ Move(rcx, Smi::FromInt(0)); 120 __ Move(rcx, Smi::FromInt(0));
121 __ Set(rdx, reinterpret_cast<intptr_t>(Smi::FromInt(0))); 121 __ Set(rdx, reinterpret_cast<intptr_t>(Smi::FromInt(0)));
122 __ cmpq(rcx, rdx); 122 __ cmpq(rcx, rdx);
(...skipping 1964 matching lines...) Expand 10 before | Expand all | Expand 10 after
2087 2087
2088 CodeDesc desc; 2088 CodeDesc desc;
2089 masm->GetCode(&desc); 2089 masm->GetCode(&desc);
2090 // Call the function from C++. 2090 // Call the function from C++.
2091 int result = FUNCTION_CAST<F0>(buffer)(); 2091 int result = FUNCTION_CAST<F0>(buffer)();
2092 CHECK_EQ(0, result); 2092 CHECK_EQ(0, result);
2093 } 2093 }
2094 2094
2095 2095
2096 #undef __ 2096 #undef __
OLDNEW
« no previous file with comments | « test/cctest/test-api.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698