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
301ca1d3
Commit
301ca1d3
authored
May 11, 2006
by
Johannes Spallek
Browse files
Fixed creation of is_$arch_*()
get_$arch_irn_opcode() now returns -1 if it's not a $arch operation
parent
287b0514
Changes
1
Show whitespace changes
Inline
Side-by-side
ir/be/scripts/generate_new_opcodes.pl
View file @
301ca1d3
...
...
@@ -88,7 +88,7 @@ foreach my $op (keys(%nodes)) {
push
(
@obst_opvar
,
"
ir_op *op_
$op
= NULL;
\n
");
push
(
@obst_get_opvar
,
"
ir_op *get_op_
$op
(void) { return op_
$op
; }
\n
");
push
(
@obst_get_opvar
,
"
int is_
$op
(const ir_node *n) { return get_irn_opcode(n) == iro_
$op
; }
\n\n
");
push
(
@obst_get_opvar
,
"
int is_
$op
(const ir_node *n) { return get_
$arch
\
_
irn_opcode(n) == iro_
$op
; }
\n\n
");
push
(
@obst_is_archirn
,
"
is_
$op
(node)
");
...
...
@@ -348,8 +348,9 @@ int is_$arch\_irn(const ir_node *node) {
}
int get_$arch\_irn_opcode(const ir_node *node) {
assert
(is_$arch\_irn(node))
;
if
(is_$arch\_irn(node))
return get_irn_opcode(node) - $arch\_opcode_start;
return -1;
}
ENDOFISIRN
...
...
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