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

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

Issue 206012: Clean up the ifdefs on ARM.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
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 | Annotate | Revision Log
« no previous file with comments | « no previous file | src/arm/constants-arm.h » ('j') | src/arm/macro-assembler-arm.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 4317 matching lines...) Expand 10 before | Expand all | Expand 10 after
4328 4328
4329 4329
4330 // Count leading zeros in a 32 bit word. On ARM5 and later it uses the clz 4330 // Count leading zeros in a 32 bit word. On ARM5 and later it uses the clz
4331 // instruction. On pre-ARM5 hardware this routine gives the wrong answer for 0 4331 // instruction. On pre-ARM5 hardware this routine gives the wrong answer for 0
4332 // (31 instead of 32). 4332 // (31 instead of 32).
4333 static void CountLeadingZeros( 4333 static void CountLeadingZeros(
4334 MacroAssembler* masm, 4334 MacroAssembler* masm,
4335 Register source, 4335 Register source,
4336 Register scratch, 4336 Register scratch,
4337 Register zeros) { 4337 Register zeros) {
4338 #ifdef __ARM_ARCH_5__ 4338 #ifdef CAN_USE_ARMV5_INSTRUCTIONS
4339 __ clz(zeros, source); // This instruction is only supported after ARM5. 4339 __ clz(zeros, source); // This instruction is only supported after ARM5.
4340 #else 4340 #else
4341 __ mov(zeros, Operand(0)); 4341 __ mov(zeros, Operand(0));
4342 __ mov(scratch, source); 4342 __ mov(scratch, source);
4343 // Top 16. 4343 // Top 16.
4344 __ tst(scratch, Operand(0xffff0000)); 4344 __ tst(scratch, Operand(0xffff0000));
4345 __ add(zeros, zeros, Operand(16), LeaveCC, eq); 4345 __ add(zeros, zeros, Operand(16), LeaveCC, eq);
4346 __ mov(scratch, Operand(scratch, LSL, 16), LeaveCC, eq); 4346 __ mov(scratch, Operand(scratch, LSL, 16), LeaveCC, eq);
4347 // Top 8. 4347 // Top 8.
4348 __ tst(scratch, Operand(0xff000000)); 4348 __ tst(scratch, Operand(0xff000000));
(...skipping 1919 matching lines...) Expand 10 before | Expand all | Expand 10 after
6268 int CompareStub::MinorKey() { 6268 int CompareStub::MinorKey() {
6269 // Encode the two parameters in a unique 16 bit value. 6269 // Encode the two parameters in a unique 16 bit value.
6270 ASSERT(static_cast<unsigned>(cc_) >> 28 < (1 << 15)); 6270 ASSERT(static_cast<unsigned>(cc_) >> 28 < (1 << 15));
6271 return (static_cast<unsigned>(cc_) >> 27) | (strict_ ? 1 : 0); 6271 return (static_cast<unsigned>(cc_) >> 27) | (strict_ ? 1 : 0);
6272 } 6272 }
6273 6273
6274 6274
6275 #undef __ 6275 #undef __
6276 6276
6277 } } // namespace v8::internal 6277 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/arm/constants-arm.h » ('j') | src/arm/macro-assembler-arm.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698