Skip to Content.
Sympa Menu

k-user - [[K-user] ] Help: Interpreting a bit string as Float or Double

k-user AT lists.cs.illinois.edu

Subject: K-user mailing list

List archive

[[K-user] ] Help: Interpreting a bit string as Float or Double


Chronological Thread 
  • From: Sandeep Dasgupta <sdasgup3 AT illinois.edu>
  • To: <k-user AT lists.cs.illinois.edu>
  • Cc: <sdasgup3 AT illinois.edu>
  • Subject: [[K-user] ] Help: Interpreting a bit string as Float or Double
  • Date: Thu, 7 Dec 2017 10:22:56 -0600
  • Authentication-results: illinois.edu; spf=pass smtp.mailfrom=sdasgup3 AT illinois.edu

Hello k Team,

I am upto defining x86-64 semantics in K.
I need some help with the following requirement.

For supporting AVX/SSE2 instructions, I should have the support for 128 xmm registers, where the 128 bits can be interpreted as
2 64 bit doubles or
4 32-bit floats or
1 128 bit int or
2 64 bit ints or
4 32 bit ints or
8 16 bit ints or
16 8-bit ints or

My plan is to use mi(128,I) for those registers and whenever I need to interpret it as floats (or double), I  will extract each 32 (or 64) bit chunks and get the corresponding float (or double).

In the domain.k we have FLOAT but it does not seem suitable for for the purpose. Also the int2float gives the float equivalent of an int like Int2Float(5, 53, 11) gives 5.0.

Can you please give me some suggestion or pointers to address this ? 

Thanks
Sandeep
     





Archive powered by MHonArc 2.6.19.

Top of Page