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

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

Issue 6022006: Revert r6088. (Closed) Base URL: https://v8.googlecode.com/svn/trunk
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') | 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 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
187 void MacroAssembler::Swap(Register reg1, 181 void MacroAssembler::Swap(Register reg1,
188 Register reg2, 182 Register reg2,
189 Register scratch, 183 Register scratch,
190 Condition cond) { 184 Condition cond) {
191 if (scratch.is(no_reg)) { 185 if (scratch.is(no_reg)) {
192 eor(reg1, reg1, Operand(reg2), LeaveCC, cond); 186 eor(reg1, reg1, Operand(reg2), LeaveCC, cond);
193 eor(reg2, reg2, Operand(reg1), LeaveCC, cond); 187 eor(reg2, reg2, Operand(reg1), LeaveCC, cond);
194 eor(reg1, reg1, Operand(reg2), LeaveCC, cond); 188 eor(reg1, reg1, Operand(reg2), LeaveCC, cond);
195 } else { 189 } else {
196 mov(scratch, reg1, LeaveCC, cond); 190 mov(scratch, reg1, LeaveCC, cond);
(...skipping 623 matching lines...) Expand 10 before | Expand all | Expand 10 after
820 // code field in the function to allow recompilation to take effect 814 // code field in the function to allow recompilation to take effect
821 // without changing any of the call sites. 815 // without changing any of the call sites.
822 ldr(r3, FieldMemOperand(r1, JSFunction::kCodeEntryOffset)); 816 ldr(r3, FieldMemOperand(r1, JSFunction::kCodeEntryOffset));
823 InvokeCode(r3, expected, actual, flag); 817 InvokeCode(r3, expected, actual, flag);
824 } else { 818 } else {
825 InvokeCode(code, expected, actual, RelocInfo::CODE_TARGET, flag); 819 InvokeCode(code, expected, actual, RelocInfo::CODE_TARGET, flag);
826 } 820 }
827 } 821 }
828 822
829 823
830 void MacroAssembler::IsObjectJSObjectType(Register heap_object,
831 Register map,
832 Register scratch,
833 Label* fail) {
834 ldr(map, FieldMemOperand(heap_object, HeapObject::kMapOffset));
835 IsInstanceJSObjectType(map, scratch, fail);
836 }
837
838
839 void MacroAssembler::IsInstanceJSObjectType(Register map,
840 Register scratch,
841 Label* fail) {
842 ldrb(scratch, FieldMemOperand(map, Map::kInstanceTypeOffset));
843 cmp(scratch, Operand(FIRST_JS_OBJECT_TYPE));
844 b(lt, fail);
845 cmp(scratch, Operand(LAST_JS_OBJECT_TYPE));
846 b(gt, fail);
847 }
848
849
850 void MacroAssembler::IsObjectJSStringType(Register object,
851 Register scratch,
852 Label* fail) {
853 ASSERT(kNotStringTag != 0);
854
855 ldr(scratch, FieldMemOperand(object, HeapObject::kMapOffset));
856 ldrb(scratch, FieldMemOperand(scratch, Map::kInstanceTypeOffset));
857 tst(scratch, Operand(kIsNotStringMask));
858 b(nz, fail);
859 }
860
861
862 #ifdef ENABLE_DEBUGGER_SUPPORT 824 #ifdef ENABLE_DEBUGGER_SUPPORT
863 void MacroAssembler::DebugBreak() { 825 void MacroAssembler::DebugBreak() {
864 ASSERT(allow_stub_calls()); 826 ASSERT(allow_stub_calls());
865 mov(r0, Operand(0, RelocInfo::NONE)); 827 mov(r0, Operand(0, RelocInfo::NONE));
866 mov(r1, Operand(ExternalReference(Runtime::kDebugBreak))); 828 mov(r1, Operand(ExternalReference(Runtime::kDebugBreak)));
867 CEntryStub ces(1); 829 CEntryStub ces(1);
868 Call(ces.GetCode(), RelocInfo::DEBUG_BREAK); 830 Call(ces.GetCode(), RelocInfo::DEBUG_BREAK);
869 } 831 }
870 #endif 832 #endif
871 833
(...skipping 1273 matching lines...) Expand 10 before | Expand all | Expand 10 after
2145 2107
2146 void CodePatcher::Emit(Address addr) { 2108 void CodePatcher::Emit(Address addr) {
2147 masm()->emit(reinterpret_cast<Instr>(addr)); 2109 masm()->emit(reinterpret_cast<Instr>(addr));
2148 } 2110 }
2149 #endif // ENABLE_DEBUGGER_SUPPORT 2111 #endif // ENABLE_DEBUGGER_SUPPORT
2150 2112
2151 2113
2152 } } // namespace v8::internal 2114 } } // namespace v8::internal
2153 2115
2154 #endif // V8_TARGET_ARCH_ARM 2116 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/macro-assembler-arm.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698