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
62775cde
Commit
62775cde
authored
Nov 11, 2013
by
Matthias Braun
Browse files
change modulo_shift backend_param representation
parent
142d8164
Changes
6
Hide whitespace changes
Inline
Side-by-side
include/libfirm/be.h
View file @
62775cde
...
...
@@ -99,19 +99,17 @@ typedef ir_node *(create_trampoline_fkt)(ir_node *block, ir_node *mem, ir_node *
typedef
struct
backend_params
{
/** the backend uses big-endian byte ordering if set, else little endian */
unsigned
byte_order_big_endian
:
1
;
/** whether the architecure can natively handle modulo shift modes.
* If this is true, then you can assume that shifting in modes with
* module_shift==machine_size (if mode size is <= machine_size) is efficient
*/
unsigned
modulo_shift_efficient
:
1
;
/** whether the architecure can natively handle modulo shift modes.
* If this is true, then you can assume that shifting without modulo shift
* is efficient
*/
unsigned
non_modulo_shift_efficient
:
1
;
/** 1 if backend supports generation of position independent code (PIC) */
unsigned
pic_supported
:
1
;
/**
* Shifts on this architecture only read some bits of the shift value.
* For example on x86 for every mode with less than 32bits only 5 bits of
* the shift value are read resulting in a modulo shift value of 32.
* On an architecture without modulo_shift this value is 0.
*/
unsigned
char
modulo_shift
;
/** Settings for architecture dependent optimizations. */
const
ir_settings_arch_dep_t
*
dep_param
;
...
...
ir/be/TEMPLATE/bearch_TEMPLATE.c
View file @
62775cde
...
...
@@ -248,9 +248,8 @@ static const backend_params *TEMPLATE_get_backend_params(void)
{
static
backend_params
p
=
{
0
,
/* 0: little-endian, 1: big-endian */
1
,
/* modulo shift efficient */
0
,
/* non-modulo shift efficient */
0
,
/* PIC code supported */
32
,
/* modulo_shift */
NULL
,
/* architecture dependent settings, will be set later */
TEMPLATE_is_mux_allowed
,
/* parameter for if conversion */
32
,
/* machine size - a 32bit CPU */
...
...
ir/be/amd64/bearch_amd64.c
View file @
62775cde
...
...
@@ -538,9 +538,8 @@ static int amd64_is_mux_allowed(ir_node *sel, ir_node *mux_false,
static
const
backend_params
*
amd64_get_backend_params
(
void
)
{
static
backend_params
p
=
{
0
,
/* little endian */
1
,
/* modulo shift is efficient */
0
,
/* non-modulo shift is not efficient */
0
,
/* PIC code not supported */
32
,
/* modulo shift */
NULL
,
/* will be set later */
amd64_is_mux_allowed
,
/* parameter for if conversion */
64
,
/* machine size */
...
...
ir/be/arm/bearch_arm.c
View file @
62775cde
...
...
@@ -419,9 +419,8 @@ static const backend_params *arm_get_libfirm_params(void)
};
static
backend_params
p
=
{
1
,
/* big endian */
1
,
/* modulo shift efficient */
0
,
/* non-modulo shift not efficient */
0
,
/* PIC code not supported */
32
,
/* modulo shift */
&
ad
,
/* will be set later */
arm_is_mux_allowed
,
/* allow_ifconv function */
32
,
/* machine size */
...
...
ir/be/ia32/bearch_ia32.c
View file @
62775cde
...
...
@@ -1411,9 +1411,8 @@ static const ir_settings_arch_dep_t ia32_arch_dep = {
};
static
backend_params
ia32_backend_params
=
{
0
,
/* little endian */
1
,
/* modulo shift efficient */
0
,
/* non-modulo shift not efficient */
1
,
/* PIC code supported */
32
,
/* modulo shift */
&
ia32_arch_dep
,
/* will be set later */
ia32_is_mux_allowed
,
32
,
/* machine_size */
...
...
ir/be/sparc/bearch_sparc.c
View file @
62775cde
...
...
@@ -561,9 +561,8 @@ static const backend_params *sparc_get_backend_params(void)
};
static
backend_params
p
=
{
1
,
/* big endian */
1
,
/* modulo shift efficient */
0
,
/* non-modulo shift not efficient */
0
,
/* PIC code supported */
32
,
/* modulo shift */
&
arch_dep
,
/* will be set later */
sparc_is_mux_allowed
,
/* parameter for if conversion */
32
,
/* machine size */
...
...
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