DWARF: space-optimize loc. descr. for integer literals on 32-bit targets
authorPierre-Marie de Rodat <derodat@adacore.com>
Wed, 12 Oct 2016 08:38:49 +0000 (08:38 +0000)
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>
Wed, 12 Oct 2016 08:38:49 +0000 (08:38 +0000)
commitb4a9ef2f4d68a5a10f4c87c9f416562bf5f59d35
tree04fa1e4d55ed57b4c0742c9e0423a0598b7dda3b
parentc0dbd22d2eebf14210473be5c37da77083dbbf5f
DWARF: space-optimize loc. descr. for integer literals on 32-bit targets

This enhances location description generation so that the generated
opcodes for integer literals are as space-efficient when HOST_WIDE_INT
is 64-bits large than when it's 32-bits large. In particular, this
reduces the size of the opcodes generated to produce big unsigned
literals using small literal integers instead.

gcc/

* dwarf2out.c (int_loc_descriptor): Generate opcodes for another
equivalent 32-bit constant (modulo 2**32) when that yields
smaller instructions.
(size_of_int_loc_descriptor): Update accordingly.

gcc/testsuite/

* gnat.dg/debug8.adb: New testcase.

From-SVN: r241024
gcc/ChangeLog
gcc/dwarf2out.c
gcc/testsuite/ChangeLog
gcc/testsuite/gnat.dg/debug8.adb [new file with mode: 0644]