diff options
| author | Roland McGrath <[email protected]> | 2010-01-05 22:59:32 -0800 |
|---|---|---|
| committer | Roland McGrath <[email protected]> | 2010-01-05 22:59:32 -0800 |
| commit | 0c16c58610276858702c0db8b3bc8d332fb85656 (patch) | |
| tree | 775f48a18378310c7557917440cac1d794fb4e0c /backends/ppc64_retval.c | |
| parent | ebc5c885e696cdc4961916113c50e1396d8d3d48 (diff) | |
Use dwarf_aggregate_size in backend return_value functions. Observe DW_AT_GNU_vector on powerpc return_value type.
Diffstat (limited to 'backends/ppc64_retval.c')
| -rw-r--r-- | backends/ppc64_retval.c | 27 |
1 files changed, 22 insertions, 5 deletions
diff --git a/backends/ppc64_retval.c b/backends/ppc64_retval.c index 454897cc..a5fc0dc8 100644 --- a/backends/ppc64_retval.c +++ b/backends/ppc64_retval.c @@ -1,5 +1,5 @@ /* Function return value location for Linux/PPC64 ABI. - Copyright (C) 2005, 2006, 2007 Red Hat, Inc. + Copyright (C) 2005-2010 Red Hat, Inc. This file is part of Red Hat elfutils. Red Hat elfutils is free software; you can redistribute it and/or modify @@ -53,6 +53,13 @@ static const Dwarf_Op loc_fpreg[] = #define nloc_fp2regs 4 #define nloc_fp4regs 8 +/* vr2. */ +static const Dwarf_Op loc_vmxreg[] = + { + { .atom = DW_OP_regx, .number = 1124 + 2 } + }; +#define nloc_vmxreg 1 + /* The return value is a structure and is actually stored in stack space passed in a hidden argument by the caller. But, the compiler helpfully returns the address of that space in r3. */ @@ -150,11 +157,21 @@ ppc64_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp) *locp = loc_aggregate; return nloc_aggregate; - case DW_TAG_string_type: case DW_TAG_array_type: - if (dwarf_formudata (dwarf_attr_integrate (typedie, DW_AT_byte_size, - &attr_mem), &size) == 0 - && size <= 8) + { + bool is_vector; + if (dwarf_formflag (dwarf_attr_integrate (typedie, DW_AT_GNU_vector, + &attr_mem), &is_vector) == 0 + && is_vector) + { + *locp = loc_vmxreg; + return nloc_vmxreg; + } + } + /* Fall through. */ + + case DW_TAG_string_type: + if (dwarf_aggregate_size (typedie, &size) == 0 && size <= 8) { if (tag == DW_TAG_array_type) { |
