This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug other/61979] Why float variable loading twice into the FPU Stack during condition checking ?


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61979

--- Comment #6 from Srikanth <nasika.srikanth1 at gmail dot com> ---
int main()
{
float m=12
m?printf("true"):printf("false");
m=0;
m?printf("true"):printf("false");
}


and above is the  assemble code generated from the source file .. when i seeing
the assemble code i just recognize that float variable was loading twice during
the conditional checking that's what my doubt ? please tell me why after
comparison of parity flag for NAN or not,directly we can check for zero flag
for zero or not.But the generated assemble code in #comment 3 ,after comparison
of parity flag it again loading the same variable into the FPU stack and again
comparing with zero and checking for zero flag and goes to true or false
statment why?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]