From bc0140faf9bccd15445f2d837b9ffd0fb479a94c Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Tue, 9 Dec 2014 16:58:56 +0100 Subject: [PATCH] neon: add support for 64 bit parameters --- orc/orcrules-neon.c | 41 ++++++++++++++++++++++++++++++++++++----- 1 file changed, 36 insertions(+), 5 deletions(-) diff --git a/orc/orcrules-neon.c b/orc/orcrules-neon.c index 83b33d3..cc47a11 100644 --- a/orc/orcrules-neon.c +++ b/orc/orcrules-neon.c @@ -801,9 +801,6 @@ neon_rule_loadpX (OrcCompiler *compiler, void *user, OrcInstruction *insn) } else if (size == 4) { orc_neon_emit_loadpl (compiler, dest->alloc, insn->src_args[0]); } else if (size == 8) { - if (src->size == 8) { - ORC_COMPILER_ERROR(compiler,"64-bit parameters not implemented"); - } orc_neon_emit_loadpq (compiler, dest->alloc, insn->src_args[0]); } else { ORC_PROGRAM_ERROR(compiler,"unimplemented"); @@ -1289,7 +1286,24 @@ orc_neon_emit_loadpq (OrcCompiler *compiler, int dest, int param) update ? "!" : ""); code = 0xf4a0000d; code |= 2<<10; - code |= (0&7)<<5; + code |= (0)<<7; + code |= (compiler->gp_tmpreg&0xf) << 16; + code |= (dest&0xf) << 12; + code |= ((dest>>4)&0x1) << 22; + code |= (!update) << 1; + orc_arm_emit (compiler, code); + + ORC_ASM_CODE(compiler," vld1.32 %s[0], [%s]%s\n", + orc_neon_reg_name (dest+1), + orc_arm_reg_name (compiler->gp_tmpreg), + update ? "!" : ""); + code = 0xf4a0000d; + code |= 2<<10; + code |= (0)<<7; + code |= (compiler->gp_tmpreg&0xf) << 16; + code |= ((dest+1)&0xf) << 12; + code |= (((dest+1)>>4)&0x1) << 22; + code |= (!update) << 1; orc_arm_emit (compiler, code); orc_arm_emit_add_imm (compiler, compiler->gp_tmpreg, @@ -1302,7 +1316,24 @@ orc_neon_emit_loadpq (OrcCompiler *compiler, int dest, int param) update ? "!" : ""); code = 0xf4a0000d; code |= 2<<10; - code |= (1&7)<<5; + code |= (1)<<7; + code |= (compiler->gp_tmpreg&0xf) << 16; + code |= (dest&0xf) << 12; + code |= ((dest>>4)&0x1) << 22; + code |= (!update) << 1; + orc_arm_emit (compiler, code); + + ORC_ASM_CODE(compiler," vld1.32 %s[1], [%s]%s\n", + orc_neon_reg_name (dest+1), + orc_arm_reg_name (compiler->gp_tmpreg), + update ? "!" : ""); + code = 0xf4a0000d; + code |= 2<<10; + code |= (1)<<7; + code |= (compiler->gp_tmpreg&0xf) << 16; + code |= ((dest+1)&0xf) << 12; + code |= (((dest+1)>>4)&0x1) << 22; + code |= (!update) << 1; orc_arm_emit (compiler, code); } -- 2.7.4