[Bug target/82106] [RISCV] Misaligned loads generated when doubles are split between stack and registers

2017-11-30 Thread wilson at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82106 --- Comment #7 from Jim Wilson --- I have an initial attempt to fix this in the patch I just added as an attachment. It needs more work and more testing to be useful, and agreement from other gcc hackers that this makes sense. On the original

[Bug target/82106] [RISCV] Misaligned loads generated when doubles are split between stack and registers

2017-11-30 Thread wilson at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82106 --- Comment #6 from Jim Wilson --- Created attachment 42762 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42762=edit Work in progress patch. The && 1 are calls to a target hook I haven't written yet, and the && 0 is the same hook with !.

[Bug target/82106] [RISCV] Misaligned loads generated when doubles are split between stack and registers

2017-11-30 Thread wilson at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82106 --- Comment #5 from Jim Wilson --- Created attachment 42761 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42761=edit Alternate testcase. To show how unaligned split argument gets loaded into general register.

[Bug target/82106] [RISCV] Misaligned loads generated when doubles are split between stack and registers

2017-09-06 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82106 Richard Biener changed: What|Removed |Added Keywords||wrong-code Target|

[Bug target/82106] [RISCV] Misaligned loads generated when doubles are split between stack and registers

2017-09-05 Thread palmer at dabbelt dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82106 --- Comment #4 from Palmer Dabbelt --- Ya, sorry, I misread the assembly.

[Bug target/82106] [RISCV] Misaligned loads generated when doubles are split between stack and registers

2017-09-05 Thread andrew at sifive dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82106 --- Comment #3 from Andrew Waterman --- I believe Alex is correct, in that this is an implementation artifact that can be fixed without breaking the ABI. On Tue, Sep 5, 2017 at 9:26 AM asb at lowrisc dot org < gcc-bugzi...@gcc.gnu.org> wrote:

[Bug target/82106] [RISCV] Misaligned loads generated when doubles are split between stack and registers

2017-09-05 Thread asb at lowrisc dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82106 --- Comment #2 from Alex Bradbury --- Same problem with `-mstrict-align`, which as you say makes this worse. I'm actually not sure if this is an ABI-visible issue. The vararg save area and it's location is basically required by the ABI due to

[Bug target/82106] [RISCV] Misaligned loads generated when doubles are split between stack and registers

2017-09-05 Thread palmer at dabbelt dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82106 --- Comment #1 from Palmer Dabbelt --- Ugh. I'd really like to call this a bug and fix it, but since it'll technically break the ABI it'll require some more thought. Does "-mstrict-align" change the behavior? That would be a good argument to