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

Side by Side Diff: src/x64/lithium-x64.cc

Issue 178583006: Introduce intrinsics for double values in Javascript. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: test Created 6 years, 9 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/x64/lithium-x64.h ('k') | test/mjsunit/double-intrinsics.js » ('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 // 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 1830 matching lines...) Expand 10 before | Expand all | Expand 10 after
1841 ASSERT(input_rep.IsSmiOrTagged()); 1841 ASSERT(input_rep.IsSmiOrTagged());
1842 // Register allocator doesn't (yet) support allocation of double 1842 // Register allocator doesn't (yet) support allocation of double
1843 // temps. Reserve xmm1 explicitly. 1843 // temps. Reserve xmm1 explicitly.
1844 LClampTToUint8* result = new(zone()) LClampTToUint8(reg, 1844 LClampTToUint8* result = new(zone()) LClampTToUint8(reg,
1845 FixedTemp(xmm1)); 1845 FixedTemp(xmm1));
1846 return AssignEnvironment(DefineSameAsFirst(result)); 1846 return AssignEnvironment(DefineSameAsFirst(result));
1847 } 1847 }
1848 } 1848 }
1849 1849
1850 1850
1851 LInstruction* LChunkBuilder::DoDoubleBits(HDoubleBits* instr) {
1852 HValue* value = instr->value();
1853 ASSERT(value->representation().IsDouble());
1854 return DefineAsRegister(new(zone()) LDoubleBits(UseRegister(value)));
1855 }
1856
1857
1858 LInstruction* LChunkBuilder::DoConstructDouble(HConstructDouble* instr) {
1859 LOperand* lo = UseRegister(instr->lo());
1860 LOperand* hi = UseRegister(instr->hi());
1861 return DefineAsRegister(new(zone()) LConstructDouble(hi, lo));
1862 }
1863
1864
1851 LInstruction* LChunkBuilder::DoReturn(HReturn* instr) { 1865 LInstruction* LChunkBuilder::DoReturn(HReturn* instr) {
1852 LOperand* context = info()->IsStub() ? UseFixed(instr->context(), rsi) : NULL; 1866 LOperand* context = info()->IsStub() ? UseFixed(instr->context(), rsi) : NULL;
1853 LOperand* parameter_count = UseRegisterOrConstant(instr->parameter_count()); 1867 LOperand* parameter_count = UseRegisterOrConstant(instr->parameter_count());
1854 return new(zone()) LReturn( 1868 return new(zone()) LReturn(
1855 UseFixed(instr->value(), rax), context, parameter_count); 1869 UseFixed(instr->value(), rax), context, parameter_count);
1856 } 1870 }
1857 1871
1858 1872
1859 LInstruction* LChunkBuilder::DoConstant(HConstant* instr) { 1873 LInstruction* LChunkBuilder::DoConstant(HConstant* instr) {
1860 Representation r = instr->representation(); 1874 Representation r = instr->representation();
(...skipping 574 matching lines...) Expand 10 before | Expand all | Expand 10 after
2435 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { 2449 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) {
2436 LOperand* object = UseRegister(instr->object()); 2450 LOperand* object = UseRegister(instr->object());
2437 LOperand* index = UseTempRegister(instr->index()); 2451 LOperand* index = UseTempRegister(instr->index());
2438 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); 2452 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index));
2439 } 2453 }
2440 2454
2441 2455
2442 } } // namespace v8::internal 2456 } } // namespace v8::internal
2443 2457
2444 #endif // V8_TARGET_ARCH_X64 2458 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/lithium-x64.h ('k') | test/mjsunit/double-intrinsics.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698