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

Side by Side Diff: src/arm/full-codegen-arm.cc

Issue 9950015: [v8-dev] Adding missing SetCC before conditional branch. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 8 years, 8 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 | « no previous file | 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 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 3635 matching lines...) Expand 10 before | Expand all | Expand 10 after
3646 __ cmp(array_length, Operand(0)); 3646 __ cmp(array_length, Operand(0));
3647 __ Assert(gt, "No empty arrays here in EmitFastAsciiArrayJoin"); 3647 __ Assert(gt, "No empty arrays here in EmitFastAsciiArrayJoin");
3648 } 3648 }
3649 __ bind(&loop); 3649 __ bind(&loop);
3650 __ ldr(string, MemOperand(element, kPointerSize, PostIndex)); 3650 __ ldr(string, MemOperand(element, kPointerSize, PostIndex));
3651 __ JumpIfSmi(string, &bailout); 3651 __ JumpIfSmi(string, &bailout);
3652 __ ldr(scratch1, FieldMemOperand(string, HeapObject::kMapOffset)); 3652 __ ldr(scratch1, FieldMemOperand(string, HeapObject::kMapOffset));
3653 __ ldrb(scratch1, FieldMemOperand(scratch1, Map::kInstanceTypeOffset)); 3653 __ ldrb(scratch1, FieldMemOperand(scratch1, Map::kInstanceTypeOffset));
3654 __ JumpIfInstanceTypeIsNotSequentialAscii(scratch1, scratch2, &bailout); 3654 __ JumpIfInstanceTypeIsNotSequentialAscii(scratch1, scratch2, &bailout);
3655 __ ldr(scratch1, FieldMemOperand(string, SeqAsciiString::kLengthOffset)); 3655 __ ldr(scratch1, FieldMemOperand(string, SeqAsciiString::kLengthOffset));
3656 __ add(string_length, string_length, Operand(scratch1)); 3656 __ add(string_length, string_length, Operand(scratch1), SetCC);
3657 __ b(vs, &bailout); 3657 __ b(vs, &bailout);
3658 __ cmp(element, elements_end); 3658 __ cmp(element, elements_end);
3659 __ b(lt, &loop); 3659 __ b(lt, &loop);
3660 3660
3661 // If array_length is 1, return elements[0], a string. 3661 // If array_length is 1, return elements[0], a string.
3662 __ cmp(array_length, Operand(1)); 3662 __ cmp(array_length, Operand(1));
3663 __ b(ne, &not_size_one_array); 3663 __ b(ne, &not_size_one_array);
3664 __ ldr(r0, FieldMemOperand(elements, FixedArray::kHeaderSize)); 3664 __ ldr(r0, FieldMemOperand(elements, FixedArray::kHeaderSize));
3665 __ b(&done); 3665 __ b(&done);
3666 3666
(...skipping 16 matching lines...) Expand all
3683 // smi but the other values are, so the result is a smi 3683 // smi but the other values are, so the result is a smi
3684 __ ldr(scratch1, FieldMemOperand(separator, SeqAsciiString::kLengthOffset)); 3684 __ ldr(scratch1, FieldMemOperand(separator, SeqAsciiString::kLengthOffset));
3685 __ sub(string_length, string_length, Operand(scratch1)); 3685 __ sub(string_length, string_length, Operand(scratch1));
3686 __ smull(scratch2, ip, array_length, scratch1); 3686 __ smull(scratch2, ip, array_length, scratch1);
3687 // Check for smi overflow. No overflow if higher 33 bits of 64-bit result are 3687 // Check for smi overflow. No overflow if higher 33 bits of 64-bit result are
3688 // zero. 3688 // zero.
3689 __ cmp(ip, Operand(0)); 3689 __ cmp(ip, Operand(0));
3690 __ b(ne, &bailout); 3690 __ b(ne, &bailout);
3691 __ tst(scratch2, Operand(0x80000000)); 3691 __ tst(scratch2, Operand(0x80000000));
3692 __ b(ne, &bailout); 3692 __ b(ne, &bailout);
3693 __ add(string_length, string_length, Operand(scratch2)); 3693 __ add(string_length, string_length, Operand(scratch2), SetCC);
3694 __ b(vs, &bailout); 3694 __ b(vs, &bailout);
3695 __ SmiUntag(string_length); 3695 __ SmiUntag(string_length);
3696 3696
3697 // Get first element in the array to free up the elements register to be used 3697 // Get first element in the array to free up the elements register to be used
3698 // for the result. 3698 // for the result.
3699 __ add(element, 3699 __ add(element,
3700 elements, Operand(FixedArray::kHeaderSize - kHeapObjectTag)); 3700 elements, Operand(FixedArray::kHeaderSize - kHeapObjectTag));
3701 result = elements; // End of live range for elements. 3701 result = elements; // End of live range for elements.
3702 elements = no_reg; 3702 elements = no_reg;
3703 // Live values in registers: 3703 // Live values in registers:
(...skipping 815 matching lines...) Expand 10 before | Expand all | Expand 10 after
4519 *context_length = 0; 4519 *context_length = 0;
4520 return previous_; 4520 return previous_;
4521 } 4521 }
4522 4522
4523 4523
4524 #undef __ 4524 #undef __
4525 4525
4526 } } // namespace v8::internal 4526 } } // namespace v8::internal
4527 4527
4528 #endif // V8_TARGET_ARCH_ARM 4528 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698