]> git.ipfire.org Git - thirdparty/gcc.git/commit
i386: Change prefetchi output template
authorHaochen Jiang <haochen.jiang@intel.com>
Mon, 22 Jul 2024 06:06:18 +0000 (14:06 +0800)
committerHaochen Jiang <haochen.jiang@intel.com>
Tue, 23 Jul 2024 05:50:31 +0000 (13:50 +0800)
commit062e46a813799684c6f900815fd22451d6294ae1
treec8c631e23cf43da385ddb605cd667e0b6dec5926
parentad642d2c950657539777ea436b787e7fff4ec09e
i386: Change prefetchi output template

For prefetchi instructions, RIP-relative address is explicitly mentioned
for operand and assembler obeys that rule strictly. This makes
instruction like:

prefetchit0 bar

got illegal for assembler, which should be a broad usage for prefetchi.

Change to %a to explicitly add (%rip) after function label to make it
legal in assembler so that it could pass to linker to get the real address.

gcc/ChangeLog:

* config/i386/i386.md (prefetchi): Change to %a.

gcc/testsuite/ChangeLog:

* gcc.target/i386/prefetchi-1.c: Check (%rip).
gcc/config/i386/i386.md
gcc/testsuite/gcc.target/i386/prefetchi-1.c