OLD | NEW |
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 14 matching lines...) Expand all Loading... |
25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
27 | 27 |
28 #include "v8.h" | 28 #include "v8.h" |
29 | 29 |
30 #if defined(V8_TARGET_ARCH_ARM) | 30 #if defined(V8_TARGET_ARCH_ARM) |
31 | 31 |
32 #include "constants-arm.h" | 32 #include "constants-arm.h" |
33 | 33 |
34 | 34 |
35 namespace assembler { | 35 namespace v8 { |
36 namespace arm { | 36 namespace internal { |
37 | 37 |
38 namespace v8i = v8::internal; | 38 double Instruction::DoubleImmedVmov() const { |
39 | |
40 double Instr::DoubleImmedVmov() const { | |
41 // Reconstruct a double from the immediate encoded in the vmov instruction. | 39 // Reconstruct a double from the immediate encoded in the vmov instruction. |
42 // | 40 // |
43 // instruction: [xxxxxxxx,xxxxabcd,xxxxxxxx,xxxxefgh] | 41 // instruction: [xxxxxxxx,xxxxabcd,xxxxxxxx,xxxxefgh] |
44 // double: [aBbbbbbb,bbcdefgh,00000000,00000000, | 42 // double: [aBbbbbbb,bbcdefgh,00000000,00000000, |
45 // 00000000,00000000,00000000,00000000] | 43 // 00000000,00000000,00000000,00000000] |
46 // | 44 // |
47 // where B = ~b. Only the high 16 bits are affected. | 45 // where B = ~b. Only the high 16 bits are affected. |
48 uint64_t high16; | 46 uint64_t high16; |
49 high16 = (Bits(17, 16) << 4) | Bits(3, 0); // xxxxxxxx,xxcdefgh. | 47 high16 = (Bits(17, 16) << 4) | Bits(3, 0); // xxxxxxxx,xxcdefgh. |
50 high16 |= (0xff * Bit(18)) << 6; // xxbbbbbb,bbxxxxxx. | 48 high16 |= (0xff * Bit(18)) << 6; // xxbbbbbb,bbxxxxxx. |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 return aliases_[i].reg; | 140 return aliases_[i].reg; |
143 } | 141 } |
144 i++; | 142 i++; |
145 } | 143 } |
146 | 144 |
147 // No register with the requested name found. | 145 // No register with the requested name found. |
148 return kNoRegister; | 146 return kNoRegister; |
149 } | 147 } |
150 | 148 |
151 | 149 |
152 } } // namespace assembler::arm | 150 } } // namespace v8::internal |
153 | 151 |
154 #endif // V8_TARGET_ARCH_ARM | 152 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |