diff options
author | Anthony Blake <anthonix@me.com> | 2012-08-30 18:28:10 +1200 |
---|---|---|
committer | Anthony Blake <anthonix@me.com> | 2012-08-30 18:28:10 +1200 |
commit | 73a05e6b7ebe7d25e7e8b861ed29df2161b34c82 (patch) | |
tree | a96fd9e724f4a1493d55db919a88328e419a163e /src/codegen.c | |
parent | 1be4449adcac82b2138c7cde7d549f1404cd772e (diff) | |
download | ffts-73a05e6b7ebe7d25e7e8b861ed29df2161b34c82.zip ffts-73a05e6b7ebe7d25e7e8b861ed29df2161b34c82.tar.gz |
SSE working
Diffstat (limited to 'src/codegen.c')
-rw-r--r-- | src/codegen.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/src/codegen.c b/src/codegen.c index 274bf50..b595cb5 100644 --- a/src/codegen.c +++ b/src/codegen.c @@ -88,6 +88,8 @@ void ffts_generate_func_code(ffts_plan_t *p, size_t N, size_t leafN) { size_t *ps = malloc(count * 2 * sizeof(size_t)); size_t *pps = ps; + p->constants = sse_constants; + elaborate_tree(&pps, N, leafN, 0); pps[0] = 0; pps[1] = 0; @@ -193,7 +195,19 @@ void ffts_generate_func_code(ffts_plan_t *p, size_t N, size_t leafN) { int i; memcpy(fp, leaf_ee_init, leaf_ee - leaf_ee_init); - IMM32_NI(fp + 3, READ_IMM32(fp + 3) + ((void *)leaf_ee_init - (void *)fp )); + + fprintf(stderr, "Leaf start address = %016p\n", fp); + fprintf(stderr, "Leaf ee init address = %016p\n", leaf_ee_init); + fprintf(stderr, "Constants address = %016p\n", sse_constants); + fprintf(stderr, "Constants address = %016p\n", p->constants); + +//int32_t val = READ_IMM32(fp + 3); +//fprintf(stderr, "diff = 0x%x\n", ((uint32_t)&p->constants) - ((uint32_t)p)); + +//int64_t v2 = val + (int64_t)((void *)leaf_ee_init - (void *)fp ); +//fprintf(stderr, "IMM = 0x%llx\n", v2); + +//IMM32_NI(fp + 3, ((int64_t) READ_IMM32(fp + 3)) + ((void *)leaf_ee_init - (void *)fp )); fp += (leaf_ee - leaf_ee_init); memcpy(fp, leaf_ee, leaf_oo - leaf_ee); @@ -252,7 +266,7 @@ void ffts_generate_func_code(ffts_plan_t *p, size_t N, size_t leafN) { fprintf(stderr, "Body start address = %016p\n", fp); //LEA(&fp, R8, RDI, ((uint32_t)&p->ws) - ((uint32_t)p)); memcpy(fp, x_init, x4 - x_init); - IMM32_NI(fp + 3, READ_IMM32(fp + 3) + ((void *)x_init - (void *)fp )); +//IMM32_NI(fp + 3, ((int64_t)READ_IMM32(fp + 3)) + ((void *)x_init - (void *)fp )); fp += (x4 - x_init); int32_t pAddr = 0; |