aboutsummaryrefslogtreecommitdiff
path: root/src/check_builtin.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2022-05-26 10:38:51 +0100
committergingerBill <bill@gingerbill.org>2022-05-26 10:38:51 +0100
commit06337129d8de636ad00e8ea64218d48c67514611 (patch)
tree1142c8baceee6f5c1c580a95bd133128775b8185 /src/check_builtin.cpp
parentb95ca80f85efc3f7be292d9c751a742e43e41b2e (diff)
Remove `intrinsics.odin.simd_vector` in favour of `#simd[N]T`
Diffstat (limited to 'src/check_builtin.cpp')
-rw-r--r--src/check_builtin.cpp53
1 files changed, 0 insertions, 53 deletions
diff --git a/src/check_builtin.cpp b/src/check_builtin.cpp
index 334202230..40933fcaa 100644
--- a/src/check_builtin.cpp
+++ b/src/check_builtin.cpp
@@ -3192,59 +3192,6 @@ bool check_builtin_procedure(CheckerContext *c, Operand *operand, Ast *call, i32
break;
}
- case BuiltinProc_simd_vector: {
- Operand x = {};
- Operand y = {};
- x = *operand;
- if (!is_type_integer(x.type) || x.mode != Addressing_Constant) {
- error(call, "Expected a constant integer for 'intrinsics.simd_vector'");
- operand->mode = Addressing_Type;
- operand->type = t_invalid;
- return false;
- }
- if (big_int_is_neg(&x.value.value_integer)) {
- error(call, "Negative vector element length");
- operand->mode = Addressing_Type;
- operand->type = t_invalid;
- return false;
- }
- i64 count = big_int_to_i64(&x.value.value_integer);
-
- check_expr_or_type(c, &y, ce->args[1]);
- if (y.mode != Addressing_Type) {
- error(call, "Expected a type 'intrinsics.simd_vector'");
- operand->mode = Addressing_Type;
- operand->type = t_invalid;
- return false;
- }
- Type *elem = y.type;
- if (!is_type_valid_vector_elem(elem)) {
- gbString str = type_to_string(elem);
- error(call, "Invalid element type for 'intrinsics.simd_vector', expected an integer, float, or boolean with no specific endianness, got '%s'", str);
- gb_string_free(str);
- operand->mode = Addressing_Type;
- operand->type = t_invalid;
- return false;
- }
-
- if (count < 1 || !is_power_of_two(count)) {
- error(call, "Invalid length for 'intrinsics.simd_vector', expected a power of two length, got '%lld'", cast(long long)count);
- operand->mode = Addressing_Type;
- operand->type = t_invalid;
- return false;
- }
-
- operand->mode = Addressing_Type;
- operand->type = alloc_type_simd_vector(count, elem);
- if (is_arch_wasm()) {
- if (type_size_of(operand->type) != 16) {
- error(x.expr, "wasm based targets are limited to 128-bit types");
- }
- }
-
- break;
- }
-
case BuiltinProc_is_package_imported: {
bool value = false;