Re: Compiling to 68K processor (Maybe GDC?)

2019-01-21 Thread Jonathan M Davis via Digitalmars-d-learn
On Monday, January 21, 2019 10:08:23 AM MST Johan Engelen via Digitalmars-d- learn wrote: > On Saturday, 19 January 2019 at 17:45:41 UTC, Patrick Schluter > > wrote: > > Afaict NULL pointer derefernecing must fault for D to be > > "usable". At least all code is written with that assumption. > >

Re: Compiling to 68K processor (Maybe GDC?)

2019-01-21 Thread AvritSase via Digitalmars-d-learn
Hi...none of the 68k family are 100% compatible - The 68060 has many opcodes that did not exist in the 68000, and the 68000 has addressing modes that are missing from the 68060. The same applies to the ColdFire. Still, the ISA is the same.

Re: Compiling to 68K processor (Maybe GDC?)

2019-01-21 Thread Johan Engelen via Digitalmars-d-learn
On Monday, 21 January 2019 at 17:08:23 UTC, Johan Engelen wrote: For LDC, dereferencing `null` invokes Undefined Behavior [1]. For completeness, you can tell LDC that dereferencing `null` is _not_ UB in a particular function by specifying `@llvmAttr("null-pointer-is-valid", "true")`:

Re: Compiling to 68K processor (Maybe GDC?)

2019-01-21 Thread Johan Engelen via Digitalmars-d-learn
On Saturday, 19 January 2019 at 17:45:41 UTC, Patrick Schluter wrote: Afaict NULL pointer derefernecing must fault for D to be "usable". At least all code is written with that assumption. Dereferencing `null` in D is implementation defined (https://dlang.org/spec/arrays.html#pointers). For

Re: Compiling to 68K processor (Maybe GDC?)

2019-01-20 Thread Patrick Schluter via Digitalmars-d-learn
On Sunday, 20 January 2019 at 09:27:33 UTC, Jonathan M Davis wrote: On Saturday, January 19, 2019 10:45:41 AM MST Patrick Schluter via Digitalmars-d-learn wrote: On Saturday, 19 January 2019 at 12:54:28 UTC, rikki cattermole wrote: > [...] At least 68030 (or 68020+68851) would be necessary

Re: Compiling to 68K processor (Maybe GDC?)

2019-01-20 Thread Jonathan M Davis via Digitalmars-d-learn
On Saturday, January 19, 2019 10:45:41 AM MST Patrick Schluter via Digitalmars-d-learn wrote: > On Saturday, 19 January 2019 at 12:54:28 UTC, rikki cattermole > > wrote: > > On 20/01/2019 1:38 AM, Edgar Vivar wrote: > >> Hi, > >> > >> I have a project aiming to old 68K processor. While I don't >

Re: Compiling to 68K processor (Maybe GDC?)

2019-01-19 Thread Adam D. Ruppe via Digitalmars-d-learn
On Saturday, 19 January 2019 at 12:54:28 UTC, rikki cattermole wrote: I have no idea about GDC, but the -betterC flag is pretty recent so its support may not be what you would consider first class there yet. so specifically -betterC has been around for years, but it has only recently become

Re: Compiling to 68K processor (Maybe GDC?)

2019-01-19 Thread Patrick Schluter via Digitalmars-d-learn
On Saturday, 19 January 2019 at 12:54:28 UTC, rikki cattermole wrote: On 20/01/2019 1:38 AM, Edgar Vivar wrote: Hi, I have a project aiming to old 68K processor. While I don't think DMD would be able for this on the other hand I think GDC can, am I right? If yes would be any restriction of

Re: Compiling to 68K processor (Maybe GDC?)

2019-01-19 Thread rikki cattermole via Digitalmars-d-learn
On 20/01/2019 1:38 AM, Edgar Vivar wrote: Hi, I have a project aiming to old 68K processor. While I don't think DMD would be able for this on the other hand I think GDC can, am I right? If yes would be any restriction of features to be used? Or the compiler would be smart enough to handle

Compiling to 68K processor (Maybe GDC?)

2019-01-19 Thread Edgar Vivar via Digitalmars-d-learn
Hi, I have a project aiming to old 68K processor. While I don't think DMD would be able for this on the other hand I think GDC can, am I right? If yes would be any restriction of features to be used? Or the compiler would be smart enough to handle this properly? Edgar V.