This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC 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: gcc for microcontroller


On 14/10/17 11:42, Claudio Eterno wrote:
> I've some doubts on this:
> 
> "stack-based architectures are difficult to accommodate as well"
> 
> Can someone explain better this?
> If I remember well the C uses the stack for local variable storage,
> does he refer to those architectures which are completely stack
> oriented (GPR not present)?

This isn't about stack frames.  This is about machines such as the
Burroughs B-5500 and its descendants (e.g. Novix) which use
zero-operand instructions.  These take operands from the stack and
return the results there.  GCC assumes that instructions use registers
for source and destination operands.  (Usually, anyway.)  It would be
possible to write a pass which turned register-register operations
into stack code, but maybe the code quality wouldn't be great.

-- 
Andrew Haley
Java Platform Lead Engineer
Red Hat UK Ltd. <https://www.redhat.com>
EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671


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