OLD | NEW |
---|---|
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 21 matching lines...) Loading... | |
32 #ifdef DEBUG | 32 #ifdef DEBUG |
33 #define UNIMPLEMENTED_MIPS() \ | 33 #define UNIMPLEMENTED_MIPS() \ |
34 v8::internal::PrintF("%s, \tline %d: \tfunction %s not implemented. \n", \ | 34 v8::internal::PrintF("%s, \tline %d: \tfunction %s not implemented. \n", \ |
35 __FILE__, __LINE__, __func__) | 35 __FILE__, __LINE__, __func__) |
36 #else | 36 #else |
37 #define UNIMPLEMENTED_MIPS() | 37 #define UNIMPLEMENTED_MIPS() |
38 #endif | 38 #endif |
39 | 39 |
40 #define UNSUPPORTED_MIPS() v8::internal::PrintF("Unsupported instruction.\n") | 40 #define UNSUPPORTED_MIPS() v8::internal::PrintF("Unsupported instruction.\n") |
41 | 41 |
42 enum arch_variants {mips32r2, mips32r1, loongson}; | |
Yang
2012/02/22 10:58:15
I strongly suggest using uppercase identifiers for
Kevin Millikin (Google)
2012/02/22 11:29:39
Good catch. The style recommendation is to capita
kalmard
2012/02/23 13:23:47
Done.
| |
42 | 43 |
43 #ifdef _MIPS_ARCH_MIPS32R2 | 44 #ifdef _MIPS_ARCH_MIPS32R2 |
44 #define mips32r2 1 | 45 static const arch_variants arch_variant = mips32r2; |
46 #elif _MIPS_ARCH_LOONGSON | |
47 // The loongson flag refers to the LOONGSON architectures based on MIPS-III, | |
48 // which predates (and is a subset of) the mips32r2 and r1 architectures. | |
49 static const arch_variants arch_variant = loongson; | |
45 #else | 50 #else |
46 #define mips32r2 0 | 51 static const arch_variants arch_variant = mips32r1; |
47 #endif | 52 #endif |
48 | 53 |
49 | 54 |
50 #if(defined(__mips_hard_float) && __mips_hard_float != 0) | 55 #if(defined(__mips_hard_float) && __mips_hard_float != 0) |
51 // Use floating-point coprocessor instructions. This flag is raised when | 56 // Use floating-point coprocessor instructions. This flag is raised when |
52 // -mhard-float is passed to the compiler. | 57 // -mhard-float is passed to the compiler. |
53 const bool IsMipsSoftFloatABI = false; | 58 const bool IsMipsSoftFloatABI = false; |
54 #elif(defined(__mips_soft_float) && __mips_soft_float != 0) | 59 #elif(defined(__mips_soft_float) && __mips_soft_float != 0) |
55 // Not using floating-point coprocessor instructions. This flag is raised when | 60 // Not using floating-point coprocessor instructions. This flag is raised when |
56 // -msoft-float is passed to the compiler. | 61 // -msoft-float is passed to the compiler. |
(...skipping 723 matching lines...) Loading... | |
780 const int kBranchReturnOffset = 2 * Instruction::kInstrSize; | 785 const int kBranchReturnOffset = 2 * Instruction::kInstrSize; |
781 | 786 |
782 const int kDoubleAlignmentBits = 3; | 787 const int kDoubleAlignmentBits = 3; |
783 const int kDoubleAlignment = (1 << kDoubleAlignmentBits); | 788 const int kDoubleAlignment = (1 << kDoubleAlignmentBits); |
784 const int kDoubleAlignmentMask = kDoubleAlignment - 1; | 789 const int kDoubleAlignmentMask = kDoubleAlignment - 1; |
785 | 790 |
786 | 791 |
787 } } // namespace v8::internal | 792 } } // namespace v8::internal |
788 | 793 |
789 #endif // #ifndef V8_MIPS_CONSTANTS_H_ | 794 #endif // #ifndef V8_MIPS_CONSTANTS_H_ |
OLD | NEW |