[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pcc-list
Subject:    Re: [Pcc] First cut of m68k support.
From:       Iain Hibbert <plunky () ogmig ! net>
Date:       2014-03-31 20:03:45
Message-ID: alpine.NEB.2.00.1403312034420.1214 () galant ! ogmig ! net
[Download RAW message or body]

On Mon, 31 Mar 2014, Janne Johansson wrote:

> Two openbsd m68k things and one reduce-nag-while-compiling-on-openbsd

I committed them, thanks

> Dunno what the snprintf availability expectation is everywhere, but it
> seemed like it is used without #ifdefs on lots of other places.

it is provided by compat code in mip/compat.c if not provided by the OS

> Index: configure
> ===================================================================
> RCS file: /cvsroot/pcc/configure,v
> retrieving revision 1.106
> diff -u -r1.106 configure
> --- configure   28 Mar 2014 19:49:07 -0000      1.106
> +++ configure   31 Mar 2014 07:52:54 -0000
> @@ -2487,6 +2487,7 @@
>             vax) targmach=vax ;;
>             powerpc) targmach=powerpc endian=big ;;
>             sparc64) targmach=sparc64 endian=big ;;
> +           m68k*) targmach=m68k endian=big ;;
>             x86_64) targmach=amd64 ;;
>         esac
>         ;;
> Index: cc/cxxcom/pftn.c
> ===================================================================
> RCS file: /cvsroot/pcc/cc/cxxcom/pftn.c,v
> retrieving revision 1.8
> diff -u -r1.8 pftn.c
> --- cc/cxxcom/pftn.c    22 Oct 2012 09:25:40 -0000      1.8
> +++ cc/cxxcom/pftn.c    31 Mar 2014 07:52:54 -0000
> @@ -842,7 +842,7 @@
>
>         if (name == NULL) {
>                 static int ancnt;
> -               sprintf(nbuf, "__%%ANON%d", ancnt++);
> +               snprintf(nbuf, sizeof(nbuf),"__%%ANON%d", ancnt++);
>                 name = addname(nbuf);
>         }
>
> Index: os/openbsd/ccconfig.h
> ===================================================================
> RCS file: /cvsroot/pcc/os/openbsd/ccconfig.h,v
> retrieving revision 1.11
> diff -u -r1.11 ccconfig.h
> --- os/openbsd/ccconfig.h       5 Aug 2012 14:35:00 -0000       1.11
> +++ os/openbsd/ccconfig.h       31 Mar 2014 07:52:54 -0000
> @@ -47,6 +47,9 @@
>  #define CPPMDADD { "-D__powerpc__", NULL }
>  #elif defined(mach_sparc64)
>  #define CPPMDADD { "-D__sparc64__", NULL }
> +#elif defined(mach_m68k)
> +#define        CPPMDADD { "-D__mc68000__", "-D__mc68020__", "-D__m68k__",
> NULL, }
> +#define STARTLABEL "_start"
>  #else
>  #error defines for arch missing
>  #endif
>
>
>
> 2014-03-23 15:48 GMT+01:00 Anders Magnusson <ragge@ludd.ltu.se>:
>
> > Hi,
> >
> > I have just added the beginning of 68k support.
> > It can generate enough code to put out "Hello world", which means that the
> > remaining to add it almost only instructions :-)
> >
> > Took about 8 hours to get this far from scratch :-)
> >
> > -- Ragge
> > _______________________________________________
> > Pcc mailing list
> > Pcc@lists.ludd.ltu.se
> > http://lists.ludd.ltu.se/cgi-bin/mailman/listinfo/pcc
> >
>
>
>
> --
> May the most significant bit of your life be positive.
>


iain
_______________________________________________
Pcc mailing list
Pcc@lists.ludd.ltu.se
http://lists.ludd.ltu.se/cgi-bin/mailman/listinfo/pcc
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic