projects
/
libfirm
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
made code C89 compliant
[libfirm]
/
ir
/
be
/
bearch.c
diff --git
a/ir/be/bearch.c
b/ir/be/bearch.c
index
53acd80
..
8ff6628
100644
(file)
--- a/
ir/be/bearch.c
+++ b/
ir/be/bearch.c
@@
-22,11
+22,14
@@
#include "bearch.h"
#include "ircons_t.h"
#include "bearch.h"
#include "ircons_t.h"
+#include "irnode_t.h"
#include "bitset.h"
#include "pset.h"
#include "entity.h"
#include "bitset.h"
#include "pset.h"
#include "entity.h"
+#include "irprintf.h"
+
arch_env_t *arch_env_init(arch_env_t *env, const arch_isa_if_t *isa_if)
{
memset(env, 0, sizeof(*env));
arch_env_t *arch_env_init(arch_env_t *env, const arch_isa_if_t *isa_if)
{
memset(env, 0, sizeof(*env));
@@
-34,7
+37,7
@@
arch_env_t *arch_env_init(arch_env_t *env, const arch_isa_if_t *isa_if)
return env;
}
return env;
}
-arch_env_t *arch_env_
add
_irn_handler(arch_env_t *env,
+arch_env_t *arch_env_
push
_irn_handler(arch_env_t *env,
const arch_irn_handler_t *handler)
{
assert(env->handlers_tos <= ARCH_MAX_HANDLERS);
const arch_irn_handler_t *handler)
{
assert(env->handlers_tos <= ARCH_MAX_HANDLERS);
@@
-42,6
+45,12
@@
arch_env_t *arch_env_add_irn_handler(arch_env_t *env,
return env;
}
return env;
}
+const arch_irn_handler_t *arch_env_pop_irn_handler(arch_env_t *env)
+{
+ assert(env->handlers_tos > 0 && env->handlers_tos <= ARCH_MAX_HANDLERS);
+ return env->handlers[--env->handlers_tos];
+}
+
static const arch_irn_ops_t *fallback_irn_ops = NULL;
int arch_register_class_put(const arch_register_class_t *cls, bitset_t *bs)
static const arch_irn_ops_t *fallback_irn_ops = NULL;
int arch_register_class_put(const arch_register_class_t *cls, bitset_t *bs)
@@
-85,10
+94,10
@@
const arch_register_req_t *arch_get_register_req(const arch_env_t *env,
return ops->impl->get_irn_reg_req(ops, req, irn, pos);
}
return ops->impl->get_irn_reg_req(ops, req, irn, pos);
}
-void arch_set_
stack_bias(const arch_env_t *env, ir_node *irn, int bias
)
+void arch_set_
frame_offset(const arch_env_t *env, ir_node *irn, int offset
)
{
const arch_irn_ops_t *ops = get_irn_ops(env, irn);
{
const arch_irn_ops_t *ops = get_irn_ops(env, irn);
- ops->impl->set_
stack_bias(ops, irn, bias
);
+ ops->impl->set_
frame_offset(ops, irn, offset
);
}
entity *arch_get_frame_entity(const arch_env_t *env, ir_node *irn)
}
entity *arch_get_frame_entity(const arch_env_t *env, ir_node *irn)
@@
-221,12
+230,12
@@
extern char *arch_register_req_format(char *buf, size_t len, const arch_register
}
if(arch_register_req_is(req, should_be_same)) {
}
if(arch_register_req_is(req, should_be_same)) {
- snprintf(tmp, sizeof(tmp), " same to: %+F", req->other_different);
+
ir_
snprintf(tmp, sizeof(tmp), " same to: %+F", req->other_different);
strncat(buf, tmp, len);
}
if(arch_register_req_is(req, should_be_different)) {
strncat(buf, tmp, len);
}
if(arch_register_req_is(req, should_be_different)) {
- snprintf(tmp, sizeof(tmp), " different to: %+F", req->other_different);
+
ir_
snprintf(tmp, sizeof(tmp), " different to: %+F", req->other_different);
strncat(buf, tmp, len);
}
strncat(buf, tmp, len);
}