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
d23cf441
Commit
d23cf441
authored
May 21, 2016
by
Christoph Mallon
Browse files
ia32: Clean up 'ia32_create_float_array()' a bit.
parent
a3c3e029
Changes
1
Hide whitespace changes
Inline
Side-by-side
ir/be/ia32/ia32_transform.c
View file @
d23cf441
...
...
@@ -494,11 +494,6 @@ static ir_node *gen_be_Relocation(ir_node *node)
return
new_bd_ia32_Const
(
dbgi
,
block
,
&
imm
);
}
static
ir_type
*
make_array_type
(
ir_type
*
tp
)
{
return
new_type_array
(
tp
,
2
);
}
/**
* Create a float[2] array type for the given atomic type.
*
...
...
@@ -506,29 +501,17 @@ static ir_type *make_array_type(ir_type *tp)
*/
static
ir_type
*
ia32_create_float_array
(
ir_type
*
tp
)
{
ir_mode
*
mode
=
get_type_mode
(
tp
);
ir_type
*
arr
;
if
(
mode
==
ia32_mode_float32
)
{
static
ir_type
*
float_F
;
arr
=
float_F
;
if
(
arr
==
NULL
)
arr
=
float_F
=
make_array_type
(
tp
);
}
else
if
(
mode
==
ia32_mode_float64
)
{
static
ir_type
*
float_D
;
arr
=
float_D
;
if
(
arr
==
NULL
)
arr
=
float_D
=
make_array_type
(
tp
);
}
else
{
static
ir_type
*
float_E
;
arr
=
float_E
;
if
(
arr
==
NULL
)
arr
=
float_E
=
make_array_type
(
tp
);
}
return
arr
;
static
ir_type
*
float_F
;
static
ir_type
*
float_D
;
static
ir_type
*
float_E
;
ir_mode
*
const
mode
=
get_type_mode
(
tp
);
ir_type
**
const
arr
=
mode
==
ia32_mode_float32
?
&
float_F
:
mode
==
ia32_mode_float64
?
&
float_D
:
/* */
&
float_E
;
if
(
!*
arr
)
*
arr
=
new_type_array
(
tp
,
2
);
return
*
arr
;
}
/* Generates an entity for a known FP const (used for FP Neg + Abs) */
...
...
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