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

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

Issue 211063004: ARM64: fix DoDeferredTaggedToI (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 9 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/arm64/lithium-arm64.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 5499 matching lines...) Expand 10 before | Expand all | Expand 10 after
5510 Register scratch1 = ToRegister(temp1); 5510 Register scratch1 = ToRegister(temp1);
5511 DoubleRegister dbl_scratch1 = double_scratch(); 5511 DoubleRegister dbl_scratch1 = double_scratch();
5512 5512
5513 Label done; 5513 Label done;
5514 5514
5515 // Load heap object map. 5515 // Load heap object map.
5516 __ Ldr(scratch1, FieldMemOperand(input, HeapObject::kMapOffset)); 5516 __ Ldr(scratch1, FieldMemOperand(input, HeapObject::kMapOffset));
5517 5517
5518 if (instr->truncating()) { 5518 if (instr->truncating()) {
5519 Register output = ToRegister(instr->result()); 5519 Register output = ToRegister(instr->result());
5520 Register scratch2 = ToRegister(temp2);
5521 Label check_bools; 5520 Label check_bools;
5522 5521
5523 // If it's not a heap number, jump to undefined check. 5522 // If it's not a heap number, jump to undefined check.
5524 __ JumpIfNotRoot(scratch1, Heap::kHeapNumberMapRootIndex, &check_bools); 5523 __ JumpIfNotRoot(scratch1, Heap::kHeapNumberMapRootIndex, &check_bools);
5525 5524
5526 // A heap number: load value and convert to int32 using truncating function. 5525 // A heap number: load value and convert to int32 using truncating function.
5527 __ TruncateHeapNumberToI(output, input); 5526 __ TruncateHeapNumberToI(output, input);
5528 __ B(&done); 5527 __ B(&done);
5529 5528
5530 __ Bind(&check_bools); 5529 __ Bind(&check_bools);
5531 5530
5532 Register true_root = output; 5531 Register true_root = output;
5533 Register false_root = scratch2; 5532 Register false_root = scratch1;
5534 __ LoadTrueFalseRoots(true_root, false_root); 5533 __ LoadTrueFalseRoots(true_root, false_root);
5535 __ Cmp(scratch1, true_root); 5534 __ Cmp(input, true_root);
5536 __ Cset(output, eq); 5535 __ Cset(output, eq);
5537 __ Ccmp(scratch1, false_root, ZFlag, ne); 5536 __ Ccmp(input, false_root, ZFlag, ne);
5538 __ B(eq, &done); 5537 __ B(eq, &done);
5539 5538
5540 // Output contains zero, undefined is converted to zero for truncating 5539 // Output contains zero, undefined is converted to zero for truncating
5541 // conversions. 5540 // conversions.
5542 DeoptimizeIfNotRoot(input, Heap::kUndefinedValueRootIndex, 5541 DeoptimizeIfNotRoot(input, Heap::kUndefinedValueRootIndex,
5543 instr->environment()); 5542 instr->environment());
5544 } else { 5543 } else {
5545 Register output = ToRegister32(instr->result()); 5544 Register output = ToRegister32(instr->result());
5546 5545
5547 DoubleRegister dbl_scratch2 = ToDoubleRegister(temp2); 5546 DoubleRegister dbl_scratch2 = ToDoubleRegister(temp2);
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after
5888 __ Bind(&out_of_object); 5887 __ Bind(&out_of_object);
5889 __ Ldr(result, FieldMemOperand(object, JSObject::kPropertiesOffset)); 5888 __ Ldr(result, FieldMemOperand(object, JSObject::kPropertiesOffset));
5890 // Index is equal to negated out of object property index plus 1. 5889 // Index is equal to negated out of object property index plus 1.
5891 __ Sub(result, result, Operand::UntagSmiAndScale(index, kPointerSizeLog2)); 5890 __ Sub(result, result, Operand::UntagSmiAndScale(index, kPointerSizeLog2));
5892 __ Ldr(result, FieldMemOperand(result, 5891 __ Ldr(result, FieldMemOperand(result,
5893 FixedArray::kHeaderSize - kPointerSize)); 5892 FixedArray::kHeaderSize - kPointerSize));
5894 __ Bind(&done); 5893 __ Bind(&done);
5895 } 5894 }
5896 5895
5897 } } // namespace v8::internal 5896 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm64/lithium-arm64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698