[Beignet] [PATCH] output float immediate value with %f instead of %g

Song, Ruiling ruiling.song at intel.com
Mon Aug 3 19:45:20 PDT 2015



> -----Original Message-----
> From: Guo, Yejun
> Sent: Sunday, August 2, 2015 10:42 AM
> To: Song, Ruiling; beignet at lists.freedesktop.org
> Subject: RE: [Beignet] [PATCH] output float immediate value with %f instead
> of %g
> 
> For the kernel
> 
> uint aaa = 0xfffefffe;
> ...
> 
> It is finally compiled into:
> 
> (      12)  mov(1)          g127.7<1>:F     6.90887e-310F                   { align1 WE_all};

I would rather change this instruction to UD data type in our backend:
(      12)  mov(1)          g127.7<1>:UD     0xfffeffe                   { align1 WE_all};
This would make things a little clearer. I am not sure anybody has different opinion?

Thanks!
Ruiling
> 
> 
> I debugged into the function and found that, %g outputs 8 bytes (4 bytes for aaa
> and 4 bytes following aaa with random value). And, to get the exact value of aaa
> (with real format uint), the hex format is a necessary.



More information about the Beignet mailing list