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

Side by Side Diff: src/arm/code-stubs-arm.cc

Issue 5720005: Add an untagged double to transcendental cache elements. They now contain an... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 10 years 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 | « no previous file | src/heap.h » ('j') | src/heap.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 2255 matching lines...) Expand 10 before | Expand all | Expand 10 after
2266 __ b(eq, &runtime_call); 2266 __ b(eq, &runtime_call);
2267 2267
2268 #ifdef DEBUG 2268 #ifdef DEBUG
2269 // Check that the layout of cache elements match expectations. 2269 // Check that the layout of cache elements match expectations.
2270 { TranscendentalCache::Element test_elem[2]; 2270 { TranscendentalCache::Element test_elem[2];
2271 char* elem_start = reinterpret_cast<char*>(&test_elem[0]); 2271 char* elem_start = reinterpret_cast<char*>(&test_elem[0]);
2272 char* elem2_start = reinterpret_cast<char*>(&test_elem[1]); 2272 char* elem2_start = reinterpret_cast<char*>(&test_elem[1]);
2273 char* elem_in0 = reinterpret_cast<char*>(&(test_elem[0].in[0])); 2273 char* elem_in0 = reinterpret_cast<char*>(&(test_elem[0].in[0]));
2274 char* elem_in1 = reinterpret_cast<char*>(&(test_elem[0].in[1])); 2274 char* elem_in1 = reinterpret_cast<char*>(&(test_elem[0].in[1]));
2275 char* elem_out = reinterpret_cast<char*>(&(test_elem[0].output)); 2275 char* elem_out = reinterpret_cast<char*>(&(test_elem[0].output));
2276 CHECK_EQ(12, elem2_start - elem_start); // Two uint_32's and a pointer. 2276 // Two uint_32's, a pointer, and an untagged double.
Erik Corry 2010/12/13 20:26:13 Not your error, but the type is called uint32_t.
2277 CHECK_EQ(20, elem2_start - elem_start);
2277 CHECK_EQ(0, elem_in0 - elem_start); 2278 CHECK_EQ(0, elem_in0 - elem_start);
2278 CHECK_EQ(kIntSize, elem_in1 - elem_start); 2279 CHECK_EQ(kIntSize, elem_in1 - elem_start);
2279 CHECK_EQ(2 * kIntSize, elem_out - elem_start); 2280 CHECK_EQ(2 * kIntSize, elem_out - elem_start);
2280 } 2281 }
2281 #endif 2282 #endif
2282 2283
2283 // Find the address of the r1'st entry in the cache, i.e., &r0[r1*12]. 2284 // Find the address of the r1'st entry in the cache, i.e., &r0[r1*20].
2284 __ add(r1, r1, Operand(r1, LSL, 1)); 2285 __ add(r1, r1, Operand(r1, LSL, 2));
2285 __ add(r0, r0, Operand(r1, LSL, 2)); 2286 __ add(r0, r0, Operand(r1, LSL, 2));
2286 // Check if cache matches: Double value is stored in uint32_t[2] array. 2287 // Check if cache matches: Double value is stored in uint32_t[2] array.
2287 __ ldm(ia, r0, r4.bit()| r5.bit() | r6.bit()); 2288 __ ldm(ia, r0, r4.bit()| r5.bit() | r6.bit());
2288 __ cmp(r2, r4); 2289 __ cmp(r2, r4);
2289 __ b(ne, &runtime_call); 2290 __ b(ne, &runtime_call);
2290 __ cmp(r3, r5); 2291 __ cmp(r3, r5);
2291 __ b(ne, &runtime_call); 2292 __ b(ne, &runtime_call);
2292 // Cache hit. Load result, pop argument and return. 2293 // Cache hit. Load result, pop argument and return.
2293 __ mov(r0, Operand(r6)); 2294 __ mov(r0, Operand(r6));
2294 __ pop(); 2295 __ pop();
(...skipping 2664 matching lines...) Expand 10 before | Expand all | Expand 10 after
4959 __ pop(r1); 4960 __ pop(r1);
4960 __ Jump(r2); 4961 __ Jump(r2);
4961 } 4962 }
4962 4963
4963 4964
4964 #undef __ 4965 #undef __
4965 4966
4966 } } // namespace v8::internal 4967 } } // namespace v8::internal
4967 4968
4968 #endif // V8_TARGET_ARCH_ARM 4969 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | src/heap.h » ('j') | src/heap.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698