/**
* Returns a singleton condition mode
*/
-ir_mode *get_ppc32_mode_Cond(void)
+static ir_mode *get_ppc32_mode_Cond(void)
{
if (ppc32_mode_Cond)
return ppc32_mode_Cond;
ppc32_modecode mode = irm_max;
int sign = mode_is_signed(irmode);
int bits = get_mode_size_bits(irmode);
- if(mode_is_int(irmode))
+ if (mode_is_int(irmode))
{
- switch(bits)
+ switch (bits)
{
case 8:
mode = sign ? irm_Bs : irm_Bu;
break;
}
}
- else if(mode_is_float(irmode))
+ else if (mode_is_float(irmode))
{
- switch(bits)
+ switch (bits)
{
case 32:
mode = irm_F;
break;
}
}
- else if(mode_is_reference(irmode))
+ else if (mode_is_reference(irmode))
{
- switch(bits)
+ switch (bits)
{
case 32:
mode = irm_P;
* Returns true, if the given node is a Const node and it's value fits into
* a signed 16-bit variable
*/
-int is_16bit_signed_const(ir_node *node)
+static int is_16bit_signed_const(ir_node *node)
{
tarval *tv_const;
- if(!is_ppc32_Const(node)) return 0;
+ if (!is_ppc32_Const(node)) return 0;
tv_const = get_ppc32_constant_tarval(node);
- switch(get_nice_modecode(get_irn_mode(node)))
+ switch (get_nice_modecode(get_irn_mode(node)))
{
case irm_Bu:
case irm_Bs:
{
unsigned char val2 = get_tarval_sub_bits(tv_const, 2);
unsigned char val3 = get_tarval_sub_bits(tv_const, 3);
- if(val2 || val3)
+ if (val2 || val3)
return 0;
// fall through
case irm_Hu:
{
unsigned char val1 = get_tarval_sub_bits(tv_const, 1);
- if(val1&0x80)
+ if (val1&0x80)
return 0;
return 1;
}
{
unsigned char val2 = get_tarval_sub_bits(tv_const, 2);
unsigned char val3 = get_tarval_sub_bits(tv_const, 3);
- if(val2==0 && val3==0)
+ if (val2==0 && val3==0)
{
unsigned char val1 = get_tarval_sub_bits(tv_const, 1);
- if(val1&0x80)
+ if (val1&0x80)
return 0;
return 1;
}
- if(!(val2==0xff && val3==0xff))
+ if (!(val2==0xff && val3==0xff))
{
unsigned char val1 = get_tarval_sub_bits(tv_const, 1);
- if(!(val1&0x80))
+ if (!(val1&0x80))
return 0;
return 1;
}
* Returns true, if the given node is a Const node and it's value fits into
* a unsigned 16-bit variable
*/
-int is_16bit_unsigned_const(ir_node *node)
+static int is_16bit_unsigned_const(ir_node *node)
{
tarval *tv_const;
- if(!is_ppc32_Const(node)) return 0;
+ if (!is_ppc32_Const(node)) return 0;
tv_const = get_ppc32_constant_tarval(node);
- switch(get_nice_modecode(get_irn_mode(node)))
+ switch (get_nice_modecode(get_irn_mode(node)))
{
case irm_Bu:
case irm_Bs:
{
unsigned char val2 = get_tarval_sub_bits(tv_const, 2);
unsigned char val3 = get_tarval_sub_bits(tv_const, 3);
- if(val2 || val3)
+ if (val2 || val3)
return 0;
return 1;
}
ir_node *op1 = get_Add_left(env->irn);
ir_node *op2 = get_Add_right(env->irn);
- switch(get_nice_modecode(env->mode)){
+ switch (get_nice_modecode(env->mode)){
case irm_D:
return new_bd_ppc32_fAdd(env->dbg, env->block, op1, op2, env->mode);
case irm_F:
case irm_Bs:
case irm_Bu:
case irm_P:
- if(is_16bit_signed_const(op1))
+ if (is_16bit_signed_const(op1))
{
ir_node *addnode = new_bd_ppc32_Addi(env->dbg, env->block, op2, env->mode);
set_ppc32_constant_tarval(addnode, get_ppc32_constant_tarval(op1));
set_ppc32_offset_mode(addnode, ppc32_ao_None);
return addnode;
}
- if(is_16bit_signed_const(op2))
+ if (is_16bit_signed_const(op2))
{
ir_node *addnode = new_bd_ppc32_Addi(env->dbg, env->block, op1, env->mode);
set_ppc32_constant_tarval(addnode, get_ppc32_constant_tarval(op2));
ir_node *op1 = get_Mul_left(env->irn);
ir_node *op2 = get_Mul_right(env->irn);
- switch(get_nice_modecode(env->mode)){
+ switch (get_nice_modecode(env->mode)){
case irm_D:
return new_bd_ppc32_fMul(env->dbg, env->block, op1, op2, env->mode);
case irm_F:
ir_node *op1 = get_irn_n(env->irn, 0);
ir_node *op2 = get_irn_n(env->irn, 1);
- switch(get_nice_modecode(env->mode)){
+ switch (get_nice_modecode(env->mode)){
case irm_Is:
case irm_Hs:
case irm_Bs:
ir_node *op1 = get_Sub_left(env->irn);
ir_node *op2 = get_Sub_right(env->irn);
- switch(get_nice_modecode(env->mode)){
+ switch (get_nice_modecode(env->mode)){
case irm_D:
return new_bd_ppc32_fSub(env->dbg, env->block, op1, op2, env->mode);
case irm_F:
ir_node *op1 = get_Quot_left(env->irn);
ir_node *op2 = get_Quot_right(env->irn);
- switch(get_nice_modecode(env->mode)){
+ switch (get_nice_modecode(env->mode)){
case irm_D:
return new_bd_ppc32_fDiv(env->dbg, env->block, op1, op2, env->mode);
case irm_F:
ir_node *op1 = get_Div_left(env->irn);
ir_node *op2 = get_Div_right(env->irn);
- switch(get_nice_modecode(get_irn_mode(op1))){
+ switch (get_nice_modecode(get_irn_mode(op1))){
case irm_Is:
case irm_Hs:
case irm_Bs:
{
if (is_Proj(edge->src))
{
- switch(get_Proj_proj(edge->src)){
+ switch (get_Proj_proj(edge->src)){
case pn_DivMod_res_div:
proj_div = edge->src;
break;
res_mode = get_irn_mode(proj_div);
- switch(get_nice_modecode(res_mode))
+ switch (get_nice_modecode(res_mode))
{
case irm_Is:
case irm_Hs:
}
if (proj_div == NULL)
- proj_div = new_rd_Proj(env->dbg, env->block, div_result, get_irn_mode(proj_mod), pn_DivMod_res_div);
+ proj_div = new_rd_Proj(env->dbg, div_result, get_irn_mode(proj_mod), pn_DivMod_res_div);
if (proj_mod!=NULL){
ir_node *mul_result;
assert(proj_mod != NULL);
res_mode = get_irn_mode(proj_mod);
- switch(get_nice_modecode(res_mode))
+ switch (get_nice_modecode(res_mode))
{
case irm_Is:
case irm_Hs:
break;
default:
- fprintf(stderr, "Mode for Mod not supported: %s\n", get_mode_name(res_mode));
- assert(0);
- return NULL;
-
+ panic("Mode for Mod not supported: %s\n", get_mode_name(res_mode));
}
- proj_div = new_rd_Proj(env->dbg, env->block, div_result, res_mode, pn_DivMod_res_div);
+ proj_div = new_rd_Proj(env->dbg, div_result, res_mode, pn_DivMod_res_div);
mul_result = new_bd_ppc32_Mullw(env->dbg, env->block, proj_div, op2, res_mode);
mod_result = new_bd_ppc32_Sub(env->dbg, env->block, op1, mul_result, res_mode);
ir_node *op1 = get_Shl_left(env->irn);
ir_node *op2 = get_Shl_right(env->irn);
- if(is_ppc32_Const(op2))
+ if (is_ppc32_Const(op2))
{
ir_node *shift = new_bd_ppc32_Rlwinm(env->dbg, env->block, op1, env->mode);
tarval *tv_const = get_ppc32_constant_tarval(op2);
ir_node *op1 = get_Shr_left(env->irn);
ir_node *op2 = get_Shr_right(env->irn);
- if(is_ppc32_Const(op2))
+ if (is_ppc32_Const(op2))
{
ir_node *shift = new_bd_ppc32_Rlwinm(env->dbg, env->block, op1, env->mode);
tarval *tv_const = get_ppc32_constant_tarval(op2);
ir_node *op1 = get_Shrs_left(env->irn);
ir_node *op2 = get_Shrs_right(env->irn);
- if(is_ppc32_Const(op2))
+ if (is_ppc32_Const(op2))
{
ir_node *shift = new_bd_ppc32_Srawi(env->dbg, env->block, op1, env->mode);
tarval *tv_const = get_ppc32_constant_tarval(op2);
ir_node *op1 = get_Rotl_left(env->irn);
ir_node *op2 = get_Rotl_right(env->irn);
- if(is_ppc32_Const(op2))
+ if (is_ppc32_Const(op2))
{
ir_node *rot = new_bd_ppc32_Rlwinm(env->dbg, env->block, op1, env->mode);
tarval *tv_const = get_ppc32_constant_tarval(op2);
set_irn_mode(edge->src, get_ppc32_mode_Cond());
}
- if(mode_is_float(env->mode))
+ if (mode_is_float(env->mode))
return new_bd_ppc32_fCmpu(env->dbg, env->block, op1, op2, env->mode);
- else if(mode_is_signed(env->mode))
+ else if (mode_is_signed(env->mode))
{
- if(is_16bit_signed_const(op2))
+ if (is_16bit_signed_const(op2))
{
ir_node *cmp = new_bd_ppc32_Cmpi(env->dbg, env->block, op1, env->mode);
tarval *tv_const = get_ppc32_constant_tarval(op2);
}
else
{
- if(is_16bit_unsigned_const(op2))
+ if (is_16bit_unsigned_const(op2))
{
ir_node *cmp = new_bd_ppc32_Cmpli(env->dbg, env->block, op1, env->mode);
tarval *tv_const = get_ppc32_constant_tarval(op2);
{
ir_node *op = get_Minus_op(env->irn);
- switch(get_nice_modecode(env->mode)){
+ switch (get_nice_modecode(env->mode)){
case irm_D:
case irm_F:
return new_bd_ppc32_fNeg(env->dbg, env->block, op, env->mode);
ir_node* in[1];
set_ppc32_offset_mode(andi, ppc32_ao_Lo16);
set_ppc32_constant_tarval(andi, new_tarval_from_long(mask, mode_Is));
- in[0] = new_rd_Proj(env->dbg, env->block, andi, env->mode,1);
+ in[0] = new_rd_Proj(env->dbg, andi, env->mode,1);
be_new_Keep(env->block, 1, in);
- return new_rd_Proj(env->dbg, env->block, andi, env->mode,0);
+ return new_rd_Proj(env->dbg, andi, env->mode,0);
}
/**
#define SKIP return op
- if(from_mode == to_mode) SKIP;
+ if (from_mode == to_mode) SKIP;
- switch(from_mode){
+ switch (from_mode){
case irm_F:
- switch(to_mode)
+ switch (to_mode)
{
case irm_D: SKIP;
default:
break;
case irm_D:
- switch(to_mode)
+ switch (to_mode)
{
case irm_F:
return new_bd_ppc32_fRsp(env->dbg, env->block, op, env->mode);
case irm_Is:
case irm_Iu:
- switch(to_mode)
+ switch (to_mode)
{
case irm_Hs:
return new_bd_ppc32_Extsh(env->dbg, env->block, op, env->mode);
case irm_Hs:
case irm_Hu:
- switch(to_mode)
+ switch (to_mode)
{
case irm_Iu:
- if(from_mode==irm_Hu)
+ if (from_mode==irm_Hu)
case irm_Hu:
return own_gen_Andi_dot_lo16(env, op, 0xffff);
case irm_Is:
case irm_Bs:
case irm_Bu:
- switch(to_mode)
+ switch (to_mode)
{
case irm_Iu:
case irm_Hu:
- if(from_mode==irm_Bs)
+ if (from_mode==irm_Bs)
case irm_Bu:
return own_gen_Andi_dot_lo16(env, op, 0xff);
case irm_Is:
}
break;
case irm_P:
- if(to_mode==irm_Is || to_mode==irm_Iu) SKIP;
+ if (to_mode==irm_Is || to_mode==irm_Iu) SKIP;
break;
default:
break;
int shift = 7;
ir_node *n1,*n2;
- switch(get_nice_modecode(env->mode))
+ switch (get_nice_modecode(env->mode))
{
case irm_F:
case irm_D:
break;
}
panic("Mode for Abs not supported: %F", env->mode);
- return NULL;
}
/**
{
ir_node *selector = get_Cond_selector(env->irn);
ir_mode *projmode = get_irn_mode(selector);
- if(is_Proj(selector) && projmode==get_ppc32_mode_Cond())
+ if (is_Proj(selector) && projmode==get_ppc32_mode_Cond())
{
int projnum = get_Proj_proj(selector);
ir_node *branch = new_bd_ppc32_Branch(env->dbg, env->block, selector, env->mode);
*/
static ir_node *gen_Unknown(ppc32_transform_env_t *env)
{
- if(mode_is_float(env->mode))
+ if (mode_is_float(env->mode))
return new_bd_ppc32_fUnknown(env->dbg, env->block, env->mode);
else if (mode_is_int(env->mode))
return new_bd_ppc32_Unknown(env->dbg, env->block, env->mode);
tarval *tv_const = NULL;
ident *id_symconst = NULL;
- if(is_ppc32_Const(ptr))
+ if (is_ppc32_Const(ptr))
{
tv_const = get_ppc32_constant_tarval(ptr);
ptr = new_bd_ppc32_Addis_zero(env->dbg, env->block, mode_P, ppc32_ao_Ha16, tv_const, NULL);
}
- else if(is_ppc32_SymConst(ptr))
+ else if (is_ppc32_SymConst(ptr))
{
#if 0
ir_entity *ent = get_ppc32_frame_entity(ptr);
- if(is_direct_entity(ent))
+ if (is_direct_entity(ent))
{
id_symconst = get_entity_ident(ent);
ptr = new_bd_ppc32_Addis_zero(env->dbg, env->block, mode_P, ppc32_ao_Ha16, NULL, id_symconst);
ident *id_symconst = NULL;
loadptr = ldst_insert_const(loadptr, &tv_const, &id_symconst, env);
- switch(get_nice_modecode(mode)){
+ switch (get_nice_modecode(mode)){
case irm_Bu:
load = new_bd_ppc32_Lbz(env->dbg, env->block, loadptr, get_Load_mem(node));
break;
{
ir_node *proj_load, *extsb_node;
load = new_bd_ppc32_Lbz(env->dbg, env->block, loadptr, get_Load_mem(node));
- proj_load = new_rd_Proj(env->dbg, env->block, load, mode, pn_Load_res);
+ proj_load = new_rd_Proj(env->dbg, load, mode, pn_Load_res);
extsb_node = new_bd_ppc32_Extsb(env->dbg, env->block, proj_load, mode);
exchange(get_succ_Proj(env->irn, pn_Load_res), extsb_node);
break;
panic("Mode for Load not supported: %F", env->mode);
}
- if(tv_const)
+ if (tv_const)
{
set_ppc32_offset_mode(load, ppc32_ao_Lo16);
set_ppc32_constant_tarval(load, tv_const);
}
- else if(id_symconst)
+ else if (id_symconst)
{
set_ppc32_offset_mode(load, ppc32_ao_Lo16);
set_ppc32_symconst_ident(load, id_symconst);
storeptr = ldst_insert_const(storeptr, &tv_const, &id_symconst, env);
- switch(get_nice_modecode(mode)){
+ switch (get_nice_modecode(mode)){
case irm_Bu:
case irm_Bs:
store = new_bd_ppc32_Stb(env->dbg, env->block, storeptr, get_Store_value(node), get_Store_mem(node));
default:
panic("Mode for Store not supported: %F", env->mode);
}
- if(tv_const)
+ if (tv_const)
{
set_ppc32_offset_mode(store, ppc32_ao_Lo16);
set_ppc32_constant_tarval(store, tv_const);
}
- else if(id_symconst)
+ else if (id_symconst)
{
set_ppc32_offset_mode(store, ppc32_ao_Lo16);
set_ppc32_symconst_ident(store, id_symconst);
ir_node *load, *store = NULL;
- if(size/4 >= 1)
+ if (size/4 >= 1)
{
ir_node *res;
tarval *offset0 = new_tarval_from_long(0, mode_Is);
load = new_bd_ppc32_Lwz(env->dbg, env->block, src, mem);
set_ppc32_constant_tarval(load, offset0);
set_ppc32_offset_mode(load, ppc32_ao_None);
- mem = new_rd_Proj(env->dbg, env->block, load, mode_M, pn_Load_M);
- res = new_rd_Proj(env->dbg, env->block, load, mode_Is, pn_Load_res);
+ mem = new_rd_Proj(env->dbg, load, mode_M, pn_Load_M);
+ res = new_rd_Proj(env->dbg, load, mode_Is, pn_Load_res);
store = new_bd_ppc32_Stw(env->dbg, env->block, dest, res, mem);
set_ppc32_constant_tarval(store, offset0);
set_ppc32_offset_mode(store, ppc32_ao_None);
- mem = new_rd_Proj(env->dbg, env->block, store, mode_M, pn_Store_M);
+ mem = new_rd_Proj(env->dbg, store, mode_M, pn_Store_M);
- if(size/4==2)
+ if (size/4==2)
{
load = new_bd_ppc32_Lwz(env->dbg, env->block, src, mem);
set_ppc32_constant_tarval(load, offset4);
set_ppc32_offset_mode(load, ppc32_ao_None);
- mem = new_rd_Proj(env->dbg, env->block, load, mode_M, pn_Load_M);
- res = new_rd_Proj(env->dbg, env->block, load, mode_Is, pn_Load_res);
+ mem = new_rd_Proj(env->dbg, load, mode_M, pn_Load_M);
+ res = new_rd_Proj(env->dbg, load, mode_Is, pn_Load_res);
store = new_bd_ppc32_Stw(env->dbg, env->block, dest, res, mem);
set_ppc32_constant_tarval(store, offset4);
set_ppc32_offset_mode(store, ppc32_ao_None);
- mem = new_rd_Proj(env->dbg, env->block, store, mode_M, pn_Store_M);
+ mem = new_rd_Proj(env->dbg, store, mode_M, pn_Store_M);
offset = 8;
}
ir_node *ornode, *mtctrnode;
ir_node* in[3];
assert(size/4-1<=0xffff);
- if(size/4-1<0x8000)
+ if (size/4-1<0x8000)
{
ornode = new_bd_ppc32_Addi_zero(env->dbg, env->block, mode_Is);
set_ppc32_offset_mode(ornode, ppc32_ao_None);
mtctrnode = new_bd_ppc32_Mtctr(env->dbg, env->block, ornode, mode_Is);
store = new_bd_ppc32_LoopCopy(env->dbg, env->block, src, dest, mtctrnode, mem, mode_T);
- in[0] = new_rd_Proj(env->dbg, env->block, store, mode_Is, 1); // src
- in[1] = new_rd_Proj(env->dbg, env->block, store, mode_Is, 2); // dest
- in[2] = new_rd_Proj(env->dbg, env->block, store, mode_Is, 4); // temp
+ in[0] = new_rd_Proj(env->dbg, store, mode_Is, 1); // src
+ in[1] = new_rd_Proj(env->dbg, store, mode_Is, 2); // dest
+ in[2] = new_rd_Proj(env->dbg, store, mode_Is, 4); // temp
be_new_Keep(env->block, 3, in);
- in[0] = new_rd_Proj(env->dbg, env->block, store, mode_Is, 3); // ctr
+ in[0] = new_rd_Proj(env->dbg, store, mode_Is, 3); // ctr
be_new_Keep(env->block, 1, in);
- mem = new_rd_Proj(env->dbg, env->block, store, mode_M, 0);
+ mem = new_rd_Proj(env->dbg, store, mode_M, 0);
offset = 4;
}
}
- if(size & 2)
+ if (size & 2)
{
ir_node *res;
tarval* offset_tarval = new_tarval_from_long(offset, mode_Is);
load = new_bd_ppc32_Lhz(env->dbg, env->block, src, mem);
set_ppc32_constant_tarval(load, offset_tarval);
set_ppc32_offset_mode(load, ppc32_ao_None);
- mem = new_rd_Proj(env->dbg, env->block, load, mode_M, pn_Load_M);
- res = new_rd_Proj(env->dbg, env->block, load, mode_Is, pn_Load_res);
+ mem = new_rd_Proj(env->dbg, load, mode_M, pn_Load_M);
+ res = new_rd_Proj(env->dbg, load, mode_Is, pn_Load_res);
store = new_bd_ppc32_Sth(env->dbg, env->block, dest, res, mem);
set_ppc32_constant_tarval(store, offset_tarval);
set_ppc32_offset_mode(store, ppc32_ao_None);
- mem = new_rd_Proj(env->dbg, env->block, store, mode_M, pn_Store_M);
+ mem = new_rd_Proj(env->dbg, store, mode_M, pn_Store_M);
offset += 2;
}
- if(size & 1)
+ if (size & 1)
{
ir_node *res;
tarval* offset_tarval = new_tarval_from_long(offset, mode_Is);
load = new_bd_ppc32_Lbz(env->dbg, env->block, src, mem);
set_ppc32_constant_tarval(load, offset_tarval);
set_ppc32_offset_mode(load, ppc32_ao_None);
- mem = new_rd_Proj(env->dbg, env->block, load, mode_M, pn_Load_M);
- res = new_rd_Proj(env->dbg, env->block, load, mode_Is, pn_Load_res);
+ mem = new_rd_Proj(env->dbg, load, mode_M, pn_Load_M);
+ res = new_rd_Proj(env->dbg, load, mode_Is, pn_Load_res);
store = new_bd_ppc32_Stb(env->dbg, env->block, dest, res, mem);
set_ppc32_constant_tarval(store, offset_tarval);
set_ppc32_offset_mode(store, ppc32_ao_None);
- // mem = new_rd_Proj(env->dbg, env->irg, env->block, store, mode_M, pn_Store_M);
+ // mem = new_rd_Proj(env->dbg, env->irg, store, mode_M, pn_Store_M);
}
return store;
ir_graph *rem;
ir_entity *ent = NULL;
- if(!const_set)
+ if (!const_set)
const_set = new_set(cmp_tv_ent, 10);
- if(!tp)
+ if (!tp)
tp = new_type_primitive(env->mode);
key.tv = known_const;
entry = set_insert(const_set, &key, sizeof(key), HASH_PTR(key.tv));
- if(!entry->ent) {
+ if (!entry->ent) {
char buf[80];
sprintf(buf, "const_%ld", get_irn_node_nr(env->irn));
ent = new_entity(get_glob_type(), new_id_from_str(buf), tp);
tarval *tv_const = get_ppc32_constant_tarval(env->irn);
ir_node *node;
- switch(get_nice_modecode(env->mode)){
+ switch (get_nice_modecode(env->mode)){
case irm_Hu:
{
unsigned char val1 = get_tarval_sub_bits(tv_const, 1);
- if(val1&0x80)
+ if (val1&0x80)
{
ir_node *zeroreg = new_bd_ppc32_Addi_zero(env->dbg, env->block, mode_Is);
set_ppc32_constant_tarval(zeroreg, new_tarval_from_long(0, mode_Is));
{
unsigned char val2 = get_tarval_sub_bits(tv_const,2);
unsigned char val3 = get_tarval_sub_bits(tv_const,3);
- if(!val2 && !val3)
+ if (!val2 && !val3)
{
unsigned char val1 = get_tarval_sub_bits(tv_const, 1);
- if(val1&0x80)
+ if (val1&0x80)
{
ir_node *zeroreg = new_bd_ppc32_Addi_zero(env->dbg, env->block, mode_Is);
set_ppc32_constant_tarval(zeroreg, new_tarval_from_long(0, mode_Is));
unsigned char val0 = get_tarval_sub_bits(tv_const,0);
unsigned char val1 = get_tarval_sub_bits(tv_const,1);
node = new_bd_ppc32_Addis_zero(env->dbg, env->block, env->mode, ppc32_ao_Hi16, tv_const, NULL);
- if(val0 || val1)
+ if (val0 || val1)
{
set_ppc32_constant_tarval(node, tv_const);
node = new_bd_ppc32_Ori(env->dbg, env->block, node, env->mode);
{
tarval *tv_const = get_ppc32_constant_tarval(env->irn);
- switch(get_nice_modecode(env->mode)){
+ switch (get_nice_modecode(env->mode)){
case irm_D:
case irm_F:
{
env->mode = mode_P;
ent = get_ppc32_frame_entity(env->irn);
#if 0
- if(is_direct_entity(ent))
+ if (is_direct_entity(ent))
{
ident *id_symconst = get_entity_ident(ent);
ir_node *node_addis = new_bd_ppc32_Addis_zero(env->dbg, env->block, env->mode, ppc32_ao_Ha16, NULL, id_symconst);
- if(mode==mode_D)
+ if (mode==mode_D)
load = new_bd_ppc32_Lfd(env->dbg, env->block, node_addis, new_NoMem());
else // mode_F
load = new_bd_ppc32_Lfs(env->dbg, env->block, node_addis, new_NoMem());
{
#endif
addr = gen_ppc32_SymConst (env);
- if(mode==mode_D)
+ if (mode==mode_D)
load = new_bd_ppc32_Lfd(env->dbg, env->block, addr, new_NoMem());
else // mode_F
load = new_bd_ppc32_Lfs(env->dbg, env->block, addr, new_NoMem());
#if 0
}
#endif
- return new_rd_Proj(env->dbg, env->block, load, mode, pn_Load_res);
+ return new_rd_Proj(env->dbg, load, mode, pn_Load_res);
}
default:
ir_entity *ent = get_ppc32_frame_entity(env->irn);
ident *id_symconst = get_entity_ident(ent);
ir_node *node;
- switch(get_nice_modecode(env->mode)){
+ switch (get_nice_modecode(env->mode)){
case irm_P:
{
/*
node = new_bd_ppc32_Lwz(env->dbg, env->block, node_addis, new_NoMem());
set_ppc32_symconst_ident(node, id_symconst);
set_ppc32_offset_mode(node, ppc32_ao_Lo16);
- node = new_rd_Proj(env->dbg, env->block, node, env->mode, pn_Load_res);
+ node = new_rd_Proj(env->dbg, node, env->mode, pn_Load_res);
}
#endif
break;