diff options
author | Søren Sandmann Pedersen <ssp@redhat.com> | 2013-09-09 11:35:13 -0400 |
---|---|---|
committer | Søren Sandmann Pedersen <ssp@redhat.com> | 2013-09-09 11:35:48 -0400 |
commit | a39a6bf773b6f6a86f13917ec764bbfe705e81b1 (patch) | |
tree | f7ec0b250cfa5ede118f284f5627b53481ad8da2 | |
parent | b2911d782326e4226eae01216bbfb8da9c0692ce (diff) |
more iterjit
-rw-r--r-- | iterjit.c | 36 |
1 files changed, 34 insertions, 2 deletions
@@ -604,7 +604,7 @@ dest_a8r8g8b8_begin (jit_dest_iter_t * dest, I_shl, dest->stride, IMM (2), /* Line */ - I_mov, dest->line, MEMBER(image, pixman_image_t, bits.bits), + I_mov, dest->line, MEMBER (image, pixman_image_t, bits.bits), I_mov, tmp, dest->stride, I_imul2, tmp, MEMBER (info, pixman_composite_info_t, dest_y), I_add, dest->line, tmp, @@ -663,6 +663,16 @@ dest_a8r8g8b8_process_line (jit_dest_iter_t *dest, BEGIN_ASM (jit->fragment) I_jmp, LABEL (test), + END_ASM(); + if (i == 2) + { + /* Cache-line align the main loop */ + BEGIN_ASM (jit->fragment) + I_align, IMM (64), + END_ASM (); + } + BEGIN_ASM (jit->fragment) + DEFINE_LABEL (loop), I_sub, dest->w, IMM (n_pixels[i]), END_ASM (); @@ -915,9 +925,23 @@ generate_kernel (jit_t *jit, reg_t h, composite_info; jit_switch_group (jit, "outer"); - jit_preserve_gp (jit, rsi); + composite_info = rsi; + jit_preserve_gp (jit, composite_info); + + /* Preserve callee-save registers */ + jit_preserve_gp (jit, rbx); + jit_preserve_gp (jit, r12); + jit_preserve_gp (jit, r13); + jit_preserve_gp (jit, r14); + jit_preserve_gp (jit, r15); + + BEGIN_ASM (jit->fragment) + I_push, rbp, + I_mov, rbp, rsp, + END_ASM(); + h = jit_alloc_gp (jit); BEGIN_ASM (jit->fragment) @@ -957,8 +981,16 @@ generate_kernel (jit_t *jit, mask_iter->end (mask_iter, jit); src_iter->end (src_iter, jit); + jit_switch_group (jit, "outer"); + /* Restore callee-save registers */ + jit_reload (jit, rbx); + jit_reload (jit, r12); + jit_reload (jit, r13); + jit_reload (jit, r14); + jit_reload (jit, r15); BEGIN_ASM (jit->fragment) DEFINE_LABEL ("done"), + I_pop, rbp, END_ASM(); } |