diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2019-02-04 20:30:00 -0500 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2019-02-04 20:30:00 -0500 |
| commit | 8c6fa982cd0a02775264b616c37da9907cc603bb (patch) | |
| tree | bf8101fa59d6909ea4e3364d0b31e63fbdf3c69e /src/all_types.hpp | |
| parent | 2828a9695f088f5454f445fdd0544d805a33837b (diff) | |
| download | zig-8c6fa982cd0a02775264b616c37da9907cc603bb.tar.gz zig-8c6fa982cd0a02775264b616c37da9907cc603bb.zip | |
SIMD: array to vector, vector to array, wrapping int add
also vectors and arrays now use the same ConstExprVal representation
See #903
Diffstat (limited to 'src/all_types.hpp')
| -rw-r--r-- | src/all_types.hpp | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/src/all_types.hpp b/src/all_types.hpp index 3fc6772b31..c4c9e13cfb 100644 --- a/src/all_types.hpp +++ b/src/all_types.hpp @@ -252,10 +252,6 @@ struct ConstArgTuple { size_t end_index; }; -struct ConstVector { - ConstExprValue *elements; -}; - enum ConstValSpecial { ConstValSpecialRuntime, ConstValSpecialStatic, @@ -322,7 +318,6 @@ struct ConstExprValue { ConstPtrValue x_ptr; ImportTableEntry *x_import; ConstArgTuple x_arg_tuple; - ConstVector x_vector; // populated if special == ConstValSpecialRuntime RuntimeHintErrorUnion rh_error_union; @@ -2239,6 +2234,8 @@ enum IrInstructionId { IrInstructionIdToBytes, IrInstructionIdFromBytes, IrInstructionIdCheckRuntimeScope, + IrInstructionIdVectorToArray, + IrInstructionIdArrayToVector, }; struct IrInstruction { @@ -3368,6 +3365,19 @@ struct IrInstructionBitReverse { IrInstruction *op; }; +struct IrInstructionArrayToVector { + IrInstruction base; + + IrInstruction *array; +}; + +struct IrInstructionVectorToArray { + IrInstruction base; + + IrInstruction *vector; + LLVMValueRef tmp_ptr; +}; + static const size_t slice_ptr_index = 0; static const size_t slice_len_index = 1; |
