Commit 9a04679b authored by David Schleef's avatar David Schleef

neon: add preload

parent 67bf6d6c
...@@ -28,6 +28,8 @@ void orc_neon_emit_loadil (OrcCompiler *p, int reg, int value); ...@@ -28,6 +28,8 @@ void orc_neon_emit_loadil (OrcCompiler *p, int reg, int value);
void orc_neon_emit_loadpb (OrcCompiler *p, int reg, int param); void orc_neon_emit_loadpb (OrcCompiler *p, int reg, int param);
void orc_neon_emit_loadpw (OrcCompiler *p, int reg, int param); void orc_neon_emit_loadpw (OrcCompiler *p, int reg, int param);
void orc_neon_emit_loadpl (OrcCompiler *p, int reg, int param); void orc_neon_emit_loadpl (OrcCompiler *p, int reg, int param);
void orc_neon_preload (OrcCompiler *compiler, OrcVariable *var, int write,
int offset);
#endif #endif
......
...@@ -501,6 +501,8 @@ orc_neon_emit_load_src (OrcCompiler *compiler, OrcVariable *var) ...@@ -501,6 +501,8 @@ orc_neon_emit_load_src (OrcCompiler *compiler, OrcVariable *var)
default: default:
ORC_ERROR("bad size"); ORC_ERROR("bad size");
} }
orc_neon_preload (compiler, var, FALSE, 256);
} }
void void
...@@ -530,6 +532,7 @@ orc_neon_emit_store_dest (OrcCompiler *compiler, OrcVariable *var) ...@@ -530,6 +532,7 @@ orc_neon_emit_store_dest (OrcCompiler *compiler, OrcVariable *var)
default: default:
ORC_ERROR("bad size"); ORC_ERROR("bad size");
} }
//orc_neon_preload (compiler, var, TRUE, -32);
} }
static int static int
......
...@@ -212,6 +212,30 @@ orc_neon_emit_mov_quad (OrcCompiler *compiler, int dest, int src) ...@@ -212,6 +212,30 @@ orc_neon_emit_mov_quad (OrcCompiler *compiler, int dest, int src)
dest, src, src); dest, src, src);
} }
void
orc_neon_preload (OrcCompiler *compiler, OrcVariable *var, int write,
int offset)
{
orc_uint32 code;
/* Don't use multiprocessing extensions */
write = FALSE;
ORC_ASM_CODE(compiler," pld%s [%s, #%d]\n",
write ? "w" : "",
orc_arm_reg_name (var->ptr_register), offset);
code = 0xf510f000;
if (!write) code |= (1<<22);
code |= (var->ptr_register&0xf) << 16;
if (offset < 0) {
code |= ((-offset)&0xfff) << 0;
} else {
code |= (offset&0xfff) << 0;
code |= (1<<23);
}
orc_arm_emit (compiler, code);
}
void void
orc_neon_load_halfvec_aligned (OrcCompiler *compiler, OrcVariable *var, int update) orc_neon_load_halfvec_aligned (OrcCompiler *compiler, OrcVariable *var, int update)
{ {
...@@ -606,7 +630,7 @@ orc_neon_storel (OrcCompiler *compiler, int dest, int update, int src1, int is_a ...@@ -606,7 +630,7 @@ orc_neon_storel (OrcCompiler *compiler, int dest, int update, int src1, int is_a
orc_neon_reg_name (src1 + 1), orc_neon_reg_name (src1 + 1),
orc_arm_reg_name (dest), orc_arm_reg_name (dest),
update ? "!" : ""); update ? "!" : "");
code = 0xf4000a9d; code = 0xf4000aad;
code |= (dest&0xf) << 16; code |= (dest&0xf) << 16;
code |= (src1&0xf) << 12; code |= (src1&0xf) << 12;
code |= ((src1>>4)&0x1) << 22; code |= ((src1>>4)&0x1) << 22;
......
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