aboutgitcodelistschat:MatrixIRC
path: root/cooker/emit.h
blob: 5d15b1b78be458c10c55aad2b50987779a4fc029 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/* SPDX-License-Identifier: GPL-3.0-or-later
 * Copyright 2023 Red Hat GmbH
 * Author: Stefano Brivio <sbrivio@redhat.com>
 */

#ifndef EMIT_H
#define EMIT_H

void emit_nr(struct gluten_ctx *g, struct gluten_offset number);
void emit_load(struct gluten_ctx *g, struct gluten_offset dst,
	       int index, size_t len);
void emit_cmp(struct gluten_ctx *g, enum op_cmp_type cmp,
	      struct gluten_offset x, struct gluten_offset y, size_t size,
	      enum jump_type jmp);
void emit_cmp_field(struct gluten_ctx *g, enum op_cmp_type cmp,
		    struct field *field,
		    struct gluten_offset base, struct gluten_offset match,
		    enum jump_type jmp);
void emit_return(struct gluten_ctx *g, struct gluten_offset v);
void emit_block(struct gluten_ctx *g, int32_t error);
struct gluten_offset emit_data(struct gluten_ctx *g, enum type type,
			       size_t str_len, union value *value);
void link_block(struct gluten_ctx *g);
void link_match(struct gluten_ctx *g);

#endif /* EMIT_H */