codegen: use the and instruction when doing zero-extend
[ajla.git] / arrayu.h
blob24fb8d7a5e4b0d66ff61bfe622ce9ff7319c6483
1 /*
2 * Copyright (C) 2024 Mikulas Patocka
4 * This file is part of Ajla.
6 * Ajla is free software: you can redistribute it and/or modify it under the
7 * terms of the GNU General Public License as published by the Free Software
8 * Foundation, either version 3 of the License, or (at your option) any later
9 * version.
11 * Ajla is distributed in the hope that it will be useful, but WITHOUT ANY
12 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
13 * A PARTICULAR PURPOSE. See the GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License along with
16 * Ajla. If not, see <https://www.gnu.org/licenses/>.
19 #ifndef AJLA_ARRAYU_H
20 #define AJLA_ARRAYU_H
22 #include "data.h"
24 #define array_btree_iterate name(array_btree_iterate)
25 #define array_onstack_iterate name(array_onstack_iterate)
26 #define array_to_bytes name(array_to_bytes)
27 #define array_onstack_to_bytes name(array_onstack_to_bytes)
29 bool attr_fastcall array_btree_iterate(pointer_t *array_ptr, array_index_t *idx, int_default_t (*callback)(unsigned char *flat, const struct type *type, int_default_t n_elements, pointer_t *ptr, void *context), void *context);
31 bool attr_fastcall array_onstack_iterate(frame_s *fp, frame_t slot, array_index_t *idx, int_default_t (*callback)(unsigned char *flat, const struct type *type, int_default_t n_elements, pointer_t *ptr, void *context), void *context);
33 void attr_fastcall array_to_bytes(pointer_t *array_ptr, char **str, size_t *str_l);
34 void attr_fastcall array_onstack_to_bytes(frame_s *fp, frame_t slot, char **str, size_t *str_l);
36 #endif