diff options
Diffstat (limited to '3/11_floating_point/00_float_mov.c')
| -rw-r--r-- | 3/11_floating_point/00_float_mov.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/3/11_floating_point/00_float_mov.c b/3/11_floating_point/00_float_mov.c new file mode 100644 index 0000000..dd0379d --- /dev/null +++ b/3/11_floating_point/00_float_mov.c @@ -0,0 +1,11 @@ +// v1 in %xmm0, src in %rdi, dst in %rsi +// float_mov: +// vmovaps %xmm0, %xmm1 Copy v1 +// vmovss (%rdi), %xmm0 Read v2 from src +// vmovss %xmm1, (%rsi) Write v1 to dst +// ret; +float float_mov(float v1, float *src, float *dst) { + float v2 = *src; + *dst = v1; + return v2; +} |
