[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 29/43] linux-user: Fix broken m68k signal handli
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [PATCH 29/43] linux-user: Fix broken m68k signal handling on 64 bit hosts |
Date: |
Wed, 25 Feb 2015 21:14:43 +0900 |
On 25 February 2015 at 20:58, Laurent Vivier <address@hidden> wrote:
>
>> Le 25 février 2015 à 12:28, Peter Maydell <address@hidden> a
>> écrit :
>>
>>
>> On 25 February 2015 at 17:39, Laurent Vivier <address@hidden> wrote:
>> > Hi,
>> >
>> > I think you should use abi_long instead of uint32_t.
>> >
>> > abi_long has an "aligned" attribute, and on m68k long are aligned on a
>> > short
>> > boundary.
>> >
>> >
>> > #ifdef TARGET_M68K
>> > #define ABI_INT_ALIGNMENT 2
>> > #define ABI_LONG_ALIGNMENT 2
>> > #define ABI_LLONG_ALIGNMENT 2
>> > #endif
>> >
>> > typedef uint32_t abi_ulong __attribute__((aligned(ABI_LONG_ALIGNMENT)));
>>
>> In this instance it doesn't matter because get_sigframe() aligns
>> the pointer we're going to write the sigframe to, and the elements
>> in the struct before retcode[] won't make it worse than 4-aligned,
>> I think?
>
> Yes, I agree. But the aim of the abi_* types is to define the target ABI.
> Thus, for consistency it should better to use the abi_long (or abi_ulong)
> instead of uint32_t.
Well, strictly speaking this is writing instructions into a
byte array rather than ABI longs, so it ought to do it
byte-at-a-time to respect the definition of the struct.
Anyway, if you want to submit a patch I don't object.
-- PMM
- [Qemu-devel] [PATCH 21/43] target-xtensa: test cross-page opcode, (continued)
- [Qemu-devel] [PATCH 21/43] target-xtensa: test cross-page opcode, Michael Roth, 2015/02/24
- [Qemu-devel] [PATCH 26/43] serial: reset thri_pending on IER writes with THRI=0, Michael Roth, 2015/02/24
- [Qemu-devel] [PATCH 23/43] atomic: fix position of volatile qualifier, Michael Roth, 2015/02/24
- [Qemu-devel] [PATCH 22/43] migration/block: fix pending() return value, Michael Roth, 2015/02/24
- [Qemu-devel] [PATCH 15/43] qcow2: Fix header extension size check, Michael Roth, 2015/02/24
- [Qemu-devel] [PATCH 20/43] target-xtensa: fix translation for opcodes crossing page boundary, Michael Roth, 2015/02/24
- [Qemu-devel] [PATCH 29/43] linux-user: Fix broken m68k signal handling on 64 bit hosts, Michael Roth, 2015/02/24
[Qemu-devel] [PATCH 27/43] serial: refine serial_thr_ipending_needed, Michael Roth, 2015/02/24
[Qemu-devel] [PATCH 28/43] pckbd: set bits 2-3-6-7 of the output port by default, Michael Roth, 2015/02/24
[Qemu-devel] [PATCH 33/43] virtio: fix feature bit checks, Michael Roth, 2015/02/24
[Qemu-devel] [PATCH 32/43] vt82c686: avoid out-of-bounds read, Michael Roth, 2015/02/24
[Qemu-devel] [PATCH 31/43] target-i386: fix movntsd on big-endian hosts, Michael Roth, 2015/02/24
[Qemu-devel] [PATCH 30/43] scsi: fix cancellation when I/O was completed but DMA was not., Michael Roth, 2015/02/24
[Qemu-devel] [PATCH 02/43] block: Omit bdrv_find_format for essential drivers, Michael Roth, 2015/02/24
[Qemu-devel] [PATCH 36/43] target-arm/translate-a64: Fix wrong mmu_idx usage for LDT/STT, Michael Roth, 2015/02/24
[Qemu-devel] [PATCH 34/43] sb16: fix interrupt acknowledgement, Michael Roth, 2015/02/24
[Qemu-devel] [PATCH 35/43] hw/input/hid.c Fix capslock hid code, Michael Roth, 2015/02/24