stack alignment of i386ex
biguo@263.net
biguo@263.net
Wed Jun 30 20:49:00 GMT 1999
>
>
> On 30 Jun 1999 biguo@263.net wrote:
>
> > Hi!When I burn and run hello_world_c DEMO on i386ex board,there is
> > always a error.Its location is random.The error message is "exception
> > 6 is caught".Gradually I find out that the location of error is at a
> > call statement.According to register EIP information,CPU run a half
> > instruction of the call.Meanwhile,I don't find where to set the
> > alignment of stack.I doubt some thing wrong with stack alignment.Is it
> > right?
>
> Where exactly is the EIP? If it is inside any code before the call to
> _Thread_Start_multitasking from rtems_initialize_executive_late, then your
> initial program stack is not properly setup. This code is usually in the
> startXXX directory in the BSP and is in assembly.
>
> --joel
> Joel Sherrill, Ph.D. Director of Research & Development
> joel@OARcorp.com On-Line Applications Research
> Ask me about RTEMS: a free RTOS Huntsville AL 35805
> Support Available (256) 722-9985
>
>
Hi!The error message look like this: EIP=0x3f8747c CS=3f80010 exception 6.The content of EIP can vary when I insert several printk statements in exinit.c.The error location is at call printk.CPU run half instruction of call printk.I doubt the content of CS has an error.It should be 10 not 3f80010.In i386/cpu.h there are a few parameters about alignment,such as CPU_STRUCTURE_ALIGNMENT,CPU_ALIGNMENT=4.I chang CPU_ALIGNMENT to 2.The error message look like this:CS=10,EIP=ffffffff,exception 13.Meanwhile,in start.s I add .p2align 2 when initializing stack.Another,I add option -malign-functions=2 to gcc. The error still occur.What reason cause this?How to solve it?Thanks in advance for ant help.
_______________________________________________
New CrossGCC FAQ: http://www.objsw.com/CrossGCC
_______________________________________________
To remove yourself from the crossgcc list, send
mail to crossgcc-request@cygnus.com with the
text 'unsubscribe' (without the quotes) in the
body of the message.
More information about the crossgcc
mailing list