]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
gcc.target/i386/pr115749.c: Use word_mode integer
authorH.J. Lu <hjl.tools@gmail.com>
Fri, 11 Oct 2024 21:22:52 +0000 (05:22 +0800)
committerH.J. Lu <hjl.tools@gmail.com>
Sat, 12 Oct 2024 08:58:45 +0000 (16:58 +0800)
Use word_mode integer with func so that 64-bit integer is used with
x32.

* gcc.target/i386/pr115749.c (uword): New.
(func): Replace unsigned long with uword.

Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
gcc/testsuite/gcc.target/i386/pr115749.c

index 82505d603efb2354920940086e8e9db085d94899..e7946d77861f29bbc7472d78ed4ff4a429ab7e32 100644 (file)
@@ -4,7 +4,9 @@
 /* { dg-final { scan-assembler-times "imul" 2 } } */
 /* { dg-final { scan-assembler-not "sal" } } */
 
-unsigned long func(unsigned long x)
+typedef unsigned int uword __attribute__ ((mode (word)));
+
+uword func(uword x)
 {
     return x % 240;
 }