summaryrefslogtreecommitdiffhomepage
path: root/ir/be/riscv/riscv_nodes_attr.c
blob: 8204129acf1733b67672adfa2493459d36b2f80d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/*
 * This file is part of libFirm.
 * Copyright (C) 2018 Christoph Mallon.
 */

#include "riscv_nodes_attr.h"

#include <panic.h>

char const *riscv_get_cond_name(riscv_cond_t const cond)
{
	switch (cond) {
	case riscv_cc_eq:  return "eq";
	case riscv_cc_ne:  return "ne";
	case riscv_cc_lt:  return "lt";
	case riscv_cc_ge:  return "ge";
	case riscv_cc_ltu: return "ltu";
	case riscv_cc_geu: return "geu";
	}
	panic("invalid cond");
}