[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [qemu-s390x] [PATCH RFC 1/2] tests/tcg: Allow targets to set the opt
From: |
David Hildenbrand |
Subject: |
Re: [qemu-s390x] [PATCH RFC 1/2] tests/tcg: Allow targets to set the optimization level |
Date: |
Wed, 27 Feb 2019 14:44:47 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 |
On 27.02.19 13:42, David Hildenbrand wrote:
> On 27.02.19 12:46, Alex Bennée wrote:
>>
>> David Hildenbrand <address@hidden> writes:
>>
>>> We sometimes want basic optimizations, e.g. for constant propagation
>>> into inlined functions.
>>>
>>> Especially for inline asm with immediates;
>>
>> I agree you need this, but...
>>
>> <snip>
>>> # Start with a blank slate, the build targets get to add stuff first
>>> -CFLAGS=
>>> +CFLAGS=-O0
>>> QEMU_CFLAGS=
>>> LDFLAGS=
>>>
>>> @@ -70,7 +70,7 @@ ifneq ($(TARGET_BASE_ARCH),$(TARGET_NAME))
>>> endif
>>>
>>> # Add the common build options
>>> -CFLAGS+=-Wall -O0 -g -fno-strict-aliasing
>>> +CFLAGS+=-Wall -g -fno-strict-aliasing
>>
>>
>> You don't need to do this - we already have EXTRA_CFLAGS which will
>> always be at the end of the compile invocation:
>>
>> # enable vectors and optimisation to vectorise for this test
>> vglv: CFLAGS+=-march=z13 -m64
>> vglv: EXTRA_CFLAGS+=-O2
>
> For whatever reason I can't get this to work. EXTRA_CFLAGS+=-O2 is
> always silently dropped:
>
> make SHELL='sh -x' run-tcg-tests-s390x-linux-user
>
> + /home/dhildenb/git/qemu/tests/docker/docker.py cc --user 100813 --cc
> s390x-linux-gnu-gcc -i qemu:debian-s390x-cross -s
> /home/dhildenb/git/qemu -- -march=zEC12 -m64 -Wall -O0 -g
> -fno-strict-aliasing -march=z13
> /home/dhildenb/git/qemu/tests/tcg/s390x/vlgv.c -o vlgv -static
> /home/dhildenb/git/qemu/tests/tcg/s390x/vlgv.c: In function 'vlgv':
> /home/dhildenb/git/qemu/tests/tcg/s390x/vlgv.c:8:5: warning: asm operand
> 3 probably doesn't match constraints
> asm volatile("vlgv %[r1], %[v3], 0(%[a2]), %[m4]\n"
> ^~~
> /home/dhildenb/git/qemu/tests/tcg/s390x/vlgv.c:8:5: error: impossible
> constraint in 'asm'
>
vlgv: CFLAGS+=-march=z13 -O2
However works. I am very confused now. I guess this is about evaluation
order or something like that.
--
Thanks,
David / dhildenb
[qemu-s390x] [PATCH RFC 1/2] tests/tcg: Allow targets to set the optimization level, David Hildenbrand, 2019/02/27
Re: [qemu-s390x] [Qemu-devel] [PATCH RFC 1/2] tests/tcg: Allow targets to set the optimization level, Richard Henderson, 2019/02/27