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

Unified Diff: src/a64/lithium-codegen-a64.cc

Issue 153913002: A64: Synchronize with r16756. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: Created 6 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/a64/lithium-a64.cc ('k') | src/a64/stub-cache-a64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/a64/lithium-codegen-a64.cc
diff --git a/src/a64/lithium-codegen-a64.cc b/src/a64/lithium-codegen-a64.cc
index bf391e2947131dbc026a9043957329c5642243cf..567d5c47096df2ff3bd2e675e7e69376f67ede15 100644
--- a/src/a64/lithium-codegen-a64.cc
+++ b/src/a64/lithium-codegen-a64.cc
@@ -3722,6 +3722,7 @@ void LCodeGen::DoMathCos(LMathCos* instr) {
}
+// TODO(all): This will disappear when Math.random is rewritten in JavaScript.
void LCodeGen::DoRandom(LRandom* instr) {
class DeferredDoRandom: public LDeferredCode {
public:
@@ -3786,6 +3787,7 @@ void LCodeGen::DoRandom(LRandom* instr) {
}
+// TODO(all): This will disappear when Math.random is rewritten in JavaScript.
void LCodeGen::DoDeferredRandom(LRandom* instr) {
__ CallCFunction(ExternalReference::random_uint32_function(isolate()), 1);
// Return value is in x0.
@@ -4537,6 +4539,8 @@ void LCodeGen::DoReturn(LReturn* instr) {
void LCodeGen::DoSeqStringSetChar(LSeqStringSetChar* instr) {
+ // TODO(all): Port ARM optimizations from r16707.
+
String::Encoding encoding = instr->encoding();
Register string = ToRegister(instr->string());
Register index = ToRegister(instr->index());
@@ -5270,17 +5274,21 @@ void LCodeGen::DoTaggedToI(LTaggedToI* instr) {
Register input = ToRegister(instr->value());
Register output = ToRegister(instr->result());
- DeferredTaggedToI* deferred = new(zone()) DeferredTaggedToI(this, instr);
+ if (instr->hydrogen()->value()->representation().IsSmi()) {
+ __ SmiUntag(input);
+ } else {
+ DeferredTaggedToI* deferred = new(zone()) DeferredTaggedToI(this, instr);
- // TODO(jbramley): We can't use JumpIfNotSmi here because the tbz it uses
- // doesn't always have enough range. Consider making a variant of it, or a
- // TestIsSmi helper.
- STATIC_ASSERT(kSmiTag == 0);
- __ Tst(input, kSmiTagMask);
- __ B(ne, deferred->entry());
+ // TODO(jbramley): We can't use JumpIfNotSmi here because the tbz it uses
+ // doesn't always have enough range. Consider making a variant of it, or a
+ // TestIsSmi helper.
+ STATIC_ASSERT(kSmiTag == 0);
+ __ Tst(input, kSmiTagMask);
+ __ B(ne, deferred->entry());
- __ SmiUntag(output, input);
- __ Bind(deferred->exit());
+ __ SmiUntag(output, input);
+ __ Bind(deferred->exit());
+ }
}
« no previous file with comments | « src/a64/lithium-a64.cc ('k') | src/a64/stub-cache-a64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698