summaryrefslogtreecommitdiffhomepage
path: root/ir/be/riscv/riscv_emitter.h
blob: 3edd60a463693762661991f7639ff28d57fb62b4 (plain)
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
27
28
29
30
31
32
/*
 * This file is part of libFirm.
 * Copyright (C) 2018 Christoph Mallon.
 */

/**
 * @file
 * @brief       This file implements the RISC-V node emitter.
 * @author      Christoph Mallon
 */
#ifndef FIRM_BE_RISCV_RISCV_EMITTER_H
#define FIRM_BE_RISCV_RISCV_EMITTER_H

#include "irnode.h"

/**
 * fmt  parameter               output
 * ---- ----------------------  ---------------------------------------------
 * %A   <node>                  address, %lo of offset + base register
 * %C   int (riscv_cond_t)      condition code
 * %Dx  <node>                  destination register x
 * %H   <node>                  %hi of immediate
 * %I   <node>                  %lo of immediate
 * %J   <node>                  immediate
 * %R   arch_register_t const*  register
 * %Sx  <node>                  source register x
 */
void riscv_emitf(ir_node const *node, char const *fmt, ...);

void riscv_emit_function(ir_graph *irg);

#endif