#10 Load high 16bit word from 32 bit

closed
None
5
2001-12-21
2001-05-13
Paul Clarke
No

On H8S gcc-2.95.3 -ms -O2

unsigned long X;
unsigned short y;

y = X >> 16; generates unnecessary code.

would prefer same sequence as

y = (*(unsigned short*)&X);

Discussion

  • Kazu Hirata

    Kazu Hirata - 2001-12-21
    • assigned_to: nobody --> kazuhirata
    • status: open --> closed
     
  • Kazu Hirata

    Kazu Hirata - 2001-12-21

    Logged In: YES
    user_id=189502

    Created a patch for this.

     

Log in to post a comment.