Do all the things like ++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatarSign Up
Pyjong45467dDoes it say anything more than that? I'd like to hear the because part if there is any.. link perhaps?
Well AVR-GCC shows that C works also with Harvard. There's nothing in C that would require von Neumann.
@12bitfloat Well if you write code to memory and execute that, this means basically aliasing some data pointer and function pointers, and that's technically undefined behaviour anyway.
It's just that some machine specific hacks that are outside the abstract C machine may happen to work better on von Neumann than on Harvard.
@Fast-Nop Writing instructions to memory and jumping to them is well defined behaviour (that's what JITs do). I don't argue that it's impossible compiling C code for Harvard, obviously that's possible (with some caveats), but I believe that C was fundamentally designed for Neumann-like machines
@12bitfloat it's undefined behaviour as far as the C standard is concerned. Obviously, because what you can even write to memory and execute is machine specific, and that wouldn't be the case for standard conforming C.
You can't even do that in C without casting some data pointer to a function pointer, and that's not allowed, technically.
Also, this is not a typical use of C. Everything that you typically use C for works as well on Harvard.
AVR needs the PGM hack only because on embedded, you want to access constant data from flash because RAM is scarce. In that regard, Harvard is a bad choice for such a target. But bigger machines don't have that issue.
Your Job Suck?
Take a quick quiz from Triplebyte to skip the job search hassles and jump to final interviews at hot tech firms
Get a Better Job