diff options
Diffstat (limited to '3/11_floating_point/51_cvt.c')
| -rw-r--r-- | 3/11_floating_point/51_cvt.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/3/11_floating_point/51_cvt.c b/3/11_floating_point/51_cvt.c new file mode 100644 index 0000000..053a657 --- /dev/null +++ b/3/11_floating_point/51_cvt.c @@ -0,0 +1,18 @@ +typedef int dest_t +typedef int src_t + +dest_t cvt(src_t x) +{ + dest_t y = (dest_t) x; + return y; +} + +// T_x T_y Instruction(s) +// +// long double vcvtsi2sdq %rdi, %xmm0 +// double int vcvttsd2si %xmm0, %rdi +// double float vmovddup %xmm0, %xmm0 +// vcvtpd2psx %xmm0, %xmm0 +// long float vcvtsi2ssq %rdi, %xmm0 +// float long vcvttss2siq %xmm0, %rdi +// |
