24 lines
605 B
C
24 lines
605 B
C
|
|
#include "builder.h"
|
||
|
|
|
||
|
|
#include <mie/ctx.h>
|
||
|
|
#include <mie/ir/ptr.h>
|
||
|
|
#include <mie/select/graph.h>
|
||
|
|
#include <mie/target/select.h>
|
||
|
|
|
||
|
|
static enum mie_status push(
|
||
|
|
struct mie_select_builder *builder, struct mie_instr *instr)
|
||
|
|
{
|
||
|
|
const struct mie_target *target = mie_select_builder_get_target(builder);
|
||
|
|
struct mie_msg *msg = (struct mie_msg *)instr;
|
||
|
|
|
||
|
|
struct mie_select_value result;
|
||
|
|
enum mie_status status
|
||
|
|
= mie_target_select_lower_msg(target, builder, msg, &result);
|
||
|
|
|
||
|
|
return mie_select_builder_set_value(builder, MIE_VALUE(instr), &result);
|
||
|
|
}
|
||
|
|
|
||
|
|
struct select_instr_type select_msg = {
|
||
|
|
.i_push = push,
|
||
|
|
};
|