Porting code to gcc, replacement for SFR?

James Youngman JYoungman@vggas.com
Thu Nov 6 07:33:00 GMT 1997


>>>>> "Roy" == Roy Leonard <rleonard@trintech.com> writes:

  Roy> We have a lot of legacy code which was written for the IAR compiler (v3.31)
  Roy> for the Hitachi H8/3002. I am hoping to port some of this code over to the
  Roy> GCC compiler.

  Roy> The code makes use of an IAR specific type called sfr - special function
  Roy> register.  Does anyone know of a similar type in gcc, or an easy way to
  Roy> implement a similar type?

  Roy> A special function register is something like a UART control register, which
  Roy> is at a predetermined address and can read/written to as a byte or as
  Roy> individual bits.

GCC allows you to specify for a variable what machine register it
should live in,  I expect that that will do what you want.  The
relevant technique is explained in the GCC documentation.   The info
nnode you want is titled "Explicit Reg Vars".




More information about the crossgcc mailing list