diff options
author | Jakub Jelinek <jakub@redhat.com> | 2024-01-18 10:21:12 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2024-01-18 10:21:12 +0100 |
commit | d4a2d91b46b2cf758b249a4545e34287e90da23b (patch) | |
tree | a2f6609a3a7dab55abeed7cebae2bcd76afdf567 /gcc/tree-vect-loop.cc | |
parent | b4cb9c9606b421a1d95e9bdff7ec3e409a3e9a3b (diff) | |
download | gcc-d4a2d91b46b2cf758b249a4545e34287e90da23b.zip gcc-d4a2d91b46b2cf758b249a4545e34287e90da23b.tar.gz gcc-d4a2d91b46b2cf758b249a4545e34287e90da23b.tar.bz2 |
i386: Add -masm=intel profiling support [PR113122]
x86_function_profiler emits assembly directly into file and only emits
AT&T syntax. The following patch adjusts it to emit MASM syntax
if -masm=intel.
As it doesn't use asm_fprintf, I can't use {|} syntax for the dialects.
I've tested using
for i in -mcmodel=large "-mcmodel=large -fpic" "" -fpic "-m32 -fpic" "-m32"; do
./xgcc -B ./ -c -O2 -fprofile $i -masm=att pr113122.c -o pr113122.o1;
./xgcc -B ./ -c -O2 -fprofile $i -masm=intel pr113122.c -o pr113122.o2;
objdump -dr pr113122.o1 > /tmp/1; objdump -dr pr113122.o2 > /tmp/2;
diff -up /tmp/1 /tmp/2; done
that the emitted sequences are identical after assembly.
2024-01-18 Jakub Jelinek <jakub@redhat.com>
PR target/113122
* config/i386/i386.cc (x86_function_profiler): Add -masm=intel
support. Add missing space after , in emitted assembly in some
cases. Formatting fixes.
* gcc.target/i386/pr113122-1.c: New test.
* gcc.target/i386/pr113122-2.c: New test.
* gcc.target/i386/pr113122-3.c: New test.
* gcc.target/i386/pr113122-4.c: New test.
Diffstat (limited to 'gcc/tree-vect-loop.cc')
0 files changed, 0 insertions, 0 deletions