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

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

Issue 306453005: Replace some calls to MemCopy with small constant sizes with memcpy (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 7 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/assembler-arm.cc ('k') | src/arm/simulator-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 2009 the V8 project authors. All rights reserved. 1 // Copyright 2009 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "v8.h" 5 #include "v8.h"
6 6
7 #if V8_TARGET_ARCH_ARM 7 #if V8_TARGET_ARCH_ARM
8 8
9 #include "constants-arm.h" 9 #include "constants-arm.h"
10 10
(...skipping 10 matching lines...) Expand all
21 // 21 //
22 // where B = ~b. Only the high 16 bits are affected. 22 // where B = ~b. Only the high 16 bits are affected.
23 uint64_t high16; 23 uint64_t high16;
24 high16 = (Bits(17, 16) << 4) | Bits(3, 0); // xxxxxxxx,xxcdefgh. 24 high16 = (Bits(17, 16) << 4) | Bits(3, 0); // xxxxxxxx,xxcdefgh.
25 high16 |= (0xff * Bit(18)) << 6; // xxbbbbbb,bbxxxxxx. 25 high16 |= (0xff * Bit(18)) << 6; // xxbbbbbb,bbxxxxxx.
26 high16 |= (Bit(18) ^ 1) << 14; // xBxxxxxx,xxxxxxxx. 26 high16 |= (Bit(18) ^ 1) << 14; // xBxxxxxx,xxxxxxxx.
27 high16 |= Bit(19) << 15; // axxxxxxx,xxxxxxxx. 27 high16 |= Bit(19) << 15; // axxxxxxx,xxxxxxxx.
28 28
29 uint64_t imm = high16 << 48; 29 uint64_t imm = high16 << 48;
30 double d; 30 double d;
31 MemCopy(&d, &imm, 8); 31 memcpy(&d, &imm, 8);
32 return d; 32 return d;
33 } 33 }
34 34
35 35
36 // These register names are defined in a way to match the native disassembler 36 // These register names are defined in a way to match the native disassembler
37 // formatting. See for example the command "objdump -d <binary file>". 37 // formatting. See for example the command "objdump -d <binary file>".
38 const char* Registers::names_[kNumRegisters] = { 38 const char* Registers::names_[kNumRegisters] = {
39 "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", 39 "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7",
40 "r8", "r9", "r10", "fp", "ip", "sp", "lr", "pc", 40 "r8", "r9", "r10", "fp", "ip", "sp", "lr", "pc",
41 }; 41 };
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 } 122 }
123 123
124 // No register with the requested name found. 124 // No register with the requested name found.
125 return kNoRegister; 125 return kNoRegister;
126 } 126 }
127 127
128 128
129 } } // namespace v8::internal 129 } } // namespace v8::internal
130 130
131 #endif // V8_TARGET_ARCH_ARM 131 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/assembler-arm.cc ('k') | src/arm/simulator-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698