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
686c3334
Commit
686c3334
authored
Mar 15, 2006
by
Sebastian Hack
Browse files
The bad, the evil and the ugly
parent
27270e9e
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
ir/be/beabi.c
View file @
686c3334
This diff is collapsed.
Click to expand it.
ir/be/beabi.h
View file @
686c3334
...
...
@@ -6,30 +6,47 @@
#ifndef _BEABI_H
#define _BEABI_H
#include "pset.h"
#include "firm_types.h"
#include "be.h"
#include "bearch.h"
#include "beabi_t.h"
typedef
struc
t
{
unsigned
left_to_right
:
1
;
/**< Arguments are from left to right. */
unsigned
store_args_sequential
:
1
;
/**< Use sequential stores for arguments. */
unsigned
try_omit_fp
:
1
;
/**< Try to omit the frame pointer. */
unsigned
fp_free
:
1
;
/**< The function can use any register as frame pointer. */
unsigned
call_has_imm
:
1
;
/**< A call can take the callee's address as an immediate. */
}
be_abi_call_flags_bits_t
;
struct
_be_abi_call_flags_bits_
t
{
unsigned
left_to_right
:
1
;
/**< Arguments are from left to right. */
unsigned
store_args_sequential
:
1
;
/**< Use sequential stores for arguments. */
unsigned
try_omit_fp
:
1
;
/**< Try to omit the frame pointer. */
unsigned
fp_free
:
1
;
/**< The function can use any register as frame pointer. */
unsigned
call_has_imm
:
1
;
/**< A call can take the callee's address as an immediate. */
};
typedef
union
{
union
_be_abi_call_flags_t
{
be_abi_call_flags_bits_t
bits
;
unsigned
val
;
}
be_abi_call_flags_t
;
};
void
be_abi_call_set_flags
(
be_abi_call_t
*
call
,
be_abi_call_flags_t
flags
,
ir_type
*
add_frame
);
struct
_be_abi_callbacks_t
{
void
*
(
*
init
)(
const
be_abi_call_t
*
call
,
const
arch_isa_t
*
isa
,
ir_graph
*
irg
);
void
(
*
done
)(
void
*
self
);
ir_type
*
(
*
get_between_type
)(
void
*
self
);
void
(
*
regs_saved_by_me
)(
void
*
self
,
pset
*
regs
);
const
arch_register_t
*
(
*
prologue
)(
void
*
self
,
pmap
*
reg_map
);
void
(
*
epilogue
)(
void
*
self
,
ir_node
*
bl
,
ir_node
**
mem
,
pmap
*
reg_map
);
};
void
be_abi_call_set_flags
(
be_abi_call_t
*
call
,
be_abi_call_flags_t
flags
,
const
be_abi_callbacks_t
*
cb
);
void
be_abi_call_param_stack
(
be_abi_call_t
*
call
,
int
pos
);
void
be_abi_call_param_reg
(
be_abi_call_t
*
call
,
int
pos
,
const
arch_register_t
*
reg
);
void
be_abi_call_res_reg
(
be_abi_call_t
*
call
,
int
pos
,
const
arch_register_t
*
reg
);
be_abi_call_flags_t
be_abi_call_get_flags
(
const
be_abi_call_t
*
call
);
be_abi_irg_t
*
be_abi_introduce
(
be_irg_t
*
bi
);
void
be_abi_fix_stack_bias
(
be_abi_irg_t
*
env
);
void
be_abi_fix_stack_nodes
(
be_abi_irg_t
*
env
);
...
...
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