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
b4bdc4fe
Commit
b4bdc4fe
authored
Jul 09, 2010
by
Matthias Braun
Browse files
allow backend to do its own custom abi handling and disable the generic beabi.h/.c stuff
[r27725]
parent
6d0764bb
Changes
7
Hide whitespace changes
Inline
Side-by-side
ir/be/TEMPLATE/bearch_TEMPLATE.c
View file @
b4bdc4fe
...
...
@@ -203,6 +203,7 @@ static TEMPLATE_isa_t TEMPLATE_isa_template = {
NULL
,
/* main environment */
7
,
/* costs for a spill instruction */
5
,
/* costs for a reload instruction */
false
,
/* no custom abi handling */
},
};
...
...
ir/be/amd64/bearch_amd64.c
View file @
b4bdc4fe
...
...
@@ -322,6 +322,7 @@ static amd64_isa_t amd64_isa_template = {
NULL
,
/* main environment */
7
,
/* costs for a spill instruction */
5
,
/* costs for a reload instruction */
false
,
/* no custom abi handling */
},
};
...
...
ir/be/arm/bearch_arm.c
View file @
b4bdc4fe
...
...
@@ -667,6 +667,7 @@ static arm_isa_t arm_isa_template = {
NULL
,
/* main environment */
7
,
/* spill costs */
5
,
/* reload costs */
false
,
/* no custom abi handling */
},
0
,
/* use generic register names instead of SP, LR, PC */
ARM_FPU_ARCH_FPE
,
/* FPU architecture */
...
...
ir/be/beabi.c
View file @
b4bdc4fe
...
...
@@ -2279,6 +2279,13 @@ be_abi_irg_t *be_abi_introduce(ir_graph *irg)
sp_req
->
type
|=
arch_register_req_type_ignore
;
}
/* break here if backend provides a custom API.
* Note: we shouldn't have to setup any be_abi_irg_t* stuff at all,
* but need more cleanup to make this work
*/
if
(
arch_env
->
custom_abi
)
return
env
;
env
->
init_sp
=
dummy
=
new_r_Dummy
(
irg
,
arch_env
->
sp
->
reg_class
->
mode
);
env
->
calls
=
NEW_ARR_F
(
ir_node
*
,
0
);
...
...
ir/be/bearch.h
View file @
b4bdc4fe
...
...
@@ -750,6 +750,9 @@ struct arch_env_t {
const
be_main_env_t
*
main_env
;
/**< the be main environment */
int
spill_cost
;
/**< cost for a be_Spill node */
int
reload_cost
;
/**< cost for a be_Reload node */
bool
custom_abi
:
1
;
/**< backend does all abi handling
and does not need the generic stuff
from beabi.h/.c */
};
static
inline
unsigned
arch_irn_get_n_outs
(
const
ir_node
*
node
)
...
...
ir/be/ia32/bearch_ia32.c
View file @
b4bdc4fe
...
...
@@ -1541,6 +1541,7 @@ static ia32_isa_t ia32_isa_template = {
NULL
,
/* main environment */
7
,
/* costs for a spill instruction */
5
,
/* costs for a reload instruction */
false
,
/* no custom abi handling */
},
NULL
,
/* 16bit register names */
NULL
,
/* 8bit register names */
...
...
ir/be/sparc/bearch_sparc.c
View file @
b4bdc4fe
...
...
@@ -341,6 +341,7 @@ static sparc_isa_t sparc_isa_template = {
NULL
,
/* main environment */
7
,
/* costs for a spill instruction */
5
,
/* costs for a reload instruction */
false
,
/* no custom abi handling */
},
NULL
/* current code generator */
};
...
...
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