https://bugs.kde.org/show_bug.cgi?id=370028

--- Comment #38 from Tamara Vlahovic <tamara.vlaho...@imgtec.com> ---
Created attachment 105474
  --> https://bugs.kde.org/attachment.cgi?id=105474&action=edit
Patch for warnings related to x87

This patch fixes "cast-align" warnings related to getting and putting x87 guest
state and its registers.

In files:
  VEX/priv/guest_x86_helpers.c
  VEX/priv/guest_amd64_helpers.c
functions do_put_x87 and do_get_x87 have parameter UChar* x87_state which is
later casted to 
Fpu_State*. After investigation of the uses of these functions it is determined
that most of the calls to the function have a cast to UChar* of argument that
is passed as parameter x87_state. Lot of times it is done for argument of
Fpu_State* type.
Changing the parameter UChar* x87_state with Fpu_State* x87, reduces need for
casting and removes "cast-align" warnings.

Some "cast-align" warnings in files VEX/priv/guest_x86_helpers.c and
VEX/priv/guest_amd64_helpers.c are cause by upcasting pointer to the part of
reg field of Fpu_State* structure from UChar* to UShort*. Field reg represent
FPU registers, each with a size of 10 bytes. Because of that type of reg field
may be changed from UChar* to UShort* without losing correctness. This removes
need for upcasting and with that "cast-align" warnings.

For removing all "cast-align" warnings in these two files it is needed to
remove warnings caused by casting  in V128 type. This was not done in this
patch.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to