X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fbe%2Fbearch.c;h=942e7f51d0ad78969c769e80cd35a0a0cbf324f9;hb=0b1140d1887f497ef413709e5cda2608f2cd1017;hp=88c8482ff7a91fb751f2124e6057f624f7512c83;hpb=1872920c09708b361d06c0dc9f4c1fd0a03544f5;p=libfirm diff --git a/ir/be/bearch.c b/ir/be/bearch.c index 88c8482ff..942e7f51d 100644 --- a/ir/be/bearch.c +++ b/ir/be/bearch.c @@ -52,15 +52,15 @@ arch_env_t *arch_env_init(const arch_isa_if_t *isa_if, FILE *file_handle, be_mai /** * Put all registers in a class into a bitset. * @param cls The class. - * @param bs The bitset. May be NULL. + * @param bs The bitset. * @return The number of registers in the class. */ static int arch_register_class_put(const arch_register_class_t *cls, bitset_t *bs) { - int i, n; - for(i = 0, n = cls->n_regs; i < n; ++i) + int i, n = cls->n_regs; + for (i = n - 1; i >= 0; --i) bitset_set(bs, i); - return cls->n_regs; + return n; } /**