Commit 1da86703 authored by Manuel Mohr's avatar Manuel Mohr
Browse files

sparc: Corrected sp-relative access warning.

parent 665f2c58
......@@ -66,6 +66,7 @@ extern const arch_irn_ops_t sparc_irn_ops;
#define SPARC_MIN_STACKSIZE 92
#define SPARC_AGGREGATE_RETURN_OFFSET 64
#define SPARC_PARAMS_SPILL_OFFSET 68
#define SPARC_SAVE_AREA_SIZE 64
#define SPARC_N_PARAM_REGS 6
#define SPARC_STACK_ALIGNMENT 8
#define SPARC_REGISTER_SIZE 4
......
......@@ -172,14 +172,16 @@ void sparc_emit_source_reg_and_offset(const ir_node *node, int regpos,
const arch_register_t *reg = arch_get_irn_register_in(node, regpos);
const sparc_load_store_attr_t *attr;
#ifdef DEBUG_libfirm
if (reg == &sparc_registers[REG_SP]) {
attr = get_sparc_load_store_attr_const(node);
if (!attr->is_reg_reg
&& attr->base.immediate_value < SPARC_MIN_STACKSIZE) {
&& attr->base.immediate_value < SPARC_SAVE_AREA_SIZE) {
ir_fprintf(stderr, "warning: emitting stack pointer relative load/store with offset < %d\n", SPARC_MIN_STACKSIZE);
ir_fprintf(stderr, "warning: emitting stack pointer relative load/store with offset < %d\n", SPARC_SAVE_AREA_SIZE);
}
}
#endif
sparc_emit_source_register(node, regpos);
sparc_emit_offset(node, offpos);
......
Supports Markdown
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