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

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

Issue 13932006: Replace OS::MemCopy with OS::MemMove (just as fast but more flexible). (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: addressed comments Created 7 years, 8 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/lithium-codegen-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 // 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 // 44 //
45 // where B = ~b. Only the high 16 bits are affected. 45 // where B = ~b. Only the high 16 bits are affected.
46 uint64_t high16; 46 uint64_t high16;
47 high16 = (Bits(17, 16) << 4) | Bits(3, 0); // xxxxxxxx,xxcdefgh. 47 high16 = (Bits(17, 16) << 4) | Bits(3, 0); // xxxxxxxx,xxcdefgh.
48 high16 |= (0xff * Bit(18)) << 6; // xxbbbbbb,bbxxxxxx. 48 high16 |= (0xff * Bit(18)) << 6; // xxbbbbbb,bbxxxxxx.
49 high16 |= (Bit(18) ^ 1) << 14; // xBxxxxxx,xxxxxxxx. 49 high16 |= (Bit(18) ^ 1) << 14; // xBxxxxxx,xxxxxxxx.
50 high16 |= Bit(19) << 15; // axxxxxxx,xxxxxxxx. 50 high16 |= Bit(19) << 15; // axxxxxxx,xxxxxxxx.
51 51
52 uint64_t imm = high16 << 48; 52 uint64_t imm = high16 << 48;
53 double d; 53 double d;
54 memcpy(&d, &imm, 8); 54 OS::MemCopy(&d, &imm, 8);
55 return d; 55 return d;
56 } 56 }
57 57
58 58
59 // These register names are defined in a way to match the native disassembler 59 // These register names are defined in a way to match the native disassembler
60 // formatting. See for example the command "objdump -d <binary file>". 60 // formatting. See for example the command "objdump -d <binary file>".
61 const char* Registers::names_[kNumRegisters] = { 61 const char* Registers::names_[kNumRegisters] = {
62 "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", 62 "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7",
63 "r8", "r9", "r10", "fp", "ip", "sp", "lr", "pc", 63 "r8", "r9", "r10", "fp", "ip", "sp", "lr", "pc",
64 }; 64 };
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 } 145 }
146 146
147 // No register with the requested name found. 147 // No register with the requested name found.
148 return kNoRegister; 148 return kNoRegister;
149 } 149 }
150 150
151 151
152 } } // namespace v8::internal 152 } } // namespace v8::internal
153 153
154 #endif // V8_TARGET_ARCH_ARM 154 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/assembler-arm.cc ('k') | src/arm/lithium-codegen-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698