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] | |
------- Comment #8 from pluto at agmk dot net 2007-02-14 22:24 -------
still bad :/
float convert( unsigned in )
{
float f;
__builtin_memcpy( &f, &in, sizeof( in ) );
return f;
}
unsigned short load( void* p )
{
unsigned short v;
__builtin_memcpy( &v, p, sizeof( v ) );
return v;
}
convert:
movl %edi, -4(%rsp)
movss -4(%rsp), %xmm1
movaps %xmm1, %xmm0
ret
load:
movzwl (%rdi), %eax
movw %ax, -2(%rsp)
movzwl %ax, %eax
ret
gcc-42 (20070207)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27567
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |