Commit 1780dfad authored by Matthias Braun's avatar Matthias Braun
Browse files

fix for fehler87

[r15986]
parent 83c0154b
......@@ -144,37 +144,6 @@ static const arch_register_t *get_out_reg(const ir_node *irn, int pos)
return reg;
}
/**
* Determine the gnu assembler suffix that indicates a mode
*/
static char get_mode_suffix(const ir_mode *mode)
{
if(mode_is_float(mode)) {
switch(get_mode_size_bits(mode)) {
case 32:
return 's';
case 64:
return 'l';
case 80:
case 96:
return 't';
}
} else {
assert(mode_is_int(mode) || mode_is_reference(mode));
switch(get_mode_size_bits(mode)) {
case 64:
return 'q';
case 32:
return 'l';
case 16:
return 'w';
case 8:
return 'b';
}
}
panic("Can't output mode_suffix for %+F\n", mode);
}
/**
* Add a number to a prefix. This number will not be used a second time.
*/
......@@ -281,10 +250,26 @@ void ia32_emit_x87_register(const ir_node *node, int pos)
be_emit_string(attr->x87[pos]->name);
}
static
void ia32_emit_mode_suffix_mode(const ir_mode *mode)
static void ia32_emit_mode_suffix_mode(const ir_mode *mode)
{
be_emit_char(get_mode_suffix(mode));
if(mode_is_float(mode)) {
switch(get_mode_size_bits(mode)) {
case 32: be_emit_char('s'); return;
case 64: be_emit_char('l'); return;
case 80: be_emit_char('t'); return;
}
} else {
assert(mode_is_int(mode) || mode_is_reference(mode));
switch(get_mode_size_bits(mode)) {
case 64: be_emit_cstring("ll"); return;
/* gas docu says q is the suffix but gcc, objdump and icc use
ll apparently */
case 32: be_emit_char('l'); return;
case 16: be_emit_char('w'); return;
case 8: be_emit_char('b'); return;
}
}
panic("Can't output mode_suffix for %+F\n", mode);
}
void ia32_emit_mode_suffix(const ir_node *node)
......
......@@ -1213,7 +1213,7 @@ static int sim_store(x87_state *state, ir_node *n, ir_op *op, ir_op *op_p) {
- stack not full: push value and fstp
- stack full: fstp value and load again
*/
if (mode == mode_E) {
if (mode == mode_E || mode == mode_Ls) {
if (depth < N_x87_REGS) {
/* ok, we have a free register: push + fstp */
x87_create_fpush(state, n, op2_idx, n_ia32_vfst_val);
......
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