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
2f5aa603
Commit
2f5aa603
authored
Mar 14, 2005
by
Sebastian Hack
Browse files
Added the bearch files to the makefile
parent
1d6f2aa3
Changes
3
Show whitespace changes
Inline
Side-by-side
ir/be/Makefile.in
View file @
2f5aa603
...
...
@@ -15,7 +15,7 @@ srcdir = @srcdir@
topdir
=
../..
subdir
:=
ir/be
INSTALL_HEADERS
=
be.h
INSTALL_HEADERS
=
be.h
bearch.h bearch_obj.def
SOURCES
=
$(INSTALL_HEADERS)
...
...
ir/be/bearch.c
View file @
2f5aa603
...
...
@@ -6,6 +6,8 @@
* $Id$
*/
#include
<string.h>
#include
"bearch_t.h"
#include
"firm_config.h"
...
...
@@ -237,7 +239,7 @@ arch_insn_t *arch_add_insn(arch_insn_format_t *fmt, const char *name)
return
insn
;
}
arch_insn_format_t
*
arch_find_insn_format
(
arch_isa_t
*
isa
,
const
char
*
name
)
arch_insn_format_t
*
arch_find_insn_format
(
const
arch_isa_t
*
isa
,
const
char
*
name
)
{
return
arch_data_find
(
insn_format
,
isa
,
name
);
}
...
...
@@ -247,6 +249,11 @@ arch_isa_t *arch_find_isa(const char *name)
return
arch_data_find
(
isa
,
NULL
,
name
);
}
arch_insn_t
*
arch_find_insn
(
const
arch_isa_t
*
isa
,
const
char
*
name
)
{
return
arch_data_find
(
insn
,
isa
,
name
);
}
arch_register_class_t
*
arch_find_register_class_t
(
arch_isa_t
*
isa
,
const
char
*
name
)
{
return
arch_data_find
(
register_class
,
isa
,
name
);
...
...
@@ -279,3 +286,8 @@ ir_node *arch_new_node_bare(const arch_insn_t *insn, ir_graph *irg, int arity)
return
arch_new_node
(
insn
,
irg
,
new_Unknown
(
mode_BB
),
mode_Is
,
arity
,
in
);
}
ir_mode
*
arch_get_unknown_mode
(
void
)
{
return
mode_Is
;
}
ir/be/bearch.h
View file @
2f5aa603
...
...
@@ -2,7 +2,11 @@
#ifndef _FIRM_BEARCH_H
#define _FIRM_BEARCH_H
#include
"bitset.h"
#ifdef __cplusplus
extern
"C"
{
#endif
struct
bitset_t
;
/*
* Define the types of the arch facility.
...
...
@@ -19,7 +23,7 @@
* @param pos The number of the insn's operand to consider.
* @param valid_regs A bitset where all valid registers are put.
*/
typedef
void
(
arch_register_callback_t
)(
ir_node
*
irn
,
int
pos
,
bitset_t
*
valid_regs
);
typedef
void
(
arch_register_callback_t
)(
ir_node
*
irn
,
int
pos
,
struct
bitset_t
*
valid_regs
);
/**
...
...
@@ -99,7 +103,7 @@ arch_insn_t *arch_add_insn(arch_insn_format_t *fmt, const char *name);
* @return The instruction format, if it was added before, or NULL if it
* is unknown.
*/
arch_insn_format_t
*
arch_find_insn_format
(
arch_isa_t
*
isa
,
const
char
*
name
);
arch_insn_format_t
*
arch_find_insn_format
(
const
arch_isa_t
*
isa
,
const
char
*
name
);
/**
* Find an isa.
...
...
@@ -108,6 +112,14 @@ arch_insn_format_t *arch_find_insn_format(arch_isa_t *isa, const char *name);
*/
arch_isa_t
*
arch_find_isa
(
const
char
*
name
);
/**
* Find an sintrsuction in the instruction set architecture.
* @param isa The instruction set architecture.
* @param name The name of the instruction.
* @return The instruction or NULL if no such instruction exists.
*/
arch_insn_t
*
arch_find_insn
(
const
arch_isa_t
*
isa
,
const
char
*
name
);
/**
* Find a register class of an isa.
* @param isa The isa.
...
...
@@ -126,5 +138,33 @@ arch_register_class_t *arch_find_register_class(arch_isa_t *isa, const char *nam
*/
arch_register_set_t
*
arch_get_register_set_for_class
(
arch_register_class_t
*
cls
);
/**
* Get a mode which is a placeholder for an unknown mode.
* @return Some mode to use, if you don't know which mode you will need,
* yet.
*/
ir_mode
*
arch_get_unknown_mode
(
void
);
/**
* Make a new bare instance of an insn.
* @param insn The instruction.
* @param irg The graph.
* @param arity The number of operands to reserve for the ir_node.
* @return An ir node. Its block and operands are set to an Unknown
* node.
*/
ir_node
*
arch_new_node_bare
(
const
arch_insn_t
*
insn
,
ir_graph
*
irg
,
int
arity
);
/**
* Make a new instance of an insn.
* This functions works like new_ir_node() and uses the op in the
* insn.
*/
ir_node
*
arch_new_node
(
const
arch_insn_t
*
insn
,
ir_graph
*
irg
,
ir_node
*
block
,
ir_mode
*
mode
,
int
arity
,
ir_node
**
in
);
#ifdef __cplusplus
}
#endif
#endif
Write
Preview
Supports
Markdown
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