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
631e02a3
Commit
631e02a3
authored
Jul 21, 2004
by
Michael Beck
Browse files
Fixed funcCall parameter offset
[r3543]
parent
1a72c3bb
Changes
1
Hide whitespace changes
Inline
Side-by-side
ir/ir/irnode.c
View file @
631e02a3
...
...
@@ -29,10 +29,11 @@
/* some constants fixing the positions of nodes predecessors
in the in array */
#define CALL_PARAM_OFFSET 2
#define SEL_INDEX_OFFSET 2
#define RETURN_RESULT_OFFSET 1
/* mem is not a result */
#define END_KEEPALIVE_OFFSET 0
#define CALL_PARAM_OFFSET 2
#define FUNCCALL_PARAM_OFFSET 1
#define SEL_INDEX_OFFSET 2
#define RETURN_RESULT_OFFSET 1
/* mem is not a result */
#define END_KEEPALIVE_OFFSET 0
static
const
char
*
pnc_name_arr
[]
=
{
"False"
,
"Eq"
,
"Lt"
,
"Le"
,
...
...
@@ -1192,13 +1193,13 @@ set_FuncCall_ptr (ir_node *node, ir_node *ptr) {
ir_node
**
get_FuncCall_param_arr
(
ir_node
*
node
)
{
assert
(
node
->
op
==
op_FuncCall
);
return
(
ir_node
**
)
&
get_irn_in
(
node
)[
CALL_PARAM_OFFSET
];
return
(
ir_node
**
)
&
get_irn_in
(
node
)[
FUNC
CALL_PARAM_OFFSET
];
}
int
get_FuncCall_n_params
(
ir_node
*
node
)
{
assert
(
node
->
op
==
op_FuncCall
);
return
(
get_irn_arity
(
node
)
-
CALL_PARAM_OFFSET
);
return
(
get_irn_arity
(
node
)
-
FUNC
CALL_PARAM_OFFSET
);
}
int
...
...
@@ -1216,13 +1217,13 @@ set_FuncCall_arity (ir_node *node, ir_node *arity) {
ir_node
*
get_FuncCall_param
(
ir_node
*
node
,
int
pos
)
{
assert
(
node
->
op
==
op_FuncCall
);
return
get_irn_n
(
node
,
pos
+
CALL_PARAM_OFFSET
);
return
get_irn_n
(
node
,
pos
+
FUNC
CALL_PARAM_OFFSET
);
}
void
set_FuncCall_param
(
ir_node
*
node
,
int
pos
,
ir_node
*
param
)
{
assert
(
node
->
op
==
op_FuncCall
);
set_irn_n
(
node
,
pos
+
CALL_PARAM_OFFSET
,
param
);
set_irn_n
(
node
,
pos
+
FUNC
CALL_PARAM_OFFSET
,
param
);
}
type
*
...
...
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