Re: [RFA] arm_scan_prologue: accept strh and strb as well as str

Richard Earnshaw
2002-05-08T19:11:13Z

> [sorry for the empty reply]
> OK -- I'd be glad to do that. Could you possibly
> provide me an example to work from?

Below.

>
> arm_scan_prologue is easy, since it accepts prologue instructions
> in any order, but arm_skip_prologue imposes an ordering on them.
> I would REALLY like to merge these two functions. In fact I started
> to, but then got busy with other things.

Go for it...

compile the following with gcc-3.0 or later, with the options

-O -mcpu=strongarm -mno-apcs-frame

void foo (char a, short b, int c);
void bar (char *a, short *b, int *c);

void foo (char a, short b, int c)
{
bar (&a, &b, &c);
}

void bar (char *a, short *b, int *c)
{
foo (*a, *b, *c);
}

R.