OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 1177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1188 t.sub_result = 0; | 1188 t.sub_result = 0; |
1189 t.mul_result = 0; | 1189 t.mul_result = 0; |
1190 t.div_result = 0; | 1190 t.div_result = 0; |
1191 Object* dummy = CALL_GENERATED_CODE(f, &t, 0, 0, 0, 0); | 1191 Object* dummy = CALL_GENERATED_CODE(f, &t, 0, 0, 0, 0); |
1192 USE(dummy); | 1192 USE(dummy); |
1193 const uint32_t kArmNanUpper32 = 0x7ff80000; | 1193 const uint32_t kArmNanUpper32 = 0x7ff80000; |
1194 const uint32_t kArmNanLower32 = 0x00000000; | 1194 const uint32_t kArmNanLower32 = 0x00000000; |
1195 #ifdef DEBUG | 1195 #ifdef DEBUG |
1196 const uint64_t kArmNanInt64 = | 1196 const uint64_t kArmNanInt64 = |
1197 (static_cast<uint64_t>(kArmNanUpper32) << 32) | kArmNanLower32; | 1197 (static_cast<uint64_t>(kArmNanUpper32) << 32) | kArmNanLower32; |
1198 ASSERT(kArmNanInt64 != kHoleNanInt64); | 1198 DCHECK(kArmNanInt64 != kHoleNanInt64); |
1199 #endif | 1199 #endif |
1200 // With VFP2 the sign of the canonicalized Nan is undefined. So | 1200 // With VFP2 the sign of the canonicalized Nan is undefined. So |
1201 // we remove the sign bit for the upper tests. | 1201 // we remove the sign bit for the upper tests. |
1202 CHECK_EQ(kArmNanUpper32, (BitCast<int64_t>(t.add_result) >> 32) & 0x7fffffff); | 1202 CHECK_EQ(kArmNanUpper32, (BitCast<int64_t>(t.add_result) >> 32) & 0x7fffffff); |
1203 CHECK_EQ(kArmNanLower32, BitCast<int64_t>(t.add_result) & 0xffffffffu); | 1203 CHECK_EQ(kArmNanLower32, BitCast<int64_t>(t.add_result) & 0xffffffffu); |
1204 CHECK_EQ(kArmNanUpper32, (BitCast<int64_t>(t.sub_result) >> 32) & 0x7fffffff); | 1204 CHECK_EQ(kArmNanUpper32, (BitCast<int64_t>(t.sub_result) >> 32) & 0x7fffffff); |
1205 CHECK_EQ(kArmNanLower32, BitCast<int64_t>(t.sub_result) & 0xffffffffu); | 1205 CHECK_EQ(kArmNanLower32, BitCast<int64_t>(t.sub_result) & 0xffffffffu); |
1206 CHECK_EQ(kArmNanUpper32, (BitCast<int64_t>(t.mul_result) >> 32) & 0x7fffffff); | 1206 CHECK_EQ(kArmNanUpper32, (BitCast<int64_t>(t.mul_result) >> 32) & 0x7fffffff); |
1207 CHECK_EQ(kArmNanLower32, BitCast<int64_t>(t.mul_result) & 0xffffffffu); | 1207 CHECK_EQ(kArmNanLower32, BitCast<int64_t>(t.mul_result) & 0xffffffffu); |
1208 CHECK_EQ(kArmNanUpper32, (BitCast<int64_t>(t.div_result) >> 32) & 0x7fffffff); | 1208 CHECK_EQ(kArmNanUpper32, (BitCast<int64_t>(t.div_result) >> 32) & 0x7fffffff); |
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1555 assm.GetCode(&desc); | 1555 assm.GetCode(&desc); |
1556 Handle<Code> code = isolate->factory()->NewCode( | 1556 Handle<Code> code = isolate->factory()->NewCode( |
1557 desc, Code::ComputeFlags(Code::STUB), code_object); | 1557 desc, Code::ComputeFlags(Code::STUB), code_object); |
1558 F1 f = FUNCTION_CAST<F1>(code->entry()); | 1558 F1 f = FUNCTION_CAST<F1>(code->entry()); |
1559 int res = reinterpret_cast<int>(CALL_GENERATED_CODE(f, 21, 0, 0, 0, 0)); | 1559 int res = reinterpret_cast<int>(CALL_GENERATED_CODE(f, 21, 0, 0, 0, 0)); |
1560 ::printf("f() = %d\n", res); | 1560 ::printf("f() = %d\n", res); |
1561 CHECK_EQ(42, res); | 1561 CHECK_EQ(42, res); |
1562 } | 1562 } |
1563 | 1563 |
1564 #undef __ | 1564 #undef __ |
OLD | NEW |