+2018-05-13 Mark Wielaard <mark@klomp.org>
+
+ * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
+ (size_of_loc_descr): Likewise.
+ (output_loc_operands): Likewise.
+ (output_loc_operands_raw): Likewise.
+ (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
+ (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
+ (hash_loc_operands): Likewise.
+ (compare_loc_operands): Likewise.
+
2018-05-14 Mark Wielaard <mark@klomp.org>
* dwarf2out.c (count_index_addrs): New function.
return DW_OP_GNU_reinterpret;
break;
+ case DW_OP_addrx:
+ if (dwarf_version < 5)
+ return DW_OP_GNU_addr_index;
+ break;
+
+ case DW_OP_constx:
+ if (dwarf_version < 5)
+ return DW_OP_GNU_const_index;
+ break;
+
default:
break;
}
size += DWARF2_ADDR_SIZE;
break;
case DW_OP_GNU_addr_index:
+ case DW_OP_addrx:
case DW_OP_GNU_const_index:
+ case DW_OP_constx:
gcc_assert (loc->dw_loc_oprnd1.val_entry->index != NO_INDEX_ASSIGNED);
size += size_of_uleb128 (loc->dw_loc_oprnd1.val_entry->index);
break;
break;
case DW_OP_GNU_addr_index:
+ case DW_OP_addrx:
case DW_OP_GNU_const_index:
+ case DW_OP_constx:
gcc_assert (loc->dw_loc_oprnd1.val_entry->index != NO_INDEX_ASSIGNED);
dw2_asm_output_data_uleb128 (loc->dw_loc_oprnd1.val_entry->index,
"(index into .debug_addr)");
{
case DW_OP_addr:
case DW_OP_GNU_addr_index:
+ case DW_OP_addrx:
case DW_OP_GNU_const_index:
+ case DW_OP_constx:
case DW_OP_implicit_value:
/* We cannot output addresses in .cfi_escape, only bytes. */
gcc_unreachable ();
dw_addr_op (enum dtprel_bool dtprel)
{
if (dtprel == dtprel_true)
- return (dwarf_split_debug_info ? DW_OP_GNU_const_index
+ return (dwarf_split_debug_info ? dwarf_OP (DW_OP_constx)
: (DWARF2_ADDR_SIZE == 4 ? DW_OP_const4u : DW_OP_const8u));
else
- return dwarf_split_debug_info ? DW_OP_GNU_addr_index : DW_OP_addr;
+ return dwarf_split_debug_info ? dwarf_OP (DW_OP_addrx) : DW_OP_addr;
}
/* Return a pointer to a newly allocated address location description. If
}
break;
case DW_OP_GNU_addr_index:
+ case DW_OP_addrx:
case DW_OP_GNU_const_index:
- if (loc->dw_loc_opc == DW_OP_GNU_addr_index
- || (loc->dw_loc_opc == DW_OP_GNU_const_index && loc->dtprel))
+ case DW_OP_constx:
+ if ((loc->dw_loc_opc == DW_OP_GNU_addr_index
+ || loc->dw_loc_opc == DW_OP_addrx)
+ || ((loc->dw_loc_opc == DW_OP_GNU_const_index
+ || loc->dw_loc_opc == DW_OP_constx)
+ && loc->dtprel))
{
rtx rtl = loc->dw_loc_oprnd1.val_entry->addr.rtl;
if (!resolve_one_addr (&rtl))
inchash::add_rtx (val1->v.val_addr, hstate);
break;
case DW_OP_GNU_addr_index:
+ case DW_OP_addrx:
case DW_OP_GNU_const_index:
+ case DW_OP_constx:
{
if (loc->dtprel)
{
hash_addr:
return rtx_equal_p (valx1->v.val_addr, valy1->v.val_addr);
case DW_OP_GNU_addr_index:
+ case DW_OP_addrx:
case DW_OP_GNU_const_index:
+ case DW_OP_constx:
{
rtx ax1 = valx1->val_entry->addr.rtl;
rtx ay1 = valy1->val_entry->addr.rtl;