summaryrefslogtreecommitdiffhomepage
path: root/ir/be/bearch.c
diff options
context:
space:
mode:
authorChristoph Mallon <mallon@cs.uni-saarland.de>2015-01-16 13:35:53 +0100
committerChristoph Mallon <mallon@cs.uni-saarland.de>2015-01-18 11:21:07 +0100
commit634830b6d4b9e339a33a0fd65cab0d828755848a (patch)
tree413272de97d43eee01905128a85173f157387433 /ir/be/bearch.c
parent1289d1b6a61462bcdf9ac3d64ac484e0d728e474 (diff)
be: Move the info about the register classes and registers struct the arch_env_t into struct arch_isa_if_t.
Diffstat (limited to 'ir/be/bearch.c')
-rw-r--r--ir/be/bearch.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/ir/be/bearch.c b/ir/be/bearch.c
index a6c323f..8f47c14 100644
--- a/ir/be/bearch.c
+++ b/ir/be/bearch.c
@@ -8,6 +8,7 @@
* @brief Processor architecture specification.
* @author Sebastian Hack
*/
+#include "be_t.h"
#include "bearch.h"
#include "benode.h"
#include "beinfo.h"
@@ -108,11 +109,11 @@ bool arch_reg_is_allocatable(const arch_register_req_t *req,
return true;
}
-const arch_register_t *arch_find_register(const arch_env_t *arch_env,
- const char *name)
+arch_register_t const *arch_find_register(char const *const name)
{
- for (size_t i = 0, n = arch_env->n_registers; i < n; ++i) {
- const arch_register_t *reg = &arch_env->registers[i];
+ arch_register_t const *const regs = isa_if->registers;
+ for (size_t i = 0, n = isa_if->n_registers; i < n; ++i) {
+ arch_register_t const *const reg = &regs[i];
if (strcmp(reg->name, name) == 0)
return reg;
}