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

Side by Side Diff: src/a64/lithium-codegen-a64.cc

Issue 149483002: A64: Handle Smi representation in MathAbs and fix MathPowStub (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: Do not smi-untag integer32 exponents in MathPower 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/a64/lithium-a64.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 3507 matching lines...) Expand 10 before | Expand all | Expand 10 after
3518 Label allocation; 3518 Label allocation;
3519 }; 3519 };
3520 3520
3521 // TODO(jbramley): The early-exit mechanism would skip the new frame handling 3521 // TODO(jbramley): The early-exit mechanism would skip the new frame handling
3522 // in GenerateDeferredCode. Tidy this up. 3522 // in GenerateDeferredCode. Tidy this up.
3523 ASSERT(!NeedsDeferredFrame()); 3523 ASSERT(!NeedsDeferredFrame());
3524 3524
3525 DeferredMathAbsTagged* deferred = 3525 DeferredMathAbsTagged* deferred =
3526 new(zone()) DeferredMathAbsTagged(this, instr); 3526 new(zone()) DeferredMathAbsTagged(this, instr);
3527 3527
3528 ASSERT(instr->hydrogen()->value()->representation().IsTagged()); 3528 ASSERT(instr->hydrogen()->value()->representation().IsTagged() ||
3529 instr->hydrogen()->value()->representation().IsSmi());
3529 Register input = ToRegister(instr->value()); 3530 Register input = ToRegister(instr->value());
3530 Register result_bits = ToRegister(instr->temp3()); 3531 Register result_bits = ToRegister(instr->temp3());
3531 Register result = ToRegister(instr->result()); 3532 Register result = ToRegister(instr->result());
3532 Label done; 3533 Label done;
3533 3534
3534 // Handle smis inline. 3535 // Handle smis inline.
3535 // We can treat smis as 64-bit integers, since the (low-order) tag bits will 3536 // We can treat smis as 64-bit integers, since the (low-order) tag bits will
3536 // never get set by the negation. This is therefore the same as the Integer32 3537 // never get set by the negation. This is therefore the same as the Integer32
3537 // case in DoMathAbs, except that it operates on 64-bit values. 3538 // case in DoMathAbs, except that it operates on 64-bit values.
3538 STATIC_ASSERT((kSmiValueSize == 32) && (kSmiShift == 32) && (kSmiTag == 0)); 3539 STATIC_ASSERT((kSmiValueSize == 32) && (kSmiShift == 32) && (kSmiTag == 0));
(...skipping 1919 matching lines...) Expand 10 before | Expand all | Expand 10 after
5458 __ Bind(&out_of_object); 5459 __ Bind(&out_of_object);
5459 __ Ldr(result, FieldMemOperand(object, JSObject::kPropertiesOffset)); 5460 __ Ldr(result, FieldMemOperand(object, JSObject::kPropertiesOffset));
5460 // Index is equal to negated out of object property index plus 1. 5461 // Index is equal to negated out of object property index plus 1.
5461 __ Sub(result, result, Operand::UntagSmiAndScale(index, kPointerSizeLog2)); 5462 __ Sub(result, result, Operand::UntagSmiAndScale(index, kPointerSizeLog2));
5462 __ Ldr(result, FieldMemOperand(result, 5463 __ Ldr(result, FieldMemOperand(result,
5463 FixedArray::kHeaderSize - kPointerSize)); 5464 FixedArray::kHeaderSize - kPointerSize));
5464 __ Bind(&done); 5465 __ Bind(&done);
5465 } 5466 }
5466 5467
5467 } } // namespace v8::internal 5468 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/a64/lithium-a64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698