Re: [PATCH v2 2/2] Correct invalid assumptions made by (mostly) DWARF-2 tests

Maciej W. Rozycki
2014-11-16T20:05:57Z

On Sun, 16 Nov 2014, Doug Evans wrote:

> >>> Index: gdb-fsf-trunk-quilt/gdb/testsuite/gdb.dwarf2/dw2-canonicalize-type.S
> >>> ===================================================================
> >>> ---
> >>> gdb-fsf-trunk-quilt.orig/gdb/testsuite/gdb.dwarf2/dw2-canonicalize-type.S
> >>> 2014-10-02 07:56:23.000000000 +0100
> >>> +++
> >>> gdb-fsf-trunk-quilt/gdb/testsuite/gdb.dwarf2/dw2-canonicalize-type.S
> >>> 2014-10-02 07:58:10.978958268 +0100
> >>> @@ -15,7 +15,8 @@
> >>>
> >>> .text
> >>> .globl main
> >>> -main: .byte 0
> >>> +main:
> >>> + .dc.l 0
> >>
> >> We've never used .dl.l before, and I don't know how widely available
> >> it is (in fact, I couldn't find it in the GAS manual). How about using
> >> .word or .4byte? It would also be consistent with what we've usually be
> >> using. Would that work?
> >
> > Agreed.
>
> Sorry for the followup, but FAOD, .4byte.
> .word may be a different size on some platforms.

If anything, that would have to be `.4byte'.

I chose `.dc.l' because it is the only fully portable GAS pseudo-op to
produce 32-bit data output. Testing portability was the actual reason
to add all the `.dc.*' pseudo-ops to GAS. As you've already observed
`.word' is unportable, and neither is `.4byte' as the latter is only
supported for ELF targets. However in DWARF-2 testing we're probably on
an ELF target anyway.

So I'll update the tests to use `.4byte'. Thanks for your review.

Maciej