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

Side by Side Diff: src/arm/macro-assembler-arm.cc

Issue 6062002: Merge 6006:6095 from bleeding_edge to experimental/gc branch. (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/gc/
Patch Set: Created 10 years 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/arm/macro-assembler-arm.h ('k') | src/arm/stub-cache-arm.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 } 171 }
172 172
173 173
174 void MacroAssembler::Drop(int count, Condition cond) { 174 void MacroAssembler::Drop(int count, Condition cond) {
175 if (count > 0) { 175 if (count > 0) {
176 add(sp, sp, Operand(count * kPointerSize), LeaveCC, cond); 176 add(sp, sp, Operand(count * kPointerSize), LeaveCC, cond);
177 } 177 }
178 } 178 }
179 179
180 180
181 void MacroAssembler::Ret(int drop, Condition cond) {
182 Drop(drop, cond);
183 Ret(cond);
184 }
185
186
181 void MacroAssembler::Swap(Register reg1, 187 void MacroAssembler::Swap(Register reg1,
182 Register reg2, 188 Register reg2,
183 Register scratch, 189 Register scratch,
184 Condition cond) { 190 Condition cond) {
185 if (scratch.is(no_reg)) { 191 if (scratch.is(no_reg)) {
186 eor(reg1, reg1, Operand(reg2), LeaveCC, cond); 192 eor(reg1, reg1, Operand(reg2), LeaveCC, cond);
187 eor(reg2, reg2, Operand(reg1), LeaveCC, cond); 193 eor(reg2, reg2, Operand(reg1), LeaveCC, cond);
188 eor(reg1, reg1, Operand(reg2), LeaveCC, cond); 194 eor(reg1, reg1, Operand(reg2), LeaveCC, cond);
189 } else { 195 } else {
190 mov(scratch, reg1, LeaveCC, cond); 196 mov(scratch, reg1, LeaveCC, cond);
(...skipping 624 matching lines...) Expand 10 before | Expand all | Expand 10 after
815 // code field in the function to allow recompilation to take effect 821 // code field in the function to allow recompilation to take effect
816 // without changing any of the call sites. 822 // without changing any of the call sites.
817 ldr(r3, FieldMemOperand(r1, JSFunction::kCodeEntryOffset)); 823 ldr(r3, FieldMemOperand(r1, JSFunction::kCodeEntryOffset));
818 InvokeCode(r3, expected, actual, flag); 824 InvokeCode(r3, expected, actual, flag);
819 } else { 825 } else {
820 InvokeCode(code, expected, actual, RelocInfo::CODE_TARGET, flag); 826 InvokeCode(code, expected, actual, RelocInfo::CODE_TARGET, flag);
821 } 827 }
822 } 828 }
823 829
824 830
831 void MacroAssembler::IsObjectJSObjectType(Register heap_object,
832 Register map,
833 Register scratch,
834 Label* fail) {
835 ldr(map, FieldMemOperand(heap_object, HeapObject::kMapOffset));
836 IsInstanceJSObjectType(map, scratch, fail);
837 }
838
839
840 void MacroAssembler::IsInstanceJSObjectType(Register map,
841 Register scratch,
842 Label* fail) {
843 ldrb(scratch, FieldMemOperand(map, Map::kInstanceTypeOffset));
844 cmp(scratch, Operand(FIRST_JS_OBJECT_TYPE));
845 b(lt, fail);
846 cmp(scratch, Operand(LAST_JS_OBJECT_TYPE));
847 b(gt, fail);
848 }
849
850
851 void MacroAssembler::IsObjectJSStringType(Register object,
852 Register scratch,
853 Label* fail) {
854 ASSERT(kNotStringTag != 0);
855
856 ldr(scratch, FieldMemOperand(object, HeapObject::kMapOffset));
857 ldrb(scratch, FieldMemOperand(scratch, Map::kInstanceTypeOffset));
858 tst(scratch, Operand(kIsNotStringMask));
859 b(nz, fail);
860 }
861
862
825 #ifdef ENABLE_DEBUGGER_SUPPORT 863 #ifdef ENABLE_DEBUGGER_SUPPORT
826 void MacroAssembler::DebugBreak() { 864 void MacroAssembler::DebugBreak() {
827 ASSERT(allow_stub_calls()); 865 ASSERT(allow_stub_calls());
828 mov(r0, Operand(0, RelocInfo::NONE)); 866 mov(r0, Operand(0, RelocInfo::NONE));
829 mov(r1, Operand(ExternalReference(Runtime::kDebugBreak))); 867 mov(r1, Operand(ExternalReference(Runtime::kDebugBreak)));
830 CEntryStub ces(1); 868 CEntryStub ces(1);
831 Call(ces.GetCode(), RelocInfo::DEBUG_BREAK); 869 Call(ces.GetCode(), RelocInfo::DEBUG_BREAK);
832 } 870 }
833 #endif 871 #endif
834 872
(...skipping 1273 matching lines...) Expand 10 before | Expand all | Expand 10 after
2108 2146
2109 void CodePatcher::Emit(Address addr) { 2147 void CodePatcher::Emit(Address addr) {
2110 masm()->emit(reinterpret_cast<Instr>(addr)); 2148 masm()->emit(reinterpret_cast<Instr>(addr));
2111 } 2149 }
2112 #endif // ENABLE_DEBUGGER_SUPPORT 2150 #endif // ENABLE_DEBUGGER_SUPPORT
2113 2151
2114 2152
2115 } } // namespace v8::internal 2153 } } // namespace v8::internal
2116 2154
2117 #endif // V8_TARGET_ARCH_ARM 2155 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/macro-assembler-arm.h ('k') | src/arm/stub-cache-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698