Commit 14a14dd3 authored by Christoph Mallon's avatar Christoph Mallon
Browse files

sparc: Simplify emit_be_Perm() a bit.

parent 64b47826
......@@ -862,13 +862,9 @@ static void emit_be_Perm(const ir_node *irn)
{
arch_register_req_t const *const req = arch_get_irn_register_req_out(irn, 0);
if (req->cls == &sparc_reg_classes[CLASS_sparc_fp]) {
arch_register_t const *const reg0 = arch_get_irn_register_out(irn, 0);
arch_register_t const *const reg1 = arch_get_irn_register_out(irn, 1);
unsigned reg_idx0 = reg0->global_index;
unsigned reg_idx1 = reg1->global_index;
for (unsigned i = 0, width = req->width; i < width; ++i) {
const arch_register_t *r0 = &sparc_registers[reg_idx0+i];
const arch_register_t *r1 = &sparc_registers[reg_idx1+i];
arch_register_t const *r0 = arch_get_irn_register_out(irn, 0);
arch_register_t const *r1 = arch_get_irn_register_out(irn, 1);
for (unsigned i = 0, width = req->width; i < width; ++r0, ++r1, ++i) {
sparc_emitf(irn, "fmovs %R, %%f31", r0);
sparc_emitf(irn, "fmovs %R, %R", r1, r0);
sparc_emitf(irn, "fmovs %%f31, %R", r1);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment