As I wrote in my last mail, I compared all structs without and with -mms-bitfields
using pahole and codiff. The result is in the appended codiff.log.

About 17 structs changed because of -mms-bitfield. This attribute modifies not only structs with bitfield but also packed structs or structs with other attributes
like TCGPool.

Jan's patch fixed slirp bitfields. For the remaining cases, I also thought about
removing -mms-bitfield or setting a pragma in qemu-common.h, but now I
prefer a different solution: replace all __attribute__(packed), __attribute(__packed__)
by QEMU_PACKED.

QEMU_PACKED will be a macro defined in compiler.h which sets the attributes
needed (also for w32 with -mms-bitfields).

Maybe I can send patches with the changes needed next weekend if everybody agrees
to this solution.

Cheers,
Stefan

/home/stefan/src/qemu/savannah/qemu/hw/virtio-balloon.c:
  struct VirtIOBalloonStat     |   +6
 1 struct changed
  virtio_balloon_receive_stats |   -1
 1 function changed, 1 bytes removed

/home/stefan/src/qemu/savannah/qemu/block/vmdk.c:
  vmdk_open_vmdk4    |   +9
  vmdk_create_extent |   +6
 2 functions changed, 15 bytes added

/home/stefan/src/qemu/savannah/qemu/block/vvfat.c:
  struct bootsector_t |   +5
 1 struct changed

/home/stefan/src/qemu/savannah/qemu/hw/bt-hci.c:
  bt_hci_connection_accept              |   -2
  bt_hci_lmp_connection_complete        |   -2
  bt_hci_event_read_remote_ext_features |   +2
  bt_hci_event_complete_lmp_handle      |   +7
 4 functions changed, 9 bytes added, 4 bytes removed, diff: +5

/home/stefan/src/qemu/savannah/qemu/slirp/cksum.c:
  struct Slirp    |  +64
  struct arphdr   |   +4
  struct ArpTable |  +64
 3 structs changed

/home/stefan/src/qemu/savannah/qemu/slirp/if.c:
  struct Slirp    |  +64
  struct arphdr   |   +4
  struct ArpTable |  +64
 3 structs changed

/home/stefan/src/qemu/savannah/qemu/slirp/ip_icmp.c:
  struct Slirp    |  +64
  struct arphdr   |   +4
  struct ArpTable |  +64
 3 structs changed

/home/stefan/src/qemu/savannah/qemu/slirp/ip_input.c:
  struct Slirp    |  +64
  struct arphdr   |   +4
  struct ArpTable |  +64
 3 structs changed

/home/stefan/src/qemu/savannah/qemu/slirp/ip_output.c:
  struct Slirp    |  +64
  struct arphdr   |   +4
  struct ArpTable |  +64
 3 structs changed

/home/stefan/src/qemu/savannah/qemu/slirp/slirp.c:
  struct Slirp    |  +64
  struct arphdr   |   +4
  struct ArpTable |  +64
 3 structs changed

/home/stefan/src/qemu/savannah/qemu/slirp/mbuf.c:
  struct Slirp    |  +64
  struct arphdr   |   +4
  struct ArpTable |  +64
 3 structs changed

/home/stefan/src/qemu/savannah/qemu/slirp/misc.c:
  struct Slirp    |  +64
  struct arphdr   |   +4
  struct ArpTable |  +64
 3 structs changed

/home/stefan/src/qemu/savannah/qemu/slirp/sbuf.c:
  struct Slirp    |  +64
  struct arphdr   |   +4
  struct ArpTable |  +64
 3 structs changed

/home/stefan/src/qemu/savannah/qemu/slirp/socket.c:
  struct Slirp    |  +64
  struct arphdr   |   +4
  struct ArpTable |  +64
 3 structs changed

/home/stefan/src/qemu/savannah/qemu/slirp/tcp_input.c:
  struct Slirp    |  +64
  struct arphdr   |   +4
  struct ArpTable |  +64
 3 structs changed

/home/stefan/src/qemu/savannah/qemu/slirp/tcp_output.c:
  struct Slirp    |  +64
  struct arphdr   |   +4
  struct ArpTable |  +64
 3 structs changed

/home/stefan/src/qemu/savannah/qemu/slirp/tcp_subr.c:
  struct Slirp    |  +64
  struct arphdr   |   +4
  struct ArpTable |  +64
 3 structs changed

/home/stefan/src/qemu/savannah/qemu/slirp/tcp_timer.c:
  struct Slirp    |  +64
  struct arphdr   |   +4
  struct ArpTable |  +64
 3 structs changed

/home/stefan/src/qemu/savannah/qemu/slirp/udp.c:
  struct Slirp    |  +64
  struct arphdr   |   +4
  struct ArpTable |  +64
 3 structs changed

/home/stefan/src/qemu/savannah/qemu/slirp/bootp.c:
  struct Slirp    |  +64
  struct arphdr   |   +4
  struct ArpTable |  +64
 3 structs changed

/home/stefan/src/qemu/savannah/qemu/slirp/tftp.c:
  struct Slirp    |  +64
  struct arphdr   |   +4
  struct ArpTable |  +64
 3 structs changed

/home/stefan/src/qemu/savannah/qemu/slirp/arp_table.c:
  struct Slirp     |  +64
  struct arphdr    |   +4
  struct ArpTable  |  +64
 3 structs changed
  arp_table_add    |  -49
  arp_table_search |  -24
 2 functions changed, 73 bytes removed

/home/stefan/src/qemu/savannah/qemu/exec.c:
  struct TCGPool |   +0
 1 struct changed

/home/stefan/src/qemu/savannah/qemu/translate-all.c:
  struct TCGPool |   +0
 1 struct changed

/home/stefan/src/qemu/savannah/qemu/cpu-exec.c:
  struct TCGPool |   +0
 1 struct changed

/home/stefan/src/qemu/savannah/qemu/target-i386/translate.c:
  struct TCGPool |   +0
 1 struct changed

/home/stefan/src/qemu/savannah/qemu/tcg/tcg.c:
  struct TCGPool |   +0
 1 struct changed

/home/stefan/src/qemu/savannah/qemu/tcg/optimize.c:
  struct TCGPool |   +0
 1 struct changed

/home/stefan/src/qemu/savannah/qemu/target-i386/op_helper.c:
  helper_vmexit |   +2
 1 function changed, 2 bytes added

/home/stefan/src/qemu/savannah/qemu/hw/acpi.c:
  struct acpi_table_header |   +2
 1 struct changed

/home/stefan/src/qemu/savannah/qemu/hw/hpet.c:
  struct hpet_fw_entry  |   +4
  struct hpet_fw_config |  +32
 2 structs changed
  hpet_post_load        |   +4
  hpet_reset            |   +8
 2 functions changed, 12 bytes added

/home/stefan/src/qemu/savannah/qemu/hw/usb-ccid.c:
  struct CCID_Header        |   +3
  struct CCID_BULK_IN       |   +3
  struct CCID_SlotStatus    |   +3
  struct CCID_Parameter     |   +3
  struct CCID_DataBlock     |   +3
  struct CCID_XferBlock     |   +4
  struct CCID_IccPowerOn    |   +4
  struct CCID_SetParameters |   +4
 8 structs changed

/home/stefan/src/qemu/savannah/qemu/hw/pc.c:
  struct hpet_fw_entry  |   +4
  struct hpet_fw_config |  +32
 2 structs changed

/tmp/qemu.exe:
 12 functions changed, 38 bytes added, 78 bytes removed, diff: -40

Reply via email to