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
4241e0c6
Commit
4241e0c6
authored
Dec 11, 2007
by
Matthias Braun
Browse files
make get_inversed_pnc and get_negated_pnc return pn_Cmp to avoid warnings in frontends
[r16944]
parent
6fd8b025
Changes
2
Hide whitespace changes
Inline
Side-by-side
include/libfirm/irnode.h
View file @
4241e0c6
...
...
@@ -843,10 +843,10 @@ typedef enum {
const
char
*
get_pnc_string
(
int
pnc
);
/** Calculates the negated (Complement(R)) pnc condition. */
int
get_negated_pnc
(
int
pnc
,
ir_mode
*
mode
);
pn_Cmp
get_negated_pnc
(
long
pnc
,
ir_mode
*
mode
);
/** Calculates the inversed (R^-1) pnc condition, i.e., "<" --> ">" */
int
get_inversed_pnc
(
int
pnc
);
pn_Cmp
get_inversed_pnc
(
long
pnc
);
/** An alternative name for get_inversed_pnc() that can be better memorized. */
#define get_mirrored_pnc(pnc) get_inversed_pnc(pnc)
...
...
ir/ir/irnode.c
View file @
4241e0c6
...
...
@@ -72,26 +72,25 @@ const char *get_pnc_string(int pnc) {
/*
* Calculates the negated (Complement(R)) pnc condition.
*/
int
get_negated_pnc
(
int
pnc
,
ir_mode
*
mode
)
{
pn_Cmp
get_negated_pnc
(
long
pnc
,
ir_mode
*
mode
)
{
pnc
^=
pn_Cmp_True
;
/* do NOT add the Uo bit for non-floating point values */
if
(
!
mode_is_float
(
mode
))
pnc
&=
~
pn_Cmp_Uo
;
return
pnc
;
return
(
pn_Cmp
)
pnc
;
}
/* Calculates the inversed (R^-1) pnc condition, i.e., "<" --> ">" */
int
get_inversed_pnc
(
int
pnc
)
{
int
code
=
pnc
&
~
(
pn_Cmp_Lt
|
pn_Cmp_Gt
);
int
lesser
=
pnc
&
pn_Cmp_Lt
;
int
greater
=
pnc
&
pn_Cmp_Gt
;
pn_Cmp
get_inversed_pnc
(
long
pnc
)
{
long
code
=
pnc
&
~
(
pn_Cmp_Lt
|
pn_Cmp_Gt
);
long
lesser
=
pnc
&
pn_Cmp_Lt
;
long
greater
=
pnc
&
pn_Cmp_Gt
;
code
|=
(
lesser
?
pn_Cmp_Gt
:
0
)
|
(
greater
?
pn_Cmp_Lt
:
0
);
return
code
;
return
(
pn_Cmp
)
code
;
}
/**
...
...
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