+2004-09-21 James E Wilson <wilson@specifixinc.com>
+
+ * config/tc-ia64.c (ENCODED_PSP_OFFSET): New.
+ (output_rp_psprel, output_pfs_psprel, output_preds_psprel,
+ output_spill_base, output_unat_psprel, output_lc_psprel,
+ output_fpsr_psprel, output_priunat_psprel, output_bsp_psprel,
+ output_bsprestore_psprel, output_rnat_psprel, output_spill_psprel,
+ output_spill_psprel_p): Use it.
+
2004-09-20 Tomer Levi <Tomer.Levi@nsc.com>
* config/tc-crx.c (handle_LoadStor): New function.
struct label_prologue_count * saved_prologue_counts;
} unwind;
+/* The input value is a negated offset from psp, and specifies an address
+ psp - offset. The encoded value is psp + 16 - (4 * offset). Thus we
+ must add 16 and divide by 4 to get the encoded value. */
+
+#define ENCODED_PSP_OFFSET(OFFSET) (((OFFSET) + 16) / 4)
+
typedef void (*vbyte_func) PARAMS ((int, char *, char *));
/* Forward declarations: */
unsigned int offset;
{
unw_rec_list *ptr = alloc_record (rp_psprel);
- ptr->r.record.p.pspoff = offset / 4;
+ ptr->r.record.p.pspoff = ENCODED_PSP_OFFSET (offset);
return ptr;
}
unsigned int offset;
{
unw_rec_list *ptr = alloc_record (pfs_psprel);
- ptr->r.record.p.pspoff = offset / 4;
+ ptr->r.record.p.pspoff = ENCODED_PSP_OFFSET (offset);
return ptr;
}
unsigned int offset;
{
unw_rec_list *ptr = alloc_record (preds_psprel);
- ptr->r.record.p.pspoff = offset / 4;
+ ptr->r.record.p.pspoff = ENCODED_PSP_OFFSET (offset);
return ptr;
}
unsigned int offset;
{
unw_rec_list *ptr = alloc_record (spill_base);
- ptr->r.record.p.pspoff = offset / 4;
+ ptr->r.record.p.pspoff = ENCODED_PSP_OFFSET (offset);
return ptr;
}
unsigned int offset;
{
unw_rec_list *ptr = alloc_record (unat_psprel);
- ptr->r.record.p.pspoff = offset / 4;
+ ptr->r.record.p.pspoff = ENCODED_PSP_OFFSET (offset);
return ptr;
}
unsigned int offset;
{
unw_rec_list *ptr = alloc_record (lc_psprel);
- ptr->r.record.p.pspoff = offset / 4;
+ ptr->r.record.p.pspoff = ENCODED_PSP_OFFSET (offset);
return ptr;
}
unsigned int offset;
{
unw_rec_list *ptr = alloc_record (fpsr_psprel);
- ptr->r.record.p.pspoff = offset / 4;
+ ptr->r.record.p.pspoff = ENCODED_PSP_OFFSET (offset);
return ptr;
}
unsigned int offset;
{
unw_rec_list *ptr = alloc_record (priunat_psprel);
- ptr->r.record.p.pspoff = offset / 4;
+ ptr->r.record.p.pspoff = ENCODED_PSP_OFFSET (offset);
return ptr;
}
unsigned int offset;
{
unw_rec_list *ptr = alloc_record (bsp_psprel);
- ptr->r.record.p.pspoff = offset / 4;
+ ptr->r.record.p.pspoff = ENCODED_PSP_OFFSET (offset);
return ptr;
}
unsigned int offset;
{
unw_rec_list *ptr = alloc_record (bspstore_psprel);
- ptr->r.record.p.pspoff = offset / 4;
+ ptr->r.record.p.pspoff = ENCODED_PSP_OFFSET (offset);
return ptr;
}
unsigned int offset;
{
unw_rec_list *ptr = alloc_record (rnat_psprel);
- ptr->r.record.p.pspoff = offset / 4;
+ ptr->r.record.p.pspoff = ENCODED_PSP_OFFSET (offset);
return ptr;
}
unw_rec_list *ptr = alloc_record (spill_psprel);
ptr->r.record.x.ab = ab;
ptr->r.record.x.reg = reg;
- ptr->r.record.x.pspoff = offset / 4;
+ ptr->r.record.x.pspoff = ENCODED_PSP_OFFSET (offset);
return ptr;
}
unw_rec_list *ptr = alloc_record (spill_psprel_p);
ptr->r.record.x.ab = ab;
ptr->r.record.x.reg = reg;
- ptr->r.record.x.pspoff = offset / 4;
+ ptr->r.record.x.pspoff = ENCODED_PSP_OFFSET (offset);
ptr->r.record.x.qp = predicate;
return ptr;
}