[Beignet] [PATCH] output float immediate value with %f instead of %g
Guo, Yejun
yejun.guo at intel.com
Mon Aug 3 19:49:41 PDT 2015
Yes, it would be better, not sure why the current code generates "F" for the mov instruction, I'll take a look.
-----Original Message-----
From: Song, Ruiling
Sent: Tuesday, August 04, 2015 10:45 AM
To: Guo, Yejun; beignet at lists.freedesktop.org
Subject: RE: [Beignet] [PATCH] output float immediate value with %f instead of %g
> -----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