public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/34814] New: SDmode function args not passed according to ABI specification
@ 2008-01-16 16:34 bergner at gcc dot gnu dot org
2008-01-16 18:39 ` [Bug target/34814] " bergner at gcc dot gnu dot org
` (7 more replies)
0 siblings, 8 replies; 9+ messages in thread
From: bergner at gcc dot gnu dot org @ 2008-01-16 16:34 UTC (permalink / raw)
To: gcc-bugs
Currently, SDmode (_Decimal32) types are not passed to and returned from
functions in FP registers as mandated by the ABI. Instead, they are passed via
the integer registers. This bugzilla will be used for tracking my work on
fixing this.
--
Summary: SDmode function args not passed according to ABI
specification
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
AssignedTo: bergner at gcc dot gnu dot org
ReportedBy: bergner at gcc dot gnu dot org
GCC build triplet: powerpc64-linux
GCC host triplet: powerpc64-linux
GCC target triplet: powerpc64-linux
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34814
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/34814] SDmode function args not passed according to ABI specification
2008-01-16 16:34 [Bug target/34814] New: SDmode function args not passed according to ABI specification bergner at gcc dot gnu dot org
@ 2008-01-16 18:39 ` bergner at gcc dot gnu dot org
2008-01-16 21:51 ` rguenth at gcc dot gnu dot org
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: bergner at gcc dot gnu dot org @ 2008-01-16 18:39 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from bergner at gcc dot gnu dot org 2008-01-16 17:51 -------
I'll be posting a proposed patch today or tomorrow. The patch will allow us to
be binary compatible with XLC which is producing binaries that follow the ABI.
There have been some reload issues which have made this all difficult to
implement, but I think I've done a fair job trying to keep the changes
localized to the rs6000 port.
--
bergner at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |blocker
Keywords| |ABI
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34814
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/34814] SDmode function args not passed according to ABI specification
2008-01-16 16:34 [Bug target/34814] New: SDmode function args not passed according to ABI specification bergner at gcc dot gnu dot org
2008-01-16 18:39 ` [Bug target/34814] " bergner at gcc dot gnu dot org
@ 2008-01-16 21:51 ` rguenth at gcc dot gnu dot org
2008-01-17 22:38 ` janis at gcc dot gnu dot org
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-01-16 21:51 UTC (permalink / raw)
To: gcc-bugs
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |rguenth at gcc dot gnu dot
| |org
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2008-01-16 21:45:28
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34814
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/34814] SDmode function args not passed according to ABI specification
2008-01-16 16:34 [Bug target/34814] New: SDmode function args not passed according to ABI specification bergner at gcc dot gnu dot org
2008-01-16 18:39 ` [Bug target/34814] " bergner at gcc dot gnu dot org
2008-01-16 21:51 ` rguenth at gcc dot gnu dot org
@ 2008-01-17 22:38 ` janis at gcc dot gnu dot org
2008-01-23 7:04 ` bergner at gcc dot gnu dot org
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: janis at gcc dot gnu dot org @ 2008-01-17 22:38 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from janis at gcc dot gnu dot org 2008-01-17 22:30 -------
Subject: Bug 34814
Author: janis
Date: Thu Jan 17 22:29:46 2008
New Revision: 131611
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=131611
Log:
PR target/34814
* gcc.target/powerpc/ppc32-abi-dfp-1.c: Enable checks that will fail
until 34814 is fixed.
Modified:
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gcc.target/powerpc/ppc32-abi-dfp-1.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34814
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/34814] SDmode function args not passed according to ABI specification
2008-01-16 16:34 [Bug target/34814] New: SDmode function args not passed according to ABI specification bergner at gcc dot gnu dot org
` (2 preceding siblings ...)
2008-01-17 22:38 ` janis at gcc dot gnu dot org
@ 2008-01-23 7:04 ` bergner at gcc dot gnu dot org
2008-01-25 17:44 ` bergner at gcc dot gnu dot org
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: bergner at gcc dot gnu dot org @ 2008-01-23 7:04 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from bergner at gcc dot gnu dot org 2008-01-23 06:31 -------
Created an attachment (id=15003)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15003&action=view)
Patch to force SDmode args and return values into FP registers.
Here is the ChangeLog for the patch I submitted to gcc-patches.
* targhooks.c (default_scan_vars): New function.
(default_instantiate_decls): Likewise.
* targhooks.h (default_scan_vars): Add prototype;
(default_instantiate_decls): Likewise.
* target.h (scan_vars): New target hook.
(instantiate_decls): Likewise.
* function.c (instantiate_decl): Make non-static. Rename to...
(instantiate_decl_rtl): ... this.
(instantiate_expr): Use instantiate_decl_rtl.
(instantiate_decls_1): Likewise.
(instantiate_decls): Likewise.
(instantiate_virtual_regs: Call new instantiate_decls taget hook.
* function.h (instantiate_decl_rtl): Add prototype.
* cfgexpand.c (target.h): New include.
(tree_expand_cfg): Call new scan_vars target hook.
* target-def.h (TARGET_SCAN_VARS): New define.
(TARGET_INSTANTIATE_DECLS): Likewise.
(TARGET_INITIALIZER): New target hooks added.
* config/rs6000/rs6000-protos.h (rs6000_secondary_memory_needed_rtx):
New prototype.
* config/rs6000/rs6000.c (tree-flow.h): New include.
(machine_function): Add sdmode_stack_slot field.
(rs6000_alloc_sdmode_stack_slot): New function.
(rs6000_instantiate_decls): Likewise.
(rs6000_secondary_memory_needed_rtx): Likewise.
(rs6000_check_sdmode): Likewise.
(TARGET_SCAN_VARS): Target macro defined.
(TARGET_INSTANTIATE_DECLS): Likewise.
(rs6000_hard_regno_mode_ok): Allow SDmode.
(num_insns_constant): Likewise. Handle _Decimal32 constants.
(rs6000_emit_move): Handle SDmode.
(function_arg_advance): Likewise.
(function_arg): Likewise.
(rs6000_gimplify_va_arg): Likewise. Add special handling of
SDmode var args for 32-bit compiles.
(rs6000_secondary_reload_class): Handle SDmode.
(rs6000_output_function_epilogue): Likewise.
(rs6000_function_value): Simplify if statement.
(rs6000_libcall_value): Likewise.
* config/rs6000/rs6000.h (SLOW_UNALIGNED_ACCESS): Handle SDmode.
(SECONDARY_MEMORY_NEEDED_RTX): Add define.
* config/rs6000/dfp.md (movsd): New define_expand and splitter.
(movsd_hardfloat): New define_insn.
(movsd_softfloat): Likewise.
(movsd_store): Likewise.
(movsd_load): Likewise.
(extendsddd2): Likewise.
(extendsdtd2): Likewise.
(truncddsd2): Likewise.
(movdd_hardfloat64): Fixup comment.
* config/rs6000/rs6000.md (UNSPEC_MOVSD_LOAD): New constant.
(UNSPEC_MOVSD_STORE): Likewise.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34814
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/34814] SDmode function args not passed according to ABI specification
2008-01-16 16:34 [Bug target/34814] New: SDmode function args not passed according to ABI specification bergner at gcc dot gnu dot org
` (3 preceding siblings ...)
2008-01-23 7:04 ` bergner at gcc dot gnu dot org
@ 2008-01-25 17:44 ` bergner at gcc dot gnu dot org
2008-01-26 17:33 ` bergner at gcc dot gnu dot org
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: bergner at gcc dot gnu dot org @ 2008-01-25 17:44 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from bergner at gcc dot gnu dot org 2008-01-25 16:54 -------
Created an attachment (id=15023)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15023&action=view)
Updated patch to force SDmode args and return values into FP registers.
Updated patch with Ian and David's suggested changes made. Ian has ok'd the
machine independent parts. Now we're just waiting for David's review of the
updated port changes.
PR target/34814
* doc/tm.texi (TARGET_EXPAND_TO_RTL_HOOK): Document.
(TARGET_INSTANTIATE_DECLS): Likewise.
* target.h (expand_to_rtl_hook): New target hook.
(instantiate_decls): Likewise.
* function.c (instantiate_decl): Make non-static. Rename to...
(instantiate_decl_rtl): ... this.
(instantiate_expr): Use instantiate_decl_rtl.
(instantiate_decls_1): Likewise.
(instantiate_decls): Likewise.
(instantiate_virtual_regs: Call new instantiate_decls taget hook.
* function.h (instantiate_decl_rtl): Add prototype.
* cfgexpand.c (target.h): New include.
(tree_expand_cfg): Call new expand_to_rtl_hook target hook.
* target-def.h (TARGET_EXPAND_TO_RTL_HOOK): New define.
(TARGET_INSTANTIATE_DECLS): Likewise.
(TARGET_INITIALIZER): New target hooks added.
* config/rs6000/rs6000-protos.h (rs6000_secondary_memory_needed_rtx):
New prototype.
* config/rs6000/rs6000.c (tree-flow.h): New include.
(machine_function): Add sdmode_stack_slot field.
(rs6000_alloc_sdmode_stack_slot): New function.
(rs6000_instantiate_decls): Likewise.
(rs6000_secondary_memory_needed_rtx): Likewise.
(rs6000_check_sdmode): Likewise.
(TARGET_EXPAND_TO_RTL_HOOK): Target macro defined.
(TARGET_INSTANTIATE_DECLS): Likewise.
(rs6000_hard_regno_mode_ok): Allow SDmode.
(num_insns_constant): Likewise. Handle _Decimal32 constants.
(rs6000_emit_move): Handle SDmode.
(function_arg_advance): Likewise.
(function_arg): Likewise.
(rs6000_gimplify_va_arg): Likewise. Add special handling of
SDmode var args for 32-bit compiles.
(rs6000_secondary_reload_class): Handle SDmode.
(rs6000_output_function_epilogue): Likewise.
(rs6000_function_value): Simplify if statement.
(rs6000_libcall_value): Likewise.
* config/rs6000/rs6000.h (SLOW_UNALIGNED_ACCESS): Handle SDmode.
(SECONDARY_MEMORY_NEEDED_RTX): Add define.
* config/rs6000/dfp.md (movsd): New define_expand and splitter.
(movsd_hardfloat): New define_insn.
(movsd_softfloat): Likewise.
(movsd_store): Likewise.
(movsd_load): Likewise.
(extendsddd2): Likewise.
(extendsdtd2): Likewise.
(truncddsd2): Likewise.
(movdd_hardfloat64): Fixup comment.
(UNSPEC_MOVSD_LOAD): New constant.
(UNSPEC_MOVSD_STORE): Likewise.
--
bergner at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #15003|0 |1
is obsolete| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34814
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/34814] SDmode function args not passed according to ABI specification
2008-01-16 16:34 [Bug target/34814] New: SDmode function args not passed according to ABI specification bergner at gcc dot gnu dot org
` (4 preceding siblings ...)
2008-01-25 17:44 ` bergner at gcc dot gnu dot org
@ 2008-01-26 17:33 ` bergner at gcc dot gnu dot org
2008-01-26 18:03 ` bergner at gcc dot gnu dot org
2008-01-26 18:07 ` bergner at gcc dot gnu dot org
7 siblings, 0 replies; 9+ messages in thread
From: bergner at gcc dot gnu dot org @ 2008-01-26 17:33 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from bergner at gcc dot gnu dot org 2008-01-26 17:19 -------
Subject: Bug 34814
Author: bergner
Date: Sat Jan 26 17:18:35 2008
New Revision: 131869
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=131869
Log:
PR target/34814
* doc/tm.texi (TARGET_EXPAND_TO_RTL_HOOK): Document.
(TARGET_INSTANTIATE_DECLS): Likewise.
* target.h (expand_to_rtl_hook): New target hook.
(instantiate_decls): Likewise.
* function.c (instantiate_decl): Make non-static. Rename to...
(instantiate_decl_rtl): ... this.
(instantiate_expr): Use instantiate_decl_rtl.
(instantiate_decls_1): Likewise.
(instantiate_decls): Likewise.
(instantiate_virtual_regs: Call new instantiate_decls taget hook.
* function.h (instantiate_decl_rtl): Add prototype.
* cfgexpand.c (target.h): New include.
(tree_expand_cfg): Call new expand_to_rtl_hook target hook.
* target-def.h (TARGET_EXPAND_TO_RTL_HOOK): New define.
(TARGET_INSTANTIATE_DECLS): Likewise.
(TARGET_INITIALIZER): New target hooks added.
* config/rs6000/rs6000-protos.h (rs6000_secondary_memory_needed_rtx):
New prototype.
* config/rs6000/rs6000.c (tree-flow.h): New include.
(machine_function): Add sdmode_stack_slot field.
(rs6000_alloc_sdmode_stack_slot): New function.
(rs6000_instantiate_decls): Likewise.
(rs6000_secondary_memory_needed_rtx): Likewise.
(rs6000_check_sdmode): Likewise.
(TARGET_EXPAND_TO_RTL_HOOK): Target macro defined.
(TARGET_INSTANTIATE_DECLS): Likewise.
(rs6000_hard_regno_mode_ok): Allow SDmode.
(num_insns_constant): Likewise. Handle _Decimal32 constants.
(rs6000_emit_move): Handle SDmode.
(function_arg_advance): Likewise.
(function_arg): Likewise.
(rs6000_gimplify_va_arg): Likewise. Add special handling of
SDmode var args for 32-bit compiles.
(rs6000_secondary_reload_class): Handle SDmode.
(rs6000_output_function_epilogue): Likewise.
(rs6000_function_value): Simplify if statement.
(rs6000_libcall_value): Likewise.
* config/rs6000/rs6000.h (SLOW_UNALIGNED_ACCESS): Handle SDmode.
(SECONDARY_MEMORY_NEEDED_RTX): Add define.
* config/rs6000/dfp.md (movsd): New define_expand and splitter.
(movsd_hardfloat): New define_insn.
(movsd_softfloat): Likewise.
(movsd_store): Likewise.
(movsd_load): Likewise.
(extendsddd2): Likewise.
(extendsdtd2): Likewise.
(truncddsd2): Likewise.
(movdd_hardfloat64): Fixup comment.
(UNSPEC_MOVSD_LOAD): New constant.
(UNSPEC_MOVSD_STORE): Likewise.
Modified:
trunk/gcc/ChangeLog
trunk/gcc/cfgexpand.c
trunk/gcc/config/rs6000/dfp.md
trunk/gcc/config/rs6000/rs6000-protos.h
trunk/gcc/config/rs6000/rs6000.c
trunk/gcc/config/rs6000/rs6000.h
trunk/gcc/doc/tm.texi
trunk/gcc/function.c
trunk/gcc/function.h
trunk/gcc/target-def.h
trunk/gcc/target.h
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34814
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/34814] SDmode function args not passed according to ABI specification
2008-01-16 16:34 [Bug target/34814] New: SDmode function args not passed according to ABI specification bergner at gcc dot gnu dot org
` (5 preceding siblings ...)
2008-01-26 17:33 ` bergner at gcc dot gnu dot org
@ 2008-01-26 18:03 ` bergner at gcc dot gnu dot org
2008-01-26 18:07 ` bergner at gcc dot gnu dot org
7 siblings, 0 replies; 9+ messages in thread
From: bergner at gcc dot gnu dot org @ 2008-01-26 18:03 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from bergner at gcc dot gnu dot org 2008-01-26 17:31 -------
This is now fixed in mainline.
--
bergner at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34814
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/34814] SDmode function args not passed according to ABI specification
2008-01-16 16:34 [Bug target/34814] New: SDmode function args not passed according to ABI specification bergner at gcc dot gnu dot org
` (6 preceding siblings ...)
2008-01-26 18:03 ` bergner at gcc dot gnu dot org
@ 2008-01-26 18:07 ` bergner at gcc dot gnu dot org
7 siblings, 0 replies; 9+ messages in thread
From: bergner at gcc dot gnu dot org @ 2008-01-26 18:07 UTC (permalink / raw)
To: gcc-bugs
--
bergner at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |4.3.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34814
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2008-01-26 17:33 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-01-16 16:34 [Bug target/34814] New: SDmode function args not passed according to ABI specification bergner at gcc dot gnu dot org
2008-01-16 18:39 ` [Bug target/34814] " bergner at gcc dot gnu dot org
2008-01-16 21:51 ` rguenth at gcc dot gnu dot org
2008-01-17 22:38 ` janis at gcc dot gnu dot org
2008-01-23 7:04 ` bergner at gcc dot gnu dot org
2008-01-25 17:44 ` bergner at gcc dot gnu dot org
2008-01-26 17:33 ` bergner at gcc dot gnu dot org
2008-01-26 18:03 ` bergner at gcc dot gnu dot org
2008-01-26 18:07 ` bergner at gcc dot gnu dot org
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).