From 624e2a2fcf1f6f45a1ae785077e9f3b3f06ab1ad Mon Sep 17 00:00:00 2001 From: Christoph Mallon Date: Tue, 27 Nov 2012 16:24:52 +0100 Subject: [PATCH] ia32: Simply return the single_req in ia32_parse_clobber(). --- ir/be/ia32/ia32_common_transform.c | 22 +++------------------- 1 file changed, 3 insertions(+), 19 deletions(-) diff --git a/ir/be/ia32/ia32_common_transform.c b/ir/be/ia32/ia32_common_transform.c index 059f81768..0b2e4a8a2 100644 --- a/ir/be/ia32/ia32_common_transform.c +++ b/ir/be/ia32/ia32_common_transform.c @@ -811,27 +811,11 @@ const arch_register_req_t *ia32_parse_clobber(const char *clobber) if (strcmp(clobber, "memory") == 0 || strcmp(clobber, "cc") == 0) return NULL; - struct obstack *obst = get_irg_obstack(current_ir_graph); - const arch_register_t *reg = ia32_get_clobber_register(clobber); - arch_register_req_t *req; - unsigned *limited; - - if (reg == NULL) { + arch_register_t const *const reg = ia32_get_clobber_register(clobber); + if (!reg) panic("Register '%s' mentioned in asm clobber is unknown", clobber); - } - - assert(reg->index < 32); - limited = OALLOC(obst, unsigned); - *limited = 1 << reg->index; - - req = OALLOCZ(obst, arch_register_req_t); - req->type = arch_register_req_type_limited; - req->cls = reg->reg_class; - req->limited = limited; - req->width = 1; - - return req; + return reg->single_req; } -- 2.20.1