https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113122
--- Comment #2 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Jakub Jelinek <ja...@gcc.gnu.org>: https://gcc.gnu.org/g:d4a2d91b46b2cf758b249a4545e34287e90da23b commit r14-8214-gd4a2d91b46b2cf758b249a4545e34287e90da23b Author: Jakub Jelinek <ja...@redhat.com> Date: Thu Jan 18 10:21:12 2024 +0100 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 <ja...@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.