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

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

Issue 7191007: Cleanup: use JumpIf[Not]Smi() whenever we can (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: introduced new macro Created 9 years, 6 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/arm/lithium-codegen-arm.cc ('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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 2674 matching lines...) Expand 10 before | Expand all | Expand 10 after
2685 } 2685 }
2686 2686
2687 void MacroAssembler::JumpIfNotBothSequentialAsciiStrings(Register first, 2687 void MacroAssembler::JumpIfNotBothSequentialAsciiStrings(Register first,
2688 Register second, 2688 Register second,
2689 Register scratch1, 2689 Register scratch1,
2690 Register scratch2, 2690 Register scratch2,
2691 Label* failure) { 2691 Label* failure) {
2692 // Check that neither is a smi. 2692 // Check that neither is a smi.
2693 STATIC_ASSERT(kSmiTag == 0); 2693 STATIC_ASSERT(kSmiTag == 0);
2694 and_(scratch1, first, Operand(second)); 2694 and_(scratch1, first, Operand(second));
2695 tst(scratch1, Operand(kSmiTagMask)); 2695 JumpIfSmi(scratch1, failure);
2696 b(eq, failure);
2697 JumpIfNonSmisNotBothSequentialAsciiStrings(first, 2696 JumpIfNonSmisNotBothSequentialAsciiStrings(first,
2698 second, 2697 second,
2699 scratch1, 2698 scratch1,
2700 scratch2, 2699 scratch2,
2701 failure); 2700 failure);
2702 } 2701 }
2703 2702
2704 2703
2705 // Allocates a heap number or jumps to the need_gc label if the young space 2704 // Allocates a heap number or jumps to the need_gc label if the young space
2706 // is full and a scavenge is needed. 2705 // is full and a scavenge is needed.
(...skipping 450 matching lines...) Expand 10 before | Expand all | Expand 10 after
3157 void CodePatcher::EmitCondition(Condition cond) { 3156 void CodePatcher::EmitCondition(Condition cond) {
3158 Instr instr = Assembler::instr_at(masm_.pc_); 3157 Instr instr = Assembler::instr_at(masm_.pc_);
3159 instr = (instr & ~kCondMask) | cond; 3158 instr = (instr & ~kCondMask) | cond;
3160 masm_.emit(instr); 3159 masm_.emit(instr);
3161 } 3160 }
3162 3161
3163 3162
3164 } } // namespace v8::internal 3163 } } // namespace v8::internal
3165 3164
3166 #endif // V8_TARGET_ARCH_ARM 3165 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/lithium-codegen-arm.cc ('k') | src/arm/stub-cache-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698