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
e2c8c172
Commit
e2c8c172
authored
Nov 28, 2014
by
Matthias Braun
Browse files
amd64: slightly simplify create_sign_tv()
parent
84116e94
Changes
1
Hide whitespace changes
Inline
Side-by-side
ir/be/amd64/amd64_transform.c
View file @
e2c8c172
...
...
@@ -402,16 +402,11 @@ static ir_node *create_float_const(dbg_info *dbgi, ir_node *block,
ir_tarval
*
create_sign_tv
(
ir_mode
*
mode
)
{
unsigned
size
=
get_mode_size_bits
(
mode
);
ir_tarval
*
tv
;
if
(
size
==
32
)
{
tv
=
get_mode_one
(
mode_Iu
);
tv
=
tarval_shl_unsigned
(
tv
,
31
);
}
else
{
assert
(
size
==
64
);
tv
=
get_mode_one
(
mode_Lu
);
tv
=
tarval_shl_unsigned
(
tv
,
63
);
}
return
tarval_bitcast
(
tv
,
mode
);
assert
(
size
==
32
||
size
==
64
);
ir_mode
*
intmode
=
size
==
32
?
mode_Iu
:
mode_Lu
;
ir_tarval
*
one
=
get_mode_one
(
intmode
);
ir_tarval
*
sign
=
tarval_shl_unsigned
(
one
,
size
-
1
);
return
tarval_bitcast
(
sign
,
mode
);
}
static
ir_node
*
gen_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