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

Side by Side Diff: src/ppc/constants-ppc.h

Issue 2619763003: PPC: Implement VSX instructions (Closed)
Patch Set: Fixed native assembler code Created 3 years, 11 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
« no previous file with comments | « src/ppc/assembler-ppc.cc ('k') | src/ppc/disasm-ppc.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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 #ifndef V8_PPC_CONSTANTS_PPC_H_ 5 #ifndef V8_PPC_CONSTANTS_PPC_H_
6 #define V8_PPC_CONSTANTS_PPC_H_ 6 #define V8_PPC_CONSTANTS_PPC_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "src/base/logging.h" 10 #include "src/base/logging.h"
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 LFS = 48 << 26, // Load Floating-Point Single 138 LFS = 48 << 26, // Load Floating-Point Single
139 LFSU = 49 << 26, // Load Floating-Point Single with Update 139 LFSU = 49 << 26, // Load Floating-Point Single with Update
140 LFD = 50 << 26, // Load Floating-Point Double 140 LFD = 50 << 26, // Load Floating-Point Double
141 LFDU = 51 << 26, // Load Floating-Point Double with Update 141 LFDU = 51 << 26, // Load Floating-Point Double with Update
142 STFS = 52 << 26, // Store Floating-Point Single 142 STFS = 52 << 26, // Store Floating-Point Single
143 STFSU = 53 << 26, // Store Floating-Point Single with Update 143 STFSU = 53 << 26, // Store Floating-Point Single with Update
144 STFD = 54 << 26, // Store Floating-Point Double 144 STFD = 54 << 26, // Store Floating-Point Double
145 STFDU = 55 << 26, // Store Floating-Point Double with Update 145 STFDU = 55 << 26, // Store Floating-Point Double with Update
146 LD = 58 << 26, // Load Double Word 146 LD = 58 << 26, // Load Double Word
147 EXT3 = 59 << 26, // Extended code set 3 147 EXT3 = 59 << 26, // Extended code set 3
148 EXT6 = 60 << 26, // Extended code set 6
148 STD = 62 << 26, // Store Double Word (optionally with Update) 149 STD = 62 << 26, // Store Double Word (optionally with Update)
149 EXT4 = 63 << 26 // Extended code set 4 150 EXT4 = 63 << 26 // Extended code set 4
150 }; 151 };
151 152
152 // Bits 10-1 153 // Bits 10-1
153 enum OpcodeExt1 { 154 enum OpcodeExt1 {
154 MCRF = 0 << 1, // Move Condition Register Field 155 MCRF = 0 << 1, // Move Condition Register Field
155 BCLRX = 16 << 1, // Branch Conditional Link Register 156 BCLRX = 16 << 1, // Branch Conditional Link Register
156 CRNOR = 33 << 1, // Condition Register NOR) 157 CRNOR = 33 << 1, // Condition Register NOR)
157 RFI = 50 << 1, // Return from Interrupt 158 RFI = 50 << 1, // Return from Interrupt
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 // Bits 4-2 308 // Bits 4-2
308 RLDICL = 0 << 1, // Rotate Left Double Word Immediate then Clear Left 309 RLDICL = 0 << 1, // Rotate Left Double Word Immediate then Clear Left
309 RLDICR = 2 << 1, // Rotate Left Double Word Immediate then Clear Right 310 RLDICR = 2 << 1, // Rotate Left Double Word Immediate then Clear Right
310 RLDIC = 4 << 1, // Rotate Left Double Word Immediate then Clear 311 RLDIC = 4 << 1, // Rotate Left Double Word Immediate then Clear
311 RLDIMI = 6 << 1, // Rotate Left Double Word Immediate then Mask Insert 312 RLDIMI = 6 << 1, // Rotate Left Double Word Immediate then Mask Insert
312 // Bits 4-1 313 // Bits 4-1
313 RLDCL = 8 << 1, // Rotate Left Double Word then Clear Left 314 RLDCL = 8 << 1, // Rotate Left Double Word then Clear Left
314 RLDCR = 9 << 1 // Rotate Left Double Word then Clear Right 315 RLDCR = 9 << 1 // Rotate Left Double Word then Clear Right
315 }; 316 };
316 317
318 // Bits 10-3
319 #define XX3_OPCODE_LIST(V) \
320 V(xsaddsp, XSADDSP, 0 << 3) /* VSX Scalar Add SP */ \
321 V(xssubsp, XSSUBSP, 8 << 3) /* VSX Scalar Subtract SP */ \
322 V(xsmulsp, XSMULSP, 16 << 3) /* VSX Scalar Multiply SP */ \
323 V(xsdivsp, XSDIVSP, 24 << 3) /* VSX Scalar Divide SP */ \
324 V(xsadddp, XSADDDP, 32 << 3) /* VSX Scalar Add DP */ \
325 V(xssubdp, XSSUBDP, 40 << 3) /* VSX Scalar Subtract DP */ \
326 V(xsmuldp, XSMULDP, 48 << 3) /* VSX Scalar Multiply DP */ \
327 V(xsdivdp, XSDIVDP, 56 << 3) /* VSX Scalar Divide DP */ \
328 V(xsmaxdp, XSMAXDP, 160 << 3) /* VSX Scalar Maximum DP */ \
329 V(xsmindp, XSMINDP, 168 << 3) /* VSX Scalar Minimum DP */
330
331 // Bits 10-2
332 #define XX2_OPCODE_LIST(V) \
333 V(XSCVDPSP, XSCVDPSP, 265 << 2) /* VSX Scalar Convert DP to SP */ \
334 V(XSCVSPDP, XSCVSPDP, 329 << 2) /* VSX Scalar Convert SP to DP */
335
336 enum OpcodeExt6 {
337 #define DECLARE_OPCODES(name, opcode_name, opcode_value) \
338 opcode_name = opcode_value,
339 XX3_OPCODE_LIST(DECLARE_OPCODES) XX2_OPCODE_LIST(DECLARE_OPCODES)
340 #undef DECLARE_OPCODES
341 };
342
317 // Instruction encoding bits and masks. 343 // Instruction encoding bits and masks.
318 enum { 344 enum {
319 // Instruction encoding bit 345 // Instruction encoding bit
320 B1 = 1 << 1, 346 B1 = 1 << 1,
347 B2 = 1 << 2,
348 B3 = 1 << 3,
321 B4 = 1 << 4, 349 B4 = 1 << 4,
322 B5 = 1 << 5, 350 B5 = 1 << 5,
323 B7 = 1 << 7, 351 B7 = 1 << 7,
324 B8 = 1 << 8, 352 B8 = 1 << 8,
325 B9 = 1 << 9, 353 B9 = 1 << 9,
326 B12 = 1 << 12, 354 B12 = 1 << 12,
327 B18 = 1 << 18, 355 B18 = 1 << 18,
328 B19 = 1 << 19, 356 B19 = 1 << 19,
329 B20 = 1 << 20, 357 B20 = 1 << 20,
330 B22 = 1 << 22, 358 B22 = 1 << 22,
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
593 // Lookup the register number for the name provided. 621 // Lookup the register number for the name provided.
594 static int Number(const char* name); 622 static int Number(const char* name);
595 623
596 private: 624 private:
597 static const char* names_[kNumDoubleRegisters]; 625 static const char* names_[kNumDoubleRegisters];
598 }; 626 };
599 } // namespace internal 627 } // namespace internal
600 } // namespace v8 628 } // namespace v8
601 629
602 #endif // V8_PPC_CONSTANTS_PPC_H_ 630 #endif // V8_PPC_CONSTANTS_PPC_H_
OLDNEW
« no previous file with comments | « src/ppc/assembler-ppc.cc ('k') | src/ppc/disasm-ppc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698