This is the mail archive of the mailing list for the binutils project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Supporting more than one CPU with the same gas port.

On Wed, 2012-01-04 at 10:56 +0000, nick clifton wrote:
> Hi Sean,
> > I have a general question when it comes to supporting more than one core
> > with the same assembler(tc-x)
> Theoretically yes, but in practice no.  Why do you want this though ? 
> What is hard about having different assemblers for different architectures ?

What I believe Sean is specifically asking about is in relation to
Freescale embedded microcontrollers that have two distinct CPUs within
The main processor is a CISC device (S12X)
The second processor is a RISC device (XGATE)

So, within one microcontroller there are two processors that use
different machine code. However, they share common RAM and peripherals
and the XGATE code starts off in the same flash space as the S12X code.

In my extension to the m68hc11 port I've added support for the XGATE
assembly language and allow the two codes to be linked together to a
single object file.

My belief is that this works, given a caveat
- you have to know which target the code was assembled for when
disassembling it and where in memory it is located.

gas and objdump use the CPU specific target
ld uses the m68hc12elf (shared) target

I felt that the linking together (sharing external variables) was a
benefit outweighing the perhaps unconventional approach.



James Murray

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]