/* ??? This is only ever set for DW_OP_constNu, for N equal to the
address size, but since we always allocate cleared storage it
should be zero for other types of locations. */
- if (a->dtprel != b->dtprel)
+ if (a->dw_loc_dtprel != b->dw_loc_dtprel)
return false;
return (dw_val_equal_p (&a->dw_loc_oprnd1, &b->dw_loc_oprnd1)
dw2_asm_output_data (2, val1->v.val_int, NULL);
break;
case DW_OP_const4u:
- if (loc->dtprel)
+ if (loc->dw_loc_dtprel)
{
gcc_assert (targetm.asm_out.output_dwarf_dtprel);
targetm.asm_out.output_dwarf_dtprel (asm_out_file, 4,
dw2_asm_output_data (4, val1->v.val_int, NULL);
break;
case DW_OP_const8u:
- if (loc->dtprel)
+ if (loc->dw_loc_dtprel)
{
gcc_assert (targetm.asm_out.output_dwarf_dtprel);
targetm.asm_out.output_dwarf_dtprel (asm_out_file, 8,
break;
case DW_OP_addr:
- if (loc->dtprel)
+ if (loc->dw_loc_dtprel)
{
if (targetm.asm_out.output_dwarf_dtprel)
{
ref->dw_loc_oprnd1.val_class = dw_val_class_addr;
ref->dw_loc_oprnd1.v.val_addr = addr;
- ref->dtprel = dtprel;
+ ref->dw_loc_dtprel = dtprel;
if (dwarf_split_debug_info)
ref->dw_loc_oprnd1.val_entry
= add_addr_table_entry (addr,
inchash::hash hstate;
hashval_t hash;
- tem = (loc->dtprel << 8) | ((unsigned int) loc->dw_loc_opc);
+ tem = (loc->dw_loc_dtprel << 8) | ((unsigned int) loc->dw_loc_opc);
CHECKSUM (tem);
hash_loc_operands (loc, hstate);
hash = hstate.end();
inchash::hash hstate;
hashval_t hash;
- CHECKSUM_ULEB128 (loc->dtprel);
+ CHECKSUM_ULEB128 (loc->dw_loc_dtprel);
CHECKSUM_ULEB128 (loc->dw_loc_opc);
hash_loc_operands (loc, hstate);
hash = hstate.end ();
/* If needed, relocate the picking offset with respect to the frame
offset. */
- if (l->frame_offset_rel)
+ if (l->dw_loc_frame_offset_rel)
{
unsigned HOST_WIDE_INT off;
switch (l->dw_loc_opc)
&& want_address == 0)
{
ret = new_loc_descr (DW_OP_pick, 0, 0);
- ret->frame_offset_rel = 1;
+ ret->dw_loc_frame_offset_rel = 1;
context->placeholder_seen = true;
break;
}
gcc_assert (cursor != NULL_TREE);
ret = new_loc_descr (DW_OP_pick, i, 0);
- ret->frame_offset_rel = 1;
+ ret->dw_loc_frame_offset_rel = 1;
break;
}
/* FALLTHRU */
|| 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))
+ && loc->dw_loc_dtprel))
{
rtx rtl = loc->dw_loc_oprnd1.val_entry->addr.rtl;
if (!resolve_one_addr (&rtl))
break;
case DW_OP_const4u:
case DW_OP_const8u:
- if (loc->dtprel
+ if (loc->dw_loc_dtprel
&& !resolve_one_addr (&loc->dw_loc_oprnd1.v.val_addr))
return false;
break;
while (expr != l)
{
*p = new_loc_descr (expr->dw_loc_opc, 0, 0);
- (*p)->dw_loc_oprnd1 = expr->dw_loc_oprnd1;
- (*p)->dw_loc_oprnd2 = expr->dw_loc_oprnd2;
+ (*p)->dw_loc_oprnd1.val_class = expr->dw_loc_oprnd1.val_class;
+ (*p)->dw_loc_oprnd1.val_entry = expr->dw_loc_oprnd1.val_entry;
+ (*p)->dw_loc_oprnd1.v = expr->dw_loc_oprnd1.v;
+ (*p)->dw_loc_oprnd2.val_class = expr->dw_loc_oprnd2.val_class;
+ (*p)->dw_loc_oprnd2.val_entry = expr->dw_loc_oprnd2.val_entry;
+ (*p)->dw_loc_oprnd2.v = expr->dw_loc_oprnd2.v;
p = &(*p)->dw_loc_next;
expr = expr->dw_loc_next;
}
copy over the DW_AT_location attribute from die to a. */
if (l->dw_loc_next != NULL)
{
- a->dw_attr_val = av->dw_attr_val;
+ a->dw_attr_val.val_class = av->dw_attr_val.val_class;
+ a->dw_attr_val.val_entry = av->dw_attr_val.val_entry;
+ a->dw_attr_val.v = av->dw_attr_val.v;
return 1;
}
{
case DW_OP_const4u:
case DW_OP_const8u:
- if (loc->dtprel)
+ if (loc->dw_loc_dtprel)
goto hash_addr;
/* FALLTHRU */
case DW_OP_const1u:
break;
case DW_OP_addr:
hash_addr:
- if (loc->dtprel)
+ if (loc->dw_loc_dtprel)
{
unsigned char dtprel = 0xd1;
hstate.add_object (dtprel);
case DW_OP_GNU_const_index:
case DW_OP_constx:
{
- if (loc->dtprel)
+ if (loc->dw_loc_dtprel)
{
unsigned char dtprel = 0xd1;
hstate.add_object (dtprel);
{
case DW_OP_const4u:
case DW_OP_const8u:
- if (x->dtprel)
+ if (x->dw_loc_dtprel)
goto hash_addr;
/* FALLTHRU */
case DW_OP_const1u:
{
for (; x != NULL && y != NULL; x = x->dw_loc_next, y = y->dw_loc_next)
if (x->dw_loc_opc != y->dw_loc_opc
- || x->dtprel != y->dtprel
+ || x->dw_loc_dtprel != y->dw_loc_dtprel
|| !compare_loc_operands (x, y))
break;
return x == NULL && y == NULL;
struct GTY(()) dw_val_node {
enum dw_val_class val_class;
+ /* On 64-bit host, there are 4 bytes of padding between val_class
+ and val_entry. Reuse the padding for other content of
+ dw_loc_descr_node and dw_attr_struct. */
+ union dw_val_node_parent
+ {
+ struct dw_val_loc_descr_node
+ {
+ ENUM_BITFIELD (dwarf_location_atom) dw_loc_opc_v : 8;
+ /* Used to distinguish DW_OP_addr with a direct symbol relocation
+ from DW_OP_addr with a dtp-relative symbol relocation. */
+ unsigned int dw_loc_dtprel_v : 1;
+ /* For DW_OP_pick, DW_OP_dup and DW_OP_over operations: true iff.
+ it targets a DWARF prodecure argument. In this case, it needs to be
+ relocated according to the current frame offset. */
+ unsigned int dw_loc_frame_offset_rel_v : 1;
+ } u1;
+ int u2;
+ enum dwarf_attribute u3;
+ } GTY((skip)) u;
struct addr_table_entry * GTY(()) val_entry;
union dw_val_struct_union
{
struct GTY((chain_next ("%h.dw_loc_next"))) dw_loc_descr_node {
dw_loc_descr_ref dw_loc_next;
- ENUM_BITFIELD (dwarf_location_atom) dw_loc_opc : 8;
+#define dw_loc_opc dw_loc_oprnd1.u.u1.dw_loc_opc_v
/* Used to distinguish DW_OP_addr with a direct symbol relocation
from DW_OP_addr with a dtp-relative symbol relocation. */
- unsigned int dtprel : 1;
+#define dw_loc_dtprel dw_loc_oprnd1.u.u1.dw_loc_dtprel_v
/* For DW_OP_pick, DW_OP_dup and DW_OP_over operations: true iff.
it targets a DWARF prodecure argument. In this case, it needs to be
relocated according to the current frame offset. */
- unsigned int frame_offset_rel : 1;
- int dw_loc_addr;
+#define dw_loc_frame_offset_rel dw_loc_oprnd1.u.u1.dw_loc_frame_offset_rel_v
+#define dw_loc_addr dw_loc_oprnd2.u.u2
dw_val_node dw_loc_oprnd1;
dw_val_node dw_loc_oprnd2;
};
Attributes are typically linked below the DIE they modify. */
typedef struct GTY(()) dw_attr_struct {
- enum dwarf_attribute dw_attr;
+#define dw_attr dw_attr_val.u.u3
dw_val_node dw_attr_val;
}
dw_attr_node;