42 lines
578 B
C
42 lines
578 B
C
#include <stdio.h>
|
|
#include "rifle/mu.h"
|
|
|
|
int
|
|
mu_gen_label(struct rifle_state *state, const char *name, bool global)
|
|
{
|
|
if (state == NULL || name == NULL) {
|
|
return -1;
|
|
}
|
|
|
|
if (global) {
|
|
fprintf(
|
|
state->out_fp,
|
|
"[global %s]\n",
|
|
name
|
|
);
|
|
}
|
|
|
|
fprintf(
|
|
state->out_fp,
|
|
"%s:\n",
|
|
name
|
|
);
|
|
|
|
return 0;
|
|
}
|
|
|
|
int
|
|
mu_gen_ret(struct rifle_state *state)
|
|
{
|
|
if (state == NULL) {
|
|
return -1;
|
|
}
|
|
|
|
fprintf(
|
|
state->out_fp,
|
|
INST("ret")
|
|
);
|
|
|
|
return 0;
|
|
}
|