OLD | NEW |
1 // Copyright (c) 1994-2006 Sun Microsystems Inc. | 1 // Copyright (c) 1994-2006 Sun Microsystems Inc. |
2 // All Rights Reserved. | 2 // All Rights Reserved. |
3 // | 3 // |
4 // Redistribution and use in source and binary forms, with or without | 4 // Redistribution and use in source and binary forms, with or without |
5 // modification, are permitted provided that the following conditions | 5 // modification, are permitted provided that the following conditions |
6 // are met: | 6 // are met: |
7 // | 7 // |
8 // - Redistributions of source code must retain the above copyright notice, | 8 // - Redistributions of source code must retain the above copyright notice, |
9 // this list of conditions and the following disclaimer. | 9 // this list of conditions and the following disclaimer. |
10 // | 10 // |
(...skipping 28 matching lines...) Expand all Loading... |
39 | 39 |
40 #ifndef V8_PPC_ASSEMBLER_PPC_H_ | 40 #ifndef V8_PPC_ASSEMBLER_PPC_H_ |
41 #define V8_PPC_ASSEMBLER_PPC_H_ | 41 #define V8_PPC_ASSEMBLER_PPC_H_ |
42 | 42 |
43 #include <stdio.h> | 43 #include <stdio.h> |
44 #include <vector> | 44 #include <vector> |
45 | 45 |
46 #include "src/assembler.h" | 46 #include "src/assembler.h" |
47 #include "src/ppc/constants-ppc.h" | 47 #include "src/ppc/constants-ppc.h" |
48 | 48 |
49 #define ABI_USES_FUNCTION_DESCRIPTORS \ | 49 #if V8_HOST_ARCH_PPC && \ |
50 (V8_HOST_ARCH_PPC && (V8_OS_AIX || \ | 50 (V8_OS_AIX || (V8_TARGET_ARCH_PPC64 && V8_TARGET_BIG_ENDIAN)) |
51 (V8_TARGET_ARCH_PPC64 && V8_TARGET_BIG_ENDIAN))) | 51 #define ABI_USES_FUNCTION_DESCRIPTORS 1 |
| 52 #else |
| 53 #define ABI_USES_FUNCTION_DESCRIPTORS 0 |
| 54 #endif |
52 | 55 |
53 #define ABI_PASSES_HANDLES_IN_REGS \ | 56 #if !V8_HOST_ARCH_PPC || V8_OS_AIX || V8_TARGET_ARCH_PPC64 |
54 (!V8_HOST_ARCH_PPC || V8_OS_AIX || V8_TARGET_ARCH_PPC64) | 57 #define ABI_PASSES_HANDLES_IN_REGS 1 |
| 58 #else |
| 59 #define ABI_PASSES_HANDLES_IN_REGS 0 |
| 60 #endif |
55 | 61 |
56 #if !V8_HOST_ARCH_PPC || !V8_TARGET_ARCH_PPC64 || V8_TARGET_LITTLE_ENDIAN | 62 #if !V8_HOST_ARCH_PPC || !V8_TARGET_ARCH_PPC64 || V8_TARGET_LITTLE_ENDIAN |
57 #define ABI_RETURNS_OBJECT_PAIRS_IN_REGS 1 | 63 #define ABI_RETURNS_OBJECT_PAIRS_IN_REGS 1 |
58 #else | 64 #else |
59 #define ABI_RETURNS_OBJECT_PAIRS_IN_REGS 0 | 65 #define ABI_RETURNS_OBJECT_PAIRS_IN_REGS 0 |
60 #endif | 66 #endif |
61 | 67 |
62 #if !V8_HOST_ARCH_PPC || (V8_TARGET_ARCH_PPC64 && V8_TARGET_LITTLE_ENDIAN) | 68 #if !V8_HOST_ARCH_PPC || (V8_TARGET_ARCH_PPC64 && V8_TARGET_LITTLE_ENDIAN) |
63 #define ABI_CALL_VIA_IP 1 | 69 #define ABI_CALL_VIA_IP 1 |
64 #else | 70 #else |
65 #define ABI_CALL_VIA_IP 0 | 71 #define ABI_CALL_VIA_IP 0 |
66 #endif | 72 #endif |
67 | 73 |
68 #if !V8_HOST_ARCH_PPC || V8_OS_AIX || V8_TARGET_ARCH_PPC64 | 74 #if !V8_HOST_ARCH_PPC || V8_OS_AIX || V8_TARGET_ARCH_PPC64 |
69 #define ABI_TOC_REGISTER Register::kCode_r2 | 75 #define ABI_TOC_REGISTER 2 |
70 #else | 76 #else |
71 #define ABI_TOC_REGISTER Register::kCode_r13 | 77 #define ABI_TOC_REGISTER 13 |
72 #endif | 78 #endif |
73 | 79 |
74 #define INSTR_AND_DATA_CACHE_COHERENCY LWSYNC | 80 #define INSTR_AND_DATA_CACHE_COHERENCY LWSYNC |
75 | 81 |
76 namespace v8 { | 82 namespace v8 { |
77 namespace internal { | 83 namespace internal { |
78 | 84 |
79 // clang-format off | 85 // clang-format off |
80 #define GENERAL_REGISTERS(V) \ | 86 #define GENERAL_REGISTERS(V) \ |
81 V(r0) V(sp) V(r2) V(r3) V(r4) V(r5) V(r6) V(r7) \ | 87 V(r0) V(sp) V(r2) V(r3) V(r4) V(r5) V(r6) V(r7) \ |
(...skipping 1387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1469 | 1475 |
1470 | 1476 |
1471 class EnsureSpace BASE_EMBEDDED { | 1477 class EnsureSpace BASE_EMBEDDED { |
1472 public: | 1478 public: |
1473 explicit EnsureSpace(Assembler* assembler) { assembler->CheckBuffer(); } | 1479 explicit EnsureSpace(Assembler* assembler) { assembler->CheckBuffer(); } |
1474 }; | 1480 }; |
1475 } // namespace internal | 1481 } // namespace internal |
1476 } // namespace v8 | 1482 } // namespace v8 |
1477 | 1483 |
1478 #endif // V8_PPC_ASSEMBLER_PPC_H_ | 1484 #endif // V8_PPC_ASSEMBLER_PPC_H_ |
OLD | NEW |