This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC] PPC: Skip call to __eabi in main()
- From: Luis Machado <luisgpm at linux dot vnet dot ibm dot com>
- To: Kevin Buettner <kevinb at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Fri, 01 Aug 2008 15:45:14 -0300
- Subject: Re: [RFC] PPC: Skip call to __eabi in main()
- References: <20080721155343.404977d3@mesquite.lan> <1216701867.31797.26.camel@localhost.localdomain> <20080722181252.03d9ce94@mesquite.lan> <20080728172221.3dc3764e@mesquite.lan>
- Reply-to: luisgpm at linux dot vnet dot ibm dot com
Hi Kevin,
Sorry it took a while to reply.
On Mon, 2008-07-28 at 17:22 -0700, Kevin Buettner wrote:
> +#define BL_MASK 0xfc000001
We have a very similar mask used for displaced stepping called
BRANCH_MASK (0xfc000000). It doesn't care about the LK bit though, its
purpose is just to check for a generic branch instruction.
Maybe we should rename BL_MASK to something else incorporating the
notion that we expect a LK bit? Or maybe doing the check for the LK bit
manually in the code and using BL_MASK as is.
> +#define BL_INSTRUCTION 0x48000001
Similarly, we also have B_INSN (0x48000000), lacking the LK bit.
> +#define BL_DISPLACEMENT_MASK 0x03fffffc
Should we make the naming more generic (B_LI_MASK maybe?) as the
displacement field is common to a variety of I-form branch instructions?
Just a suggestion, doesn't need to change if you don't feel it clarifies
things.
Regards,
Luis