[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] Get tests/tcg building, fix unused variable war
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [PATCH] Get tests/tcg building, fix unused variable warning due to wrong extended asm operand, fix the 'test' make target. |
Date: |
Mon, 16 Jul 2012 22:11:43 +0100 |
On 16 July 2012 21:00, Catalin Patulea <address@hidden> wrote:
> On Mon, Jul 16, 2012 at 3:08 PM, Peter Maydell <address@hidden> wrote:
>> This doesn't seem to be sufficient for test-i386 to compile
>> for me:
>> ccache gcc -m32 -I/home/pm215/src/qemu/qemu/slirp -I.
>> -I/home/pm215/src/qemu/qemu -I/home/pm215/src/qemu/qemu/fpu -I../..
>> -Wall -O2 -g -fno-strict-aliasing -o test-i386 \
>> ./test-i386.c ./test-i386-code16.S ./test-i386-vm86.S -lm
>> ./test-i386.c: Assembler messages:
>> ./test-i386.c:1831: Error: expecting lockable instruction after `lock'
>
>>
>> Since 'lock nop' isn't valid we probably need to do this with
>> a .byte directive to emit the sequence we require.
> I don't understand why gcc would be generating a lock prefix here..
Have you looked at the code? We're specifically asking for one:
asm volatile("lock nop");
(which we expect to be invalid). We just need to handle that the same
way we do for the case a bit later, by using
asm volatile(".byte 0xsomething, 0xsomething");
to emit the sequence we want rather than asking gas to do something
it thinks is illegal.
Since you have an assembler that doesn't complain about "lock nop"
you should be able to disassemble the binary it creates to find out
what the byte sequence we need is.
>> (this is gcc (Ubuntu/Linaro 4.6.1-9ubuntu3) 4.6.1 on x86.)
> I'm on gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5.1) and it appears
> unreasonably difficult to get 4.6 on my machine.
If you have the disk space then setting up a chroot environment of
a newer ubuntu is probably the easiest thing.
-- PMM
- [Qemu-devel] [PATCH v2] Get tests/tcg building and fix an unused variable warning due to wrong extended asm operands., (continued)
- [Qemu-devel] [PATCH v2] Get tests/tcg building and fix an unused variable warning due to wrong extended asm operands., Catalin Patulea, 2012/07/16
- Re: [Qemu-devel] [PATCH v2] Get tests/tcg building and fix an unused variable warning due to wrong extended asm operands., Peter Maydell, 2012/07/16
- [Qemu-devel] [PATCH] tests/tcg: add test-i386-fprem and make target for comparing QEMU to h/w, Catalin Patulea, 2012/07/16
- Re: [Qemu-devel] [PATCH] tests/tcg: add test-i386-fprem and make target for comparing QEMU to h/w, Catalin Patulea, 2012/07/16
- Re: [Qemu-devel] [PATCH] tests/tcg: add test-i386-fprem and make target for comparing QEMU to h/w, Peter Maydell, 2012/07/17
- Re: [Qemu-devel] [PATCH] tests/tcg: add test-i386-fprem and make target for comparing QEMU to h/w, Catalin Patulea, 2012/07/17
- Re: [Qemu-devel] [PATCH] tests/tcg: add test-i386-fprem and make target for comparing QEMU to h/w, Catalin Patulea, 2012/07/20
- Re: [Qemu-devel] [PATCH] tests/tcg: add test-i386-fprem and make target for comparing QEMU to h/w, Peter Maydell, 2012/07/21
- Re: [Qemu-devel] [PATCH v2] Get tests/tcg building and fix an unused variable warning due to wrong extended asm operands., Catalin Patulea, 2012/07/20
- Re: [Qemu-devel] [PATCH v2] Get tests/tcg building and fix an unused variable warning due to wrong extended asm operands., Peter Maydell, 2012/07/21
- Re: [Qemu-devel] [PATCH] Get tests/tcg building, fix unused variable warning due to wrong extended asm operand, fix the 'test' make target.,
Peter Maydell <=
- Re: [Qemu-devel] [PATCH] Get tests/tcg building, fix unused variable warning due to wrong extended asm operand, fix the 'test' make target., Catalin Patulea, 2012/07/16