Revision: 19389
Author: [email protected]
Date: Fri Feb 14 16:41:59 2014 UTC
Log: Debug-mode check added: optimized keyed store of a smi on x64 is
done to a entry containing a smi.
[email protected]
Review URL: https://codereview.chromium.org/167063002
http://code.google.com/p/v8/source/detail?r=19389
Modified:
/branches/bleeding_edge/src/x64/lithium-codegen-x64.cc
=======================================
--- /branches/bleeding_edge/src/x64/lithium-codegen-x64.cc Fri Feb 14
15:52:24 2014 UTC
+++ /branches/bleeding_edge/src/x64/lithium-codegen-x64.cc Fri Feb 14
16:41:59 2014 UTC
@@ -3950,8 +3950,9 @@
hinstr->value()->representation().IsInteger32()) {
ASSERT(hinstr->store_mode() == STORE_TO_INITIALIZED_ENTRY);
#ifdef DEBUG
- __ movq(kScratchRegister, FieldOperand(write_register, offset));
- __ AssertSmi(kScratchRegister);
+ Register scratch = kScratchRegister;
+ __ Load(scratch, FieldOperand(write_register, offset), representation);
+ __ AssertSmi(scratch);
#endif
// Store int value directly to upper half of the smi.
STATIC_ASSERT(kSmiTag == 0);
@@ -4206,6 +4207,17 @@
if (representation.IsInteger32()) {
ASSERT(hinstr->store_mode() == STORE_TO_INITIALIZED_ENTRY);
ASSERT(hinstr->elements_kind() == FAST_SMI_ELEMENTS);
+#ifdef DEBUG
+ Register scratch = kScratchRegister;
+ __ Load(scratch,
+ BuildFastArrayOperand(instr->elements(),
+ key,
+ FAST_ELEMENTS,
+ offset,
+ instr->additional_index()),
+ Representation::Smi());
+ __ AssertSmi(scratch);
+#endif
// Store int value directly to upper half of the smi.
STATIC_ASSERT(kSmiTag == 0);
STATIC_ASSERT(kSmiTagSize + kSmiShiftSize == 32);
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.