Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Zwinkau
libfirm
Commits
1780dfad
Commit
1780dfad
authored
Sep 28, 2007
by
Matthias Braun
Browse files
fix for fehler87
[r15986]
parent
83c0154b
Changes
2
Show whitespace changes
Inline
Side-by-side
ir/be/ia32/ia32_emitter.c
View file @
1780dfad
...
@@ -144,37 +144,6 @@ static const arch_register_t *get_out_reg(const ir_node *irn, int pos)
...
@@ -144,37 +144,6 @@ static const arch_register_t *get_out_reg(const ir_node *irn, int pos)
return
reg
;
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.
* 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)
...
@@ -281,10 +250,26 @@ void ia32_emit_x87_register(const ir_node *node, int pos)
be_emit_string
(
attr
->
x87
[
pos
]
->
name
);
be_emit_string
(
attr
->
x87
[
pos
]
->
name
);
}
}
static
static
void
ia32_emit_mode_suffix_mode
(
const
ir_mode
*
mode
)
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
)
void
ia32_emit_mode_suffix
(
const
ir_node
*
node
)
...
...
ir/be/ia32/ia32_x87.c
View file @
1780dfad
...
@@ -1213,7 +1213,7 @@ static int sim_store(x87_state *state, ir_node *n, ir_op *op, ir_op *op_p) {
...
@@ -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 not full: push value and fstp
- stack full: fstp value and load again
- stack full: fstp value and load again
*/
*/
if
(
mode
==
mode_E
)
{
if
(
mode
==
mode_E
||
mode
==
mode_Ls
)
{
if
(
depth
<
N_x87_REGS
)
{
if
(
depth
<
N_x87_REGS
)
{
/* ok, we have a free register: push + fstp */
/* ok, we have a free register: push + fstp */
x87_create_fpush
(
state
,
n
,
op2_idx
,
n_ia32_vfst_val
);
x87_create_fpush
(
state
,
n
,
op2_idx
,
n_ia32_vfst_val
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment