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

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

Issue 173567: ARM native regexps. (Closed)
Patch Set: Created 11 years, 3 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
OLDNEW
1 // Copyright 2006-2009 the V8 project authors. All rights reserved. 1 // Copyright 2006-2009 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 5655 matching lines...) Expand 10 before | Expand all | Expand 10 after
5666 __ bind(&not_smi); 5666 __ bind(&not_smi);
5667 __ CompareObjectType(r0, r1, r1, HEAP_NUMBER_TYPE); 5667 __ CompareObjectType(r0, r1, r1, HEAP_NUMBER_TYPE);
5668 __ b(ne, &slow); 5668 __ b(ne, &slow);
5669 // r0 is a heap number. Get a new heap number in r1. 5669 // r0 is a heap number. Get a new heap number in r1.
5670 if (overwrite_) { 5670 if (overwrite_) {
5671 __ ldr(r2, FieldMemOperand(r0, HeapNumber::kExponentOffset)); 5671 __ ldr(r2, FieldMemOperand(r0, HeapNumber::kExponentOffset));
5672 __ eor(r2, r2, Operand(HeapNumber::kSignMask)); // Flip sign. 5672 __ eor(r2, r2, Operand(HeapNumber::kSignMask)); // Flip sign.
5673 __ str(r2, FieldMemOperand(r0, HeapNumber::kExponentOffset)); 5673 __ str(r2, FieldMemOperand(r0, HeapNumber::kExponentOffset));
5674 } else { 5674 } else {
5675 AllocateHeapNumber(masm, &slow, r1, r2, r3); 5675 AllocateHeapNumber(masm, &slow, r1, r2, r3);
5676 __ ldr(r2, FieldMemOperand(r0, HeapNumber::kMantissaOffset)); 5676 __ ldr(r3, FieldMemOperand(r0, HeapNumber::kMantissaOffset));
5677 __ str(r2, FieldMemOperand(r1, HeapNumber::kMantissaOffset));
5678 __ ldr(r2, FieldMemOperand(r0, HeapNumber::kExponentOffset)); 5677 __ ldr(r2, FieldMemOperand(r0, HeapNumber::kExponentOffset));
5678 __ str(r3, FieldMemOperand(r1, HeapNumber::kMantissaOffset));
5679 __ eor(r2, r2, Operand(HeapNumber::kSignMask)); // Flip sign. 5679 __ eor(r2, r2, Operand(HeapNumber::kSignMask)); // Flip sign.
5680 __ str(r2, FieldMemOperand(r1, HeapNumber::kExponentOffset)); 5680 __ str(r2, FieldMemOperand(r1, HeapNumber::kExponentOffset));
5681 __ mov(r0, Operand(r1)); 5681 __ mov(r0, Operand(r1));
5682 } 5682 }
5683 __ StubReturn(1); 5683 __ StubReturn(1);
5684 } 5684 }
5685 5685
5686 5686
5687 void CEntryStub::GenerateThrowTOS(MacroAssembler* masm) { 5687 void CEntryStub::GenerateThrowTOS(MacroAssembler* masm) {
5688 // r0 holds the exception. 5688 // r0 holds the exception.
(...skipping 568 matching lines...) Expand 10 before | Expand all | Expand 10 after
6257 int CompareStub::MinorKey() { 6257 int CompareStub::MinorKey() {
6258 // Encode the two parameters in a unique 16 bit value. 6258 // Encode the two parameters in a unique 16 bit value.
6259 ASSERT(static_cast<unsigned>(cc_) >> 28 < (1 << 15)); 6259 ASSERT(static_cast<unsigned>(cc_) >> 28 < (1 << 15));
6260 return (static_cast<unsigned>(cc_) >> 27) | (strict_ ? 1 : 0); 6260 return (static_cast<unsigned>(cc_) >> 27) | (strict_ ? 1 : 0);
6261 } 6261 }
6262 6262
6263 6263
6264 #undef __ 6264 #undef __
6265 6265
6266 } } // namespace v8::internal 6266 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698