Commit 57cc436b authored by Matthias Braun's avatar Matthias Braun
Browse files

let backends announce whether they support PIC

parent 1a5c66ee
......@@ -109,6 +109,8 @@ typedef struct backend_params {
* is efficient
*/
unsigned non_modulo_shift_efficient:1;
/** 1 if backend supports generation of position independent code (PIC) */
unsigned pic_supported:1;
/** Settings for architecture dependent optimizations. */
const ir_settings_arch_dep_t *dep_param;
......
......@@ -249,6 +249,7 @@ static const backend_params *TEMPLATE_get_backend_params(void)
0, /* 0: little-endian, 1: big-endian */
1, /* modulo shift efficient */
0, /* non-modulo shift efficient */
0, /* PIC code supported */
NULL, /* architecture dependent settings, will be set later */
TEMPLATE_is_mux_allowed, /* parameter for if conversion */
32, /* machine size - a 32bit CPU */
......
......@@ -387,6 +387,7 @@ static const backend_params *amd64_get_backend_params(void) {
0, /* little endian */
1, /* modulo shift is efficient */
0, /* non-modulo shift is not efficient */
0, /* PIC code not supported */
NULL, /* will be set later */
amd64_is_mux_allowed, /* parameter for if conversion */
64, /* machine size */
......
......@@ -469,6 +469,7 @@ static const backend_params *arm_get_libfirm_params(void)
1, /* big endian */
1, /* modulo shift efficient */
0, /* non-modulo shift not efficient */
0, /* PIC code not supported */
&ad, /* will be set later */
arm_is_mux_allowed, /* allow_ifconv function */
32, /* machine size */
......
......@@ -1465,6 +1465,7 @@ static backend_params ia32_backend_params = {
0, /* little endian */
1, /* modulo shift efficient */
0, /* non-modulo shift not efficient */
1, /* PIC code supported */
&ia32_arch_dep, /* will be set later */
ia32_is_mux_allowed,
32, /* machine_size */
......
......@@ -552,6 +552,7 @@ static const backend_params *sparc_get_backend_params(void)
1, /* big endian */
1, /* modulo shift efficient */
0, /* non-modulo shift not efficient */
0, /* PIC code supported */
&arch_dep, /* will be set later */
sparc_is_mux_allowed, /* parameter for if conversion */
32, /* machine size */
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment