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
763ba23e
Commit
763ba23e
authored
Apr 25, 2016
by
Christoph Mallon
Browse files
ia32: Avoid potentially uninitialized variable.
parent
588f1860
Changes
1
Hide whitespace changes
Inline
Side-by-side
ir/be/ia32/ia32_encode.c
View file @
763ba23e
...
...
@@ -1215,21 +1215,24 @@ static void enc_fldcw(const ir_node *node)
static
void
enc_fst
(
const
ir_node
*
node
)
{
x86_insn_size_t
const
size
=
get_ia32_attr_const
(
node
)
->
size
;
unsigned
op
;
switch
(
size
)
{
case
X86_SIZE_32
:
be_emit8
(
0xD9
);
op
=
2
;
break
;
// fst[p]s
case
X86_SIZE_64
:
be_emit8
(
0xDD
);
op
=
2
;
break
;
// fst[p]l
case
X86_SIZE_80
:
be_emit8
(
0xDB
);
op
=
6
;
break
;
// fstpt
unsigned
op
;
case
X86_SIZE_32
:
be_emit8
(
0xD9
);
op
=
2
;
goto
enc
;
// fst[p]s
case
X86_SIZE_64
:
be_emit8
(
0xDD
);
op
=
2
;
goto
enc
;
// fst[p]l
case
X86_SIZE_80
:
be_emit8
(
0xDB
);
op
=
6
;
goto
enc
;
// fstpt
enc:
if
(
get_ia32_x87_attr_const
(
node
)
->
x87
.
pop
)
++
op
;
/* There is only a pop variant for long double store. */
assert
(
size
<
X86_SIZE_80
||
get_ia32_x87_attr_const
(
node
)
->
x87
.
pop
);
enc_mod_am
(
op
,
node
);
case
X86_SIZE_8
:
case
X86_SIZE_16
:
case
X86_SIZE_128
:
panic
(
"unexpected mode size"
)
;
break
;
}
if
(
get_ia32_x87_attr_const
(
node
)
->
x87
.
pop
)
++
op
;
// There is only a pop variant for long double store.
assert
(
size
<
X86_SIZE_80
||
get_ia32_x87_attr_const
(
node
)
->
x87
.
pop
);
enc_mod_am
(
op
,
node
);
panic
(
"unexpected mode size"
);
}
static
void
enc_fnstcw
(
const
ir_node
*
node
)
...
...
Write
Preview
Markdown
is supported
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