OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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 #include "src/wasm/wasm-opcodes.h" | 5 #include "src/wasm/wasm-opcodes.h" |
6 #include "src/signature.h" | 6 #include "src/signature.h" |
7 | 7 |
8 namespace v8 { | 8 namespace v8 { |
9 namespace internal { | 9 namespace internal { |
10 namespace wasm { | 10 namespace wasm { |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 | 66 |
67 // TODO(titzer): pull WASM_64 up to a common header. | 67 // TODO(titzer): pull WASM_64 up to a common header. |
68 #if !V8_TARGET_ARCH_32_BIT || V8_TARGET_ARCH_X64 | 68 #if !V8_TARGET_ARCH_32_BIT || V8_TARGET_ARCH_X64 |
69 #define WASM_64 1 | 69 #define WASM_64 1 |
70 #else | 70 #else |
71 #define WASM_64 0 | 71 #define WASM_64 0 |
72 #endif | 72 #endif |
73 | 73 |
74 | 74 |
75 bool WasmOpcodes::IsSupported(WasmOpcode opcode) { | 75 bool WasmOpcodes::IsSupported(WasmOpcode opcode) { |
| 76 #if !WASM_64 |
76 switch (opcode) { | 77 switch (opcode) { |
77 #if !WASM_64 | |
78 // Opcodes not supported on 32-bit platforms. | 78 // Opcodes not supported on 32-bit platforms. |
79 case kExprI64Add: | 79 case kExprI64Add: |
80 case kExprI64Sub: | 80 case kExprI64Sub: |
81 case kExprI64Mul: | 81 case kExprI64Mul: |
82 case kExprI64DivS: | 82 case kExprI64DivS: |
83 case kExprI64DivU: | 83 case kExprI64DivU: |
84 case kExprI64RemS: | 84 case kExprI64RemS: |
85 case kExprI64RemU: | 85 case kExprI64RemU: |
86 case kExprI64And: | 86 case kExprI64And: |
87 case kExprI64Ior: | 87 case kExprI64Ior: |
(...skipping 25 matching lines...) Expand all Loading... |
113 | 113 |
114 case kExprF32SConvertI64: | 114 case kExprF32SConvertI64: |
115 case kExprF32UConvertI64: | 115 case kExprF32UConvertI64: |
116 case kExprF64SConvertI64: | 116 case kExprF64SConvertI64: |
117 case kExprF64UConvertI64: | 117 case kExprF64UConvertI64: |
118 case kExprI64SConvertF32: | 118 case kExprI64SConvertF32: |
119 case kExprI64SConvertF64: | 119 case kExprI64SConvertF64: |
120 case kExprI64UConvertF32: | 120 case kExprI64UConvertF32: |
121 case kExprI64UConvertF64: | 121 case kExprI64UConvertF64: |
122 | 122 |
123 #endif | |
124 return false; | 123 return false; |
125 default: | 124 default: |
126 return true; | 125 return true; |
127 } | 126 } |
| 127 #else |
| 128 return true; |
| 129 #endif |
128 } | 130 } |
129 } // namespace wasm | 131 } // namespace wasm |
130 } // namespace internal | 132 } // namespace internal |
131 } // namespace v8 | 133 } // namespace v8 |
OLD | NEW |