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
e5fc2c3f
Commit
e5fc2c3f
authored
May 25, 2015
by
Christoph Mallon
Browse files
sparc: Handle the asm operand modifier 'r'.
parent
c87733a5
Changes
1
Hide whitespace changes
Inline
Side-by-side
ir/be/sparc/sparc_emitter.c
View file @
e5fc2c3f
...
...
@@ -711,6 +711,7 @@ static void emit_be_IncSP(const ir_node *irn)
static
void
emit_sparc_asm_operand
(
ir_node
const
*
const
node
,
char
const
modifier
,
unsigned
const
pos
)
{
bool
address_only
=
false
;
bool
zero_as_g0
=
false
;
switch
(
modifier
)
{
case
'\0'
:
break
;
...
...
@@ -720,6 +721,10 @@ static void emit_sparc_asm_operand(ir_node const *const node, char const modifie
address_only
=
true
;
break
;
case
'r'
:
zero_as_g0
=
true
;
break
;
default:
be_errorf
(
node
,
"asm contains unknown modifier '%c'"
,
modifier
);
return
;
...
...
@@ -729,7 +734,10 @@ static void emit_sparc_asm_operand(ir_node const *const node, char const modifie
sparc_asm_operand_t
const
*
const
op
=
&
attr
->
operands
[
pos
];
switch
(
op
->
kind
)
{
case
ASM_OPERAND_IMMEDIATE
:
sparc_emit_immediate
(
op
->
immediate_value
,
op
->
immediate_value_entity
);
if
(
zero_as_g0
&&
op
->
immediate_value
==
0
&&
!
op
->
immediate_value_entity
)
sparc_emit_register
(
&
sparc_registers
[
REG_G0
]);
else
sparc_emit_immediate
(
op
->
immediate_value
,
op
->
immediate_value_entity
);
return
;
case
ASM_OPERAND_INPUT_VALUE
:
...
...
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