Commit 6309a6c0 authored by uqxyd's avatar uqxyd
Browse files

Don't try to import cons_flags.

parent a4c7b7ac
...@@ -1291,27 +1291,6 @@ static unsigned read_enum(io_env_t *env, typetag_t typetag) ...@@ -1291,27 +1291,6 @@ static unsigned read_enum(io_env_t *env, typetag_t typetag)
#define read_variability(env) ((ir_variability) read_enum(env, tt_variability)) #define read_variability(env) ((ir_variability) read_enum(env, tt_variability))
#define read_volatility(env) ((ir_volatility) read_enum(env, tt_volatility)) #define read_volatility(env) ((ir_volatility) read_enum(env, tt_volatility))
static ir_cons_flags get_cons_flags(io_env_t *env)
{
ir_cons_flags flags = cons_none;
op_pin_state pinstate = read_pin_state(env);
switch (pinstate) {
case op_pin_state_floats: flags |= cons_floats; break;
case op_pin_state_pinned: break;
default:
panic("Error in %d: Invalid pinstate: %s", env->line,
get_op_pin_state_name(pinstate));
}
if (read_volatility(env) == volatility_is_volatile)
flags |= cons_volatile;
if (read_align(env) == align_non_aligned)
flags |= cons_unaligned;
return flags;
}
static ir_tarval *read_tv(io_env_t *env) static ir_tarval *read_tv(io_env_t *env)
{ {
ir_mode *tvmode = read_mode(env); ir_mode *tvmode = read_mode(env);
......
...@@ -70,7 +70,7 @@ def get_io_type(type, attrname, node): ...@@ -70,7 +70,7 @@ def get_io_type(type, attrname, node):
importcmd = "ir_volatility %s = read_volatility(env);" % attrname importcmd = "ir_volatility %s = read_volatility(env);" % attrname
exportcmd = "write_volatility(env, %(val)s);" exportcmd = "write_volatility(env, %(val)s);"
elif type == "ir_cons_flags": elif type == "ir_cons_flags":
importcmd = "ir_cons_flags %s = get_cons_flags(env);" % attrname importcmd = "ir_cons_flags %s = cons_none;" % attrname
exportcmd = "" # can't really export cons_flags exportcmd = "" # can't really export cons_flags
elif type == "op_pin_state": elif type == "op_pin_state":
importcmd = "op_pin_state %s = read_pin_state(env);" % attrname importcmd = "op_pin_state %s = read_pin_state(env);" % attrname
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment