#1572 closed defect (worksforme)

Autoconf Offset macro help needed

Reported by: Joel Sherrill Owned by: Ralf Corsepius
Priority: normal Milestone: 4.11
Component: build Version: 4.11
Severity: normal Keywords:
Cc: chrisj@… Blocked By:
Blocking:

Description

For SMP support, we need to have a per CPU data structure. This structure
has fields like executing, heir, interrupt stack, and dispatch needed for
each CPU core. This is accepted practice and

I have this working in a development tree along with the next steps in
SMP support. I am cleaning up my per CPU patch so it has no SMP references.
It is the first step in SMP support and doesn't have an impact on performance.
Before I submit this patch for review, there is an issue I do not know how to
address.

The elements of this data structure must be accessed from assembly files.
We have to know the offset of these elements on a per target basis. Since the
offsets can vary based upon compiler flags and version AND they need to
be constants in the assembly file, this seemed like a good job for autoconf
to generate.

I have attached a tarball of some code that can print the offset of an
element in a test structure. It works on all 4.11 gcc's I have.

/opt/rtems-4.11/bin/arm-rtems4.11-gcc 4
/opt/rtems-4.11/bin/avr-rtems4.11-gcc 2
/opt/rtems-4.11/bin/bfin-rtems4.11-gcc 4
/opt/rtems-4.11/bin/h8300-rtems4.11-gcc 2
/opt/rtems-4.11/bin/i386-rtems4.11-gcc 4
/opt/rtems-4.11/bin/lm32-rtems4.11-gcc 4
/opt/rtems-4.11/bin/m32c-rtems4.11-gcc 2
/opt/rtems-4.11/bin/m32r-rtems4.11-gcc 4
/opt/rtems-4.11/bin/m68k-rtems4.11-gcc 4
/opt/rtems-4.11/bin/mips-rtems4.11-gcc 4
/opt/rtems-4.11/bin/powerpc-rtems4.11-gcc 4
/opt/rtems-4.11/bin/sh-rtems4.11-gcc 4
/opt/rtems-4.11/bin/sparc64-rtems4.11-gcc 8
/opt/rtems-4.11/bin/sparc-rtems4.11-gcc 4

Please help generate this information.

Attachments (1)

offset.tar.bz2 (820 bytes) - added by Joel Sherrill on Jun 17, 2010 at 2:12:00 PM.
code to probe for size

Download all attachments as: .zip

Change History (3)

Changed on Jun 17, 2010 at 2:12:00 PM by Joel Sherrill

Attachment: offset.tar.bz2 added

code to probe for size

comment:1 Changed on Jun 21, 2010 at 3:55:52 PM by Joel Sherrill

Resolution: worksforme
Status: newclosed

Thanks Ralf. The autoconf macro did the trick.

comment:2 Changed on Nov 24, 2014 at 6:58:28 PM by Gedare Bloom

Version: HEAD4.11

Replace Version=HEAD with Version=4.11 for the tickets with Milestone >= 4.11

Note: See TracTickets for help on using tickets.