diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2024-11-10 11:27:14 +0800 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2025-04-27 10:36:56 +0800 |
commit | cdb239bd213524a43b38ad8fca8e7ed0b5fb41eb (patch) | |
tree | bb52f74ea45ca8893ae3b6341c8a3772014bebff | |
parent | a670ebde3995481225ec62b29686ec07a21e5c10 (diff) | |
download | gcc-cdb239bd213524a43b38ad8fca8e7ed0b5fb41eb.zip gcc-cdb239bd213524a43b38ad8fca8e7ed0b5fb41eb.tar.gz gcc-cdb239bd213524a43b38ad8fca8e7ed0b5fb41eb.tar.bz2 |
i386: Adjust apx-ndd.c for frontend promotion removal
Since the C frontend no longer promotes integer argument smaller than int,
the apx-ndd.c codgen is slightly different:
apx-ndd.s (original) 2024-11-10 06:07:09.894876973 +0800
apx-ndd.s (updated) 2024-11-10 06:06:59.371860565 +0800
@@ -17,7 +17,7 @@ foo_add_char:
foo1_add_char:
.LFB1:
.cfi_startproc
- leal (%rsi,%rdi), %eax
+ leal (%rdi,%rsi), %eax
ret
.cfi_endproc
.LFE1:
@@ -50,7 +50,7 @@ foo_add_short:
foo1_add_short:
.LFB4:
.cfi_startproc
- leal (%rsi,%rdi), %eax
+ leal (%rdi,%rsi), %eax
ret
.cfi_endproc
.LFE4:
@@ -413,7 +413,7 @@ foo_and_char:
foo1_and_char:
.LFB37:
.cfi_startproc
- andl %edi, %esi, %eax
+ andl %esi, %edi, %eax
ret
.cfi_endproc
.LFE37:
@@ -435,7 +435,7 @@ foo_and_short:
foo1_and_short:
.LFB39:
.cfi_startproc
- andl %edi, %esi, %eax
+ andl %esi, %edi, %eax
ret
.cfi_endproc
.LFE39:
@@ -501,7 +501,7 @@ foo_or_char:
foo1_or_char:
.LFB45:
.cfi_startproc
- orl %edi, %esi, %eax
+ orl %esi, %edi, %eax
ret
.cfi_endproc
.LFE45:
@@ -523,7 +523,7 @@ foo_or_short:
foo1_or_short:
.LFB47:
.cfi_startproc
- orl %edi, %esi, %eax
+ orl %esi, %edi, %eax
ret
.cfi_endproc
.LFE47:
@@ -589,7 +589,7 @@ foo_xor_char:
foo1_xor_char:
.LFB53:
.cfi_startproc
- xorl %edi, %esi, %eax
+ xorl %esi, %edi, %eax
ret
.cfi_endproc
.LFE53:
@@ -611,7 +611,7 @@ foo_xor_short:
foo1_xor_short:
.LFB55:
.cfi_startproc
- xorl %edi, %esi, %eax
+ xorl %esi, %edi, %eax
ret
.cfi_endproc
.LFE55:
@@ -1018,7 +1018,7 @@ foo4_rol_uint64_t:
foo1_imul_short:
.LFB92:
.cfi_startproc
- imull %edi, %esi, %eax
+ imull %esi, %edi, %eax
ret
.cfi_endproc
.LFE92:
Adjust the assembler scans.
PR middle-end/112877
* gcc.target/i386/apx-ndd.c: Adjusted.
Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
-rw-r--r-- | gcc/testsuite/gcc.target/i386/apx-ndd.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/gcc/testsuite/gcc.target/i386/apx-ndd.c b/gcc/testsuite/gcc.target/i386/apx-ndd.c index ce77630..2b2f4fc 100644 --- a/gcc/testsuite/gcc.target/i386/apx-ndd.c +++ b/gcc/testsuite/gcc.target/i386/apx-ndd.c @@ -188,16 +188,13 @@ FOO2 (int64_t, imul, *) /* { dg-final { scan-assembler-times "not(?:l|w|q)\[^\n\r]%(?:|r|e)di, %(?:|r|e)ax" 4 } } */ /* { dg-final { scan-assembler-times "andb\[^\n\r]*1, \\(%(?:r|e)di\\), %al" 1 } } */ /* { dg-final { scan-assembler-times "and(?:l|w|q)\[^\n\r]*1, \\(%(?:r|e)di\\), %(?:|r|e)ax" 3 } } */ -/* { dg-final { scan-assembler-times "and(?:l|w|q)\[^\n\r]%(?:|r|e)di, %(?:|r|e)si, %(?:|r|e)ax" 2 } } */ -/* { dg-final { scan-assembler-times "and(?:l|w|q)\[^\n\r]%(?:|r|e)si, %(?:|r|e)di, %(?:|r|e)ax" 2 } } */ +/* { dg-final { scan-assembler-times "and(?:l|w|q)\[^\n\r]%(?:|r|e)si, %(?:|r|e)di, %(?:|r|e)ax" 4 } } */ /* { dg-final { scan-assembler-times "orb\[^\n\r]*1, \\(%(?:r|e)di\\), %al" 2} } */ /* { dg-final { scan-assembler-times "or(?:l|w|q)\[^\n\r]*1, \\(%(?:r|e)di\\), %(?:|r|e)ax" 6 } } */ -/* { dg-final { scan-assembler-times "or(?:l|w|q)\[^\n\r]%(?:|r|e)di, %(?:|r|e)si, %(?:|r|e)ax" 4 } } */ -/* { dg-final { scan-assembler-times "or(?:l|w|q)\[^\n\r]%(?:|r|e)si, %(?:|r|e)di, %(?:|r|e)ax" 4 } } */ +/* { dg-final { scan-assembler-times "or(?:l|w|q)\[^\n\r]%(?:|r|e)si, %(?:|r|e)di, %(?:|r|e)ax" 8 } } */ /* { dg-final { scan-assembler-times "xorb\[^\n\r]*1, \\(%(?:r|e)di\\), %al" 1 } } */ /* { dg-final { scan-assembler-times "xor(?:l|w|q)\[^\n\r]*1, \\(%(?:r|e)di\\), %(?:|r|e)ax" 3 } } */ -/* { dg-final { scan-assembler-times "xor(?:l|w|q)\[^\n\r]%(?:|r|e)di, %(?:|r|e)si, %(?:|r|e)ax" 2 } } */ -/* { dg-final { scan-assembler-times "xor(?:l|w|q)\[^\n\r]%(?:|r|e)si, %(?:|r|e)di, %(?:|r|e)ax" 2 } } */ +/* { dg-final { scan-assembler-times "xor(?:l|w|q)\[^\n\r]%(?:|r|e)si, %(?:|r|e)di, %(?:|r|e)ax" 4 } } */ /* { dg-final { scan-assembler-times "sal(?:b|l|w|q)\[^\n\r]*1, \\(%(?:r|e)di\\), %(?:|r|e)a(?:x|l)" 4 } } */ /* { dg-final { scan-assembler-times "sal(?:l|w|q)\[^\n\r]*7, %(?:|r|e)di, %(?:|r|e)ax" 4 } } */ /* { dg-final { scan-assembler-times "sar(?:b|l|w|q)\[^\n\r]*1, \\(%(?:r|e)di\\), %(?:|r|e)a(?:x|l)" 4 } } */ |