* handle double-word constants correctly in libcalls
@ 2004-07-06 14:31 Jan Beulich
2004-07-08 6:33 ` Richard Henderson
0 siblings, 1 reply; 2+ messages in thread
From: Jan Beulich @ 2004-07-06 14:31 UTC (permalink / raw)
To: gcc-patches
bootstrapped and tested on x86-64-unknown-linux-gnu.
Jan
2004-07-06 Jan Beulich <jbeulich@novell.com>
* calls.c (emit_library_call_value_1): Use mode of function
parameter
rather than that of argument since constants have none.
testsuite:
2004-07-06 Jan Beulich <jbeulich@novell.com>
* gcc.dg/titype-3.c: New test.
---
/home/jbeulich/src/gcc/mainline/2004-07-05.10.09/gcc/calls.c 2004-07-05
09:18:02.000000000 +0200
+++ 2004-07-05.10.09/gcc/calls.c 2004-07-05 17:21:17.042413808
+0200
@@ -3887,6 +3887,7 @@
are to be pushed. */
for (count = 0; count < nargs; count++, argnum += inc)
{
+ enum machine_mode mode = argvec[argnum].mode;
rtx val = argvec[argnum].value;
rtx reg = argvec[argnum].reg;
int partial = argvec[argnum].partial;
@@ -3894,7 +3895,7 @@
/* Handle calls that pass values in multiple non-contiguous
locations. The PA64 has examples of this for library calls.
*/
if (reg != 0 && GET_CODE (reg) == PARALLEL)
- emit_group_load (reg, val, NULL_TREE, GET_MODE_SIZE (GET_MODE
(val)));
+ emit_group_load (reg, val, NULL_TREE, GET_MODE_SIZE (mode));
else if (reg != 0 && partial == 0)
emit_move_insn (reg, val);
---
/home/jbeulich/src/gcc/mainline/2004-07-05.10.09/gcc/testsuite/gcc.dg/titype-3.c 1970-01-01
01:00:00.000000000 +0100
+++ 2004-07-05.10.09/gcc/testsuite/gcc.dg/titype-3.c 2004-07-05
15:53:16.000000000 +0200
@@ -0,0 +1,19 @@
+/* { dg-do run } */
+/* { dg-options "-O2" } */
+
+/* Not all platforms support TImode integers. */
+#if _INTEGRAL_MAX_BITS >= 128
+typedef int TItype __attribute__ ((mode (TI)));
+
+void test(TItype x) {
+ if (0x12345678901234567890LL / x != 1)
+ abort();
+}
+#else
+# define test(x)
+#endif
+
+int main() {
+ test(0x12345678901234567890LL);
+ return 0;
+}
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: handle double-word constants correctly in libcalls
2004-07-06 14:31 handle double-word constants correctly in libcalls Jan Beulich
@ 2004-07-08 6:33 ` Richard Henderson
0 siblings, 0 replies; 2+ messages in thread
From: Richard Henderson @ 2004-07-08 6:33 UTC (permalink / raw)
To: Jan Beulich; +Cc: gcc-patches
On Tue, Jul 06, 2004 at 04:30:40PM +0200, Jan Beulich wrote:
> * calls.c (emit_library_call_value_1): Use mode of function parameter
> rather than that of argument since constants have none.
Applied.
> +/* Not all platforms support TImode integers. */
> +#if _INTEGRAL_MAX_BITS >= 128
Not applied, since this patch isn't likely to be accepted as-is.
You could change things around as with the other titype tests.
r~
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-07-08 6:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-07-06 14:31 handle double-word constants correctly in libcalls Jan Beulich
2004-07-08 6:33 ` Richard Henderson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).