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

Side by Side Diff: src/hydrogen-instructions.cc

Issue 145273005: A64: Implement LMathFloorOfDiv and enable the instruction in hydrogen (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: Created 6 years, 11 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 1508 matching lines...) Expand 10 before | Expand all | Expand 10 after
1519 // with its input. This happens before the representation changes are 1519 // with its input. This happens before the representation changes are
1520 // introduced. 1520 // introduced.
1521 1521
1522 // TODO(2205): The above comment is lying. All of this happens 1522 // TODO(2205): The above comment is lying. All of this happens
1523 // *after* representation changes are introduced. We should check 1523 // *after* representation changes are introduced. We should check
1524 // for value->IsChange() and react accordingly if yes. 1524 // for value->IsChange() and react accordingly if yes.
1525 1525
1526 if (value()->representation().IsInteger32()) return value(); 1526 if (value()->representation().IsInteger32()) return value();
1527 1527
1528 #if defined(V8_TARGET_ARCH_ARM) || defined(V8_TARGET_ARCH_IA32) || \ 1528 #if defined(V8_TARGET_ARCH_ARM) || defined(V8_TARGET_ARCH_IA32) || \
1529 defined(V8_TARGET_ARCH_X64) 1529 defined(V8_TARGET_ARCH_X64) || defined(V8_TARGET_ARCH_A64)
1530 if (value()->IsDiv() && (value()->UseCount() == 1)) { 1530 if (value()->IsDiv() && (value()->UseCount() == 1)) {
1531 // TODO(2038): Implement this optimization for non ARM architectures. 1531 // TODO(2038): Implement this optimization for non ARM architectures.
1532 HDiv* hdiv = HDiv::cast(value()); 1532 HDiv* hdiv = HDiv::cast(value());
1533 HValue* left = hdiv->left(); 1533 HValue* left = hdiv->left();
1534 HValue* right = hdiv->right(); 1534 HValue* right = hdiv->right();
1535 // Try to simplify left and right values of the division. 1535 // Try to simplify left and right values of the division.
1536 HValue* new_left = 1536 HValue* new_left =
1537 LChunkBuilder::SimplifiedDividendForMathFloorOfDiv(left); 1537 LChunkBuilder::SimplifiedDividendForMathFloorOfDiv(left);
1538 HValue* new_right = 1538 HValue* new_right =
1539 LChunkBuilder::SimplifiedDivisorForMathFloorOfDiv(right); 1539 LChunkBuilder::SimplifiedDivisorForMathFloorOfDiv(right);
(...skipping 2317 matching lines...) Expand 10 before | Expand all | Expand 10 after
3857 case kBackingStore: 3857 case kBackingStore:
3858 if (!name_.is_null()) stream->Add(*String::cast(*name_)->ToCString()); 3858 if (!name_.is_null()) stream->Add(*String::cast(*name_)->ToCString());
3859 stream->Add("[backing-store]"); 3859 stream->Add("[backing-store]");
3860 break; 3860 break;
3861 } 3861 }
3862 3862
3863 stream->Add("@%d", offset()); 3863 stream->Add("@%d", offset());
3864 } 3864 }
3865 3865
3866 } } // namespace v8::internal 3866 } } // namespace v8::internal
OLDNEW
« src/a64/lithium-codegen-a64.cc ('K') | « src/a64/lithium-codegen-a64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698