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

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

Issue 23129003: Arm support for DoubleToIStub (truncating). (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Sync and rebased. Created 7 years, 4 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
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 1907 matching lines...) Expand 10 before | Expand all | Expand 10 after
1918 } else { 1918 } else {
1919 ASSERT(to.IsInteger32()); 1919 ASSERT(to.IsInteger32());
1920 LOperand* value = NULL; 1920 LOperand* value = NULL;
1921 LInstruction* res = NULL; 1921 LInstruction* res = NULL;
1922 if (instr->value()->type().IsSmi()) { 1922 if (instr->value()->type().IsSmi()) {
1923 value = UseRegisterAtStart(instr->value()); 1923 value = UseRegisterAtStart(instr->value());
1924 res = DefineAsRegister(new(zone()) LSmiUntag(value, false)); 1924 res = DefineAsRegister(new(zone()) LSmiUntag(value, false));
1925 } else { 1925 } else {
1926 value = UseRegister(instr->value()); 1926 value = UseRegister(instr->value());
1927 LOperand* temp1 = TempRegister(); 1927 LOperand* temp1 = TempRegister();
1928 LOperand* temp2 = instr->CanTruncateToInt32() ? TempRegister() 1928 LOperand* temp2 = FixedTemp(d11);
1929 : NULL;
1930 LOperand* temp3 = FixedTemp(d11);
1931 res = DefineSameAsFirst(new(zone()) LTaggedToI(value, 1929 res = DefineSameAsFirst(new(zone()) LTaggedToI(value,
1932 temp1, 1930 temp1,
1933 temp2, 1931 temp2));
1934 temp3));
1935 res = AssignEnvironment(res); 1932 res = AssignEnvironment(res);
1936 } 1933 }
1937 return res; 1934 return res;
1938 } 1935 }
1939 } else if (from.IsDouble()) { 1936 } else if (from.IsDouble()) {
1940 if (to.IsTagged()) { 1937 if (to.IsTagged()) {
1941 info()->MarkAsDeferredCalling(); 1938 info()->MarkAsDeferredCalling();
1942 LOperand* value = UseRegister(instr->value()); 1939 LOperand* value = UseRegister(instr->value());
1943 LOperand* temp1 = TempRegister(); 1940 LOperand* temp1 = TempRegister();
1944 LOperand* temp2 = TempRegister(); 1941 LOperand* temp2 = TempRegister();
1945 1942
1946 // Make sure that the temp and result_temp registers are 1943 // Make sure that the temp and result_temp registers are
1947 // different. 1944 // different.
1948 LUnallocated* result_temp = TempRegister(); 1945 LUnallocated* result_temp = TempRegister();
1949 LNumberTagD* result = new(zone()) LNumberTagD(value, temp1, temp2); 1946 LNumberTagD* result = new(zone()) LNumberTagD(value, temp1, temp2);
1950 Define(result, result_temp); 1947 Define(result, result_temp);
1951 return AssignPointerMap(result); 1948 return AssignPointerMap(result);
1952 } else if (to.IsSmi()) { 1949 } else if (to.IsSmi()) {
1953 LOperand* value = UseRegister(instr->value()); 1950 LOperand* value = UseRegister(instr->value());
1954 return AssignEnvironment(DefineAsRegister(new(zone()) LDoubleToSmi(value, 1951 return AssignEnvironment(
1955 TempRegister(), TempRegister()))); 1952 DefineAsRegister(new(zone()) LDoubleToSmi(value)));
1956 } else { 1953 } else {
1957 ASSERT(to.IsInteger32()); 1954 ASSERT(to.IsInteger32());
1958 LOperand* value = UseRegister(instr->value()); 1955 LOperand* value = UseRegister(instr->value());
1959 LOperand* temp1 = TempRegister(); 1956 LDoubleToI* res = new(zone()) LDoubleToI(value);
1960 LOperand* temp2 = instr->CanTruncateToInt32() ? TempRegister() : NULL;
1961 LDoubleToI* res = new(zone()) LDoubleToI(value, temp1, temp2);
1962 return AssignEnvironment(DefineAsRegister(res)); 1957 return AssignEnvironment(DefineAsRegister(res));
1963 } 1958 }
1964 } else if (from.IsInteger32()) { 1959 } else if (from.IsInteger32()) {
1965 info()->MarkAsDeferredCalling(); 1960 info()->MarkAsDeferredCalling();
1966 if (to.IsTagged()) { 1961 if (to.IsTagged()) {
1967 HValue* val = instr->value(); 1962 HValue* val = instr->value();
1968 LOperand* value = UseRegisterAtStart(val); 1963 LOperand* value = UseRegisterAtStart(val);
1969 if (val->CheckFlag(HInstruction::kUint32)) { 1964 if (val->CheckFlag(HInstruction::kUint32)) {
1970 LNumberTagU* result = new(zone()) LNumberTagU(value); 1965 LNumberTagU* result = new(zone()) LNumberTagU(value);
1971 return AssignEnvironment(AssignPointerMap(DefineSameAsFirst(result))); 1966 return AssignEnvironment(AssignPointerMap(DefineSameAsFirst(result)));
(...skipping 627 matching lines...) Expand 10 before | Expand all | Expand 10 after
2599 2594
2600 2595
2601 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { 2596 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) {
2602 LOperand* object = UseRegister(instr->object()); 2597 LOperand* object = UseRegister(instr->object());
2603 LOperand* index = UseRegister(instr->index()); 2598 LOperand* index = UseRegister(instr->index());
2604 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); 2599 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index));
2605 } 2600 }
2606 2601
2607 2602
2608 } } // namespace v8::internal 2603 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698