Commit 809aff74 by Uros Bizjak

alpha.c (alpha_pass_by_reference): Pass un-named SFmode and SCmode arguments by reference.

	* config/alpha/alpha.c (alpha_pass_by_reference): Pass un-named
	SFmode and SCmode arguments by reference.

From-SVN: r240116
parent 254830ba
2016-09-13 Uros Bizjak <ubizjak@gmail.com>
* config/alpha/alpha.c (alpha_pass_by_reference): Pass un-named
SFmode and SCmode arguments by reference.
2016-09-13 David Malcolm <dmalcolm@redhat.com> 2016-09-13 David Malcolm <dmalcolm@redhat.com>
* diagnostic-show-locus.c (selftest::test_one_liner_fixit_insert): * diagnostic-show-locus.c (selftest::test_one_liner_fixit_insert):
...@@ -6,8 +11,7 @@ ...@@ -6,8 +11,7 @@
for renaming of add_fixit_insert to add_fixit_insert_before. for renaming of add_fixit_insert to add_fixit_insert_before.
(selftest::test_one_liner_fixit_insert_after): New function. (selftest::test_one_liner_fixit_insert_after): New function.
(selftest::test_one_liner_fixit_validation_adhoc_locations): (selftest::test_one_liner_fixit_validation_adhoc_locations):
Update for renaming of add_fixit_insert to Update for renaming of add_fixit_insert to add_fixit_insert_before.
add_fixit_insert_before.
(selftest::test_one_liner_many_fixits): Likewise. (selftest::test_one_liner_many_fixits): Likewise.
(selftest::test_diagnostic_show_locus_one_liner): Update for (selftest::test_diagnostic_show_locus_one_liner): Update for
renaming, call new test function. renaming, call new test function.
...@@ -16,16 +20,14 @@ ...@@ -16,16 +20,14 @@
(selftest::test_fixit_consolidation): Likewise. (selftest::test_fixit_consolidation): Likewise.
* diagnostic.c (selftest::test_print_parseable_fixits_insert): * diagnostic.c (selftest::test_print_parseable_fixits_insert):
Likewise. Likewise.
* edit-context.c (selftest::test_applying_fixits_insert): Rename * edit-context.c (selftest::test_applying_fixits_insert): Rename to...
to...
(selftest::test_applying_fixits_insert_before): ...this. (selftest::test_applying_fixits_insert_before): ...this.
(selftest::test_applying_fixits_insert): Update for renaming of (selftest::test_applying_fixits_insert): Update for renaming of
add_fixit_insert to add_fixit_insert_before. add_fixit_insert to add_fixit_insert_before.
(selftest::test_applying_fixits_insert_after): New function. (selftest::test_applying_fixits_insert_after): New function.
(selftest::test_applying_fixits_insert_after_at_line_end): New (selftest::test_applying_fixits_insert_after_at_line_end): New
function. function.
(selftest::test_applying_fixits_insert_after_failure): New (selftest::test_applying_fixits_insert_after_failure): New function.
function.
(selftest::test_applying_fixits_multiple): Update for renaming of (selftest::test_applying_fixits_multiple): Update for renaming of
add_fixit_insert to add_fixit_insert_before. add_fixit_insert to add_fixit_insert_before.
(selftest::change_line): Likewise. (selftest::change_line): Likewise.
...@@ -33,8 +35,8 @@ ...@@ -33,8 +35,8 @@
(selftest::test_applying_fixits_line_out_of_range): Likewise. (selftest::test_applying_fixits_line_out_of_range): Likewise.
(selftest::test_applying_fixits_column_validation): Likewise. (selftest::test_applying_fixits_column_validation): Likewise.
(selftest::test_applying_fixits_column_validation): Likewise. (selftest::test_applying_fixits_column_validation): Likewise.
(selftest::edit_context_c_tests): Update for renamed test (selftest::edit_context_c_tests): Update for renamed test function;
function; call new test functions. call new test functions.
2016-09-13 Pat Haugen <pthaugen@us.ibm.com> 2016-09-13 Pat Haugen <pthaugen@us.ibm.com>
......
...@@ -5754,8 +5754,29 @@ static bool ...@@ -5754,8 +5754,29 @@ static bool
alpha_pass_by_reference (cumulative_args_t ca ATTRIBUTE_UNUSED, alpha_pass_by_reference (cumulative_args_t ca ATTRIBUTE_UNUSED,
machine_mode mode, machine_mode mode,
const_tree type ATTRIBUTE_UNUSED, const_tree type ATTRIBUTE_UNUSED,
bool named ATTRIBUTE_UNUSED) bool named)
{ {
/* Pass float and _Complex float variable arguments by reference.
This avoids 64-bit store from a FP register to a pretend args save area
and subsequent 32-bit load from the saved location to a FP register.
Note that 32-bit loads and stores to/from a FP register on alpha reorder
bits to form a canonical 64-bit value in the FP register. This fact
invalidates compiler assumption that 32-bit FP value lives in the lower
32-bits of the passed 64-bit FP value, so loading the 32-bit value from
the stored 64-bit location using 32-bit FP load is invalid on alpha.
This introduces sort of ABI incompatibility, but until _Float32 was
introduced, C-family languages promoted 32-bit float variable arg to
a 64-bit double, and it was not allowed to pass float as a varible
argument. Passing _Complex float as a variable argument never
worked on alpha. Thus, we have no backward compatibility issues
to worry about, and passing unpromoted _Float32 and _Complex float
as a variable argument will actually work in the future. */
if (mode == SFmode || mode == SCmode)
return !named;
return mode == TFmode || mode == TCmode; return mode == TFmode || mode == TCmode;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment