/* To be used by function_frame_info. */
-struct aix_framedata {
+struct rs6000_framedata {
int offset; /* # of bytes in gpr's and fpr's are saved */
int saved_gpr; /* smallest # of saved gpr */
int saved_fpr; /* smallest # of saved fpr */
};
void
-function_frame_info PARAMS ((CORE_ADDR, struct aix_framedata *));
+function_frame_info PARAMS ((CORE_ADDR, struct rs6000_framedata *));
/* Define the byte order of the machine. */
#define BIG_BREAKPOINT { 0x7d, 0x82, 0x10, 0x08 }
#define LITTLE_BREAKPOINT { 0x08, 0x10, 0x82, 0x7d }
+#if TARGET_BYTE_ORDER == BIG_ENDIAN
+#define BREAKPOINT BIG_BREAKPOINT
+
+#else
+#if TARGET_BYTE_ORDER == LITTLE_ENDIAN
+#define BREAKPOINT LITTLE_BREAKPOINT
+#endif
+#endif
+
/* Amount PC must be decremented by after a breakpoint.
This is often the number of bytes in BREAKPOINT
but not always. */
{ \
int ii; \
CORE_ADDR frame_addr, func_start; \
- struct aix_framedata fdata; \
+ struct rs6000_framedata fdata; \
\
/* find the start of the function and collect info about its frame. */\
\
static void
frame_get_cache_fsr PARAMS ((struct frame_info *fi,
- struct aix_framedata *fdatap));
+ struct rs6000_framedata *fdatap));
/*
* Calculate the destination of a branch/jump. Return -1 if not a branch.
pop_frame ()
{
CORE_ADDR pc, lr, sp, prev_sp; /* %pc, %lr, %sp */
- struct aix_framedata fdata;
+ struct rs6000_framedata fdata;
struct frame_info *frame = get_current_frame ();
int addr, ii;
/* return information about a function frame.
- in struct aix_frameinfo fdata:
+ in struct rs6000_frameinfo fdata:
- frameless is TRUE, if function does not have a frame.
- nosavedpc is TRUE, if function does not save %pc value in its frame.
- offset is the number of bytes used in the frame to save registers.
void
function_frame_info (pc, fdata)
CORE_ADDR pc;
- struct aix_framedata *fdata;
+ struct rs6000_framedata *fdata;
{
unsigned int tmp;
register unsigned int op;
int pcsaved;
{
CORE_ADDR func_start;
- struct aix_framedata fdata;
+ struct rs6000_framedata fdata;
if (fi->next != NULL)
/* Don't even think about framelessness except on the innermost frame. */
/* If saved registers of frame FI are not known yet, read and cache them.
- &FDATAP contains aix_framedata; TDATAP can be NULL,
+ &FDATAP contains rs6000_framedata; TDATAP can be NULL,
in which case the framedata are read. */
static void
frame_get_cache_fsr (fi, fdatap)
struct frame_info *fi;
- struct aix_framedata *fdatap;
+ struct rs6000_framedata *fdatap;
{
int ii;
CORE_ADDR frame_addr;
- struct aix_framedata work_fdata;
+ struct rs6000_framedata work_fdata;
if (fi->cache_fsr)
return;
struct frame_info *fi;
{
CORE_ADDR tmpaddr;
- struct aix_framedata fdata;
+ struct rs6000_framedata fdata;
struct frame_info *callee_fi;
/* if the initial stack pointer (frame address) of this frame is known,