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
cdffc485
Commit
cdffc485
authored
Aug 01, 2012
by
Christoph Mallon
Browse files
Simplify emit_sparc_Div(): Pass the instruction mnemonic instead of a bool flag.
parent
80210523
Changes
1
Hide whitespace changes
Inline
Side-by-side
ir/be/sparc/sparc_emitter.c
View file @
cdffc485
...
@@ -563,7 +563,7 @@ static void fill_delay_slot(void)
...
@@ -563,7 +563,7 @@ static void fill_delay_slot(void)
emitting_delay_slot
=
false
;
emitting_delay_slot
=
false
;
}
}
static
void
emit_sparc_Div
(
const
ir_node
*
node
,
bool
is_signed
)
static
void
emit_sparc_Div
(
const
ir_node
*
node
,
char
const
*
const
insn
)
{
{
/* can we get the delay count of the wr instruction somewhere? */
/* can we get the delay count of the wr instruction somewhere? */
unsigned
wry_delay_count
=
3
;
unsigned
wry_delay_count
=
3
;
...
@@ -575,17 +575,17 @@ static void emit_sparc_Div(const ir_node *node, bool is_signed)
...
@@ -575,17 +575,17 @@ static void emit_sparc_Div(const ir_node *node, bool is_signed)
fill_delay_slot
();
fill_delay_slot
();
}
}
sparc_emitf
(
node
,
"%s %S1, %SI2, %D0"
,
i
s_signed
?
"sdiv"
:
"udiv"
);
sparc_emitf
(
node
,
"%s %S1, %SI2, %D0"
,
i
nsn
);
}
}
static
void
emit_sparc_SDiv
(
const
ir_node
*
node
)
static
void
emit_sparc_SDiv
(
const
ir_node
*
node
)
{
{
emit_sparc_Div
(
node
,
true
);
emit_sparc_Div
(
node
,
"sdiv"
);
}
}
static
void
emit_sparc_UDiv
(
const
ir_node
*
node
)
static
void
emit_sparc_UDiv
(
const
ir_node
*
node
)
{
{
emit_sparc_Div
(
node
,
false
);
emit_sparc_Div
(
node
,
"udiv"
);
}
}
static
void
emit_sparc_Call
(
const
ir_node
*
node
)
static
void
emit_sparc_Call
(
const
ir_node
*
node
)
...
...
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