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
6bc15eba
Commit
6bc15eba
authored
Dec 12, 2011
by
Matthias Braun
Browse files
avoid unnecessary #define in header
parent
0ed495da
Changes
2
Hide whitespace changes
Inline
Side-by-side
include/libfirm/lowering.h
View file @
6bc15eba
...
...
@@ -272,8 +272,19 @@ FIRM_API int i_mapper_pow(ir_node *call, void *ctx);
*/
FIRM_API
int
i_mapper_exp
(
ir_node
*
call
,
void
*
ctx
);
#define i_mapper_exp2 i_mapper_exp
#define i_mapper_exp10 i_mapper_exp
/**
* A mapper for the floating point exp2(a): floattype exp2(floattype a);
*
* @return 1 if the exp call was removed, 0 else.
*/
FIRM_API
int
i_mapper_exp2
(
ir_node
*
call
,
void
*
ctx
);
/**
* A mapper for the floating point exp10(a): floattype exp10(floattype a);
*
* @return 1 if the exp call was removed, 0 else.
*/
FIRM_API
int
i_mapper_exp10
(
ir_node
*
call
,
void
*
ctx
);
/**
* A mapper for the floating point log(a): floattype log(floattype a);
...
...
@@ -282,8 +293,19 @@ FIRM_API int i_mapper_exp(ir_node *call, void *ctx);
*/
FIRM_API
int
i_mapper_log
(
ir_node
*
call
,
void
*
ctx
);
#define i_mapper_log2 i_mapper_log
#define i_mapper_log10 i_mapper_log
/**
* A mapper for the floating point log(a): floattype log(floattype a);
*
* @return 1 if the log call was removed, 0 else.
*/
FIRM_API
int
i_mapper_log2
(
ir_node
*
call
,
void
*
ctx
);
/**
* A mapper for the floating point log(a): floattype log(floattype a);
*
* @return 1 if the log call was removed, 0 else.
*/
FIRM_API
int
i_mapper_log10
(
ir_node
*
call
,
void
*
ctx
);
/**
* A mapper for the floating point sin(a): floattype sin(floattype a);
...
...
ir/lower/lower_intrinsics.c
View file @
6bc15eba
...
...
@@ -430,6 +430,16 @@ int i_mapper_exp(ir_node *call, void *ctx)
return
0
;
}
int
i_mapper_exp2
(
ir_node
*
call
,
void
*
ctx
)
{
return
i_mapper_exp
(
call
,
ctx
);
}
int
i_mapper_exp10
(
ir_node
*
call
,
void
*
ctx
)
{
return
i_mapper_exp
(
call
,
ctx
);
}
/**
* A mapper for mapping f(0.0) to 0.0.
*/
...
...
@@ -525,6 +535,18 @@ int i_mapper_log(ir_node *call, void *ctx)
return
i_mapper_one_to_zero
(
call
,
ctx
,
FS_OPT_RTS_LOG
);
}
int
i_mapper_log2
(
ir_node
*
call
,
void
*
ctx
)
{
/* log2(1.0) = 0.0 */
return
i_mapper_one_to_zero
(
call
,
ctx
,
FS_OPT_RTS_LOG
);
}
int
i_mapper_log10
(
ir_node
*
call
,
void
*
ctx
)
{
/* log10(1.0) = 0.0 */
return
i_mapper_one_to_zero
(
call
,
ctx
,
FS_OPT_RTS_LOG
);
}
int
i_mapper_sin
(
ir_node
*
call
,
void
*
ctx
)
{
/* sin(0.0) = 0.0 */
...
...
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