asm: fix compiler warnings
This commit is contained in:
@@ -1,17 +1,17 @@
|
||||
#include "parse.h"
|
||||
|
||||
#include <blue/core/hash.h>
|
||||
#include <ctype.h>
|
||||
#include <stdlib.h>
|
||||
#include <ivy/asm/assembler.h>
|
||||
#include <ivy/asm/bin.h>
|
||||
#include <ivy/ident.h>
|
||||
#include <ivy/selector.h>
|
||||
#include <blue/core/hash.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#define HASH_SELF 0x2d19e518d40792b7
|
||||
#define HASH_POOL 0x8c22f10da88b1083
|
||||
#define HASH_SP 0x08d93e07b5793c56
|
||||
#define HASH_BP 0x08a64407b54decef
|
||||
#define HASH_SELF 0x2d19e518d40792b7
|
||||
#define HASH_POOL 0x8c22f10da88b1083
|
||||
#define HASH_SP 0x08d93e07b5793c56
|
||||
#define HASH_BP 0x08a64407b54decef
|
||||
|
||||
#define REG_INDEX_INVALID ((unsigned long long)-1)
|
||||
|
||||
@@ -107,7 +107,7 @@ static unsigned long long get_register_index(struct ivy_asm_token *tok)
|
||||
static enum index_base get_index_base(struct ivy_asm_token *tok)
|
||||
{
|
||||
if (tok->t_type != IVY_ASM_TOK_IDENT) {
|
||||
return REG_INDEX_INVALID;
|
||||
return INDEX_NONE;
|
||||
}
|
||||
|
||||
const char *s = tok->t_str;
|
||||
@@ -148,7 +148,8 @@ static enum ivy_status write_instruction(struct block_parser_state *state)
|
||||
return IVY_OK;
|
||||
}
|
||||
|
||||
static enum ivy_status push_const_arg(struct block_parser_state *state, struct ivy_asm_token *tok)
|
||||
static enum ivy_status push_const_arg(
|
||||
struct block_parser_state *state, struct ivy_asm_token *tok)
|
||||
{
|
||||
struct arg *arg = malloc(sizeof *arg);
|
||||
if (!arg) {
|
||||
@@ -165,7 +166,8 @@ static enum ivy_status push_const_arg(struct block_parser_state *state, struct i
|
||||
}
|
||||
|
||||
static enum ivy_status push_reg_arg(
|
||||
struct block_parser_state *state, struct ivy_asm_token *tok, unsigned long long reg_index)
|
||||
struct block_parser_state *state, struct ivy_asm_token *tok,
|
||||
unsigned long long reg_index)
|
||||
{
|
||||
struct arg *arg = malloc(sizeof *arg);
|
||||
if (!arg) {
|
||||
@@ -258,7 +260,6 @@ static enum ivy_status parse_ident(
|
||||
return IVY_OK;
|
||||
default:
|
||||
return IVY_ERR_BAD_SYNTAX;
|
||||
|
||||
}
|
||||
|
||||
/* not sure what this is but we aren't expecting it. */
|
||||
@@ -299,7 +300,7 @@ static enum ivy_status parse_left_bracket(
|
||||
{
|
||||
struct block_parser_state *state
|
||||
= (struct block_parser_state *)asm_parser_get_state(ctx);
|
||||
|
||||
|
||||
switch (state->s_prev_component) {
|
||||
case INSTR_OPCODE:
|
||||
case INSTR_OPERAND_SEPARATOR:
|
||||
@@ -348,7 +349,7 @@ static enum ivy_status parse_end(
|
||||
}
|
||||
|
||||
asm_parser_pop_state(ctx, NULL);
|
||||
|
||||
|
||||
return IVY_OK;
|
||||
}
|
||||
|
||||
@@ -378,4 +379,4 @@ struct parser_state_type block_parser_state_type = {
|
||||
.n_keyword_parsers = {
|
||||
KW_PARSER(END, parse_end),
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user